Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
G4PhysicsLogVector Class Reference

#include <G4PhysicsLogVector.hh>

Inheritance diagram for G4PhysicsLogVector:
G4PhysicsVector

Public Member Functions

 G4PhysicsLogVector ()
 
 G4PhysicsLogVector (size_t theNbin)
 
 G4PhysicsLogVector (G4double theEmin, G4double theEmax, size_t theNbin)
 
virtual ~G4PhysicsLogVector ()
 
virtual G4bool Retrieve (std::ifstream &fIn, G4bool ascii)
 
virtual void ScaleVector (G4double factorE, G4double factorV)
 
- Public Member Functions inherited from G4PhysicsVector
 G4PhysicsVector (G4bool spline=false)
 
 G4PhysicsVector (const G4PhysicsVector &)
 
G4PhysicsVectoroperator= (const G4PhysicsVector &)
 
virtual ~G4PhysicsVector ()
 
voidoperator new (size_t)
 
void operator delete (void *)
 
G4double Value (G4double theEnergy, size_t &lastidx) const
 
G4double Value (G4double theEnergy) const
 
G4double GetValue (G4double theEnergy, G4bool &isOutRange) const
 
G4int operator== (const G4PhysicsVector &right) const
 
G4int operator!= (const G4PhysicsVector &right) const
 
G4double operator[] (const size_t binNumber) const
 
G4double operator() (const size_t binNumber) const
 
void PutValue (size_t index, G4double theValue)
 
G4double Energy (size_t index) const
 
G4double GetMaxEnergy () const
 
G4double GetLowEdgeEnergy (size_t binNumber) const
 
size_t GetVectorLength () const
 
size_t FindBin (G4double energy, size_t idx) const
 
void FillSecondDerivatives ()
 
void ComputeSecDerivatives ()
 
void ComputeSecondDerivatives (G4double firstPointDerivative, G4double endPointDerivative)
 
G4double FindLinearEnergy (G4double rand) const
 
G4bool IsFilledVectorExist () const
 
G4PhysicsVectorType GetType () const
 
void SetSpline (G4bool)
 
virtual G4bool Store (std::ofstream &fOut, G4bool ascii=false)
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel (G4int)
 

Additional Inherited Members

- Protected Member Functions inherited from G4PhysicsVector
void DeleteData ()
 
void CopyData (const G4PhysicsVector &vec)
 
- Protected Attributes inherited from G4PhysicsVector
G4PhysicsVectorType type
 
G4double edgeMin
 
G4double edgeMax
 
size_t numberOfNodes
 
G4PVDataVector dataVector
 
G4PVDataVector binVector
 
G4PVDataVector secDerivative
 
G4double dBin
 
G4double baseBin
 
G4int verboseLevel
 

Detailed Description

Definition at line 60 of file G4PhysicsLogVector.hh.

Constructor & Destructor Documentation

G4PhysicsLogVector::G4PhysicsLogVector ( )

Definition at line 51 of file G4PhysicsLogVector.cc.

References T_G4PhysicsLogVector, and G4PhysicsVector::type.

52  : G4PhysicsVector()
53 {
55 }
G4PhysicsVector(G4bool spline=false)
G4PhysicsVectorType type
G4PhysicsLogVector::G4PhysicsLogVector ( size_t  theNbin)
explicit

Definition at line 57 of file G4PhysicsLogVector.cc.

References G4PhysicsVector::binVector, G4PhysicsVector::dataVector, G4PhysicsVector::numberOfNodes, T_G4PhysicsLogVector, and G4PhysicsVector::type.

58  : G4PhysicsVector()
59 {
61 
62  numberOfNodes = theNbin + 1;
63  dataVector.reserve(numberOfNodes);
64  binVector.reserve(numberOfNodes);
65 
66  for (size_t i=0; i<numberOfNodes; i++)
67  {
68  binVector.push_back(0.0);
69  dataVector.push_back(0.0);
70  }
71 }
G4PVDataVector dataVector
G4PhysicsVector(G4bool spline=false)
G4PVDataVector binVector
G4PhysicsVectorType type
G4PhysicsLogVector::G4PhysicsLogVector ( G4double  theEmin,
G4double  theEmax,
size_t  theNbin 
)

Definition at line 73 of file G4PhysicsLogVector.cc.

References G4PhysicsVector::baseBin, G4PhysicsVector::binVector, G4PhysicsVector::dataVector, G4PhysicsVector::dBin, G4PhysicsVector::edgeMax, G4PhysicsVector::edgeMin, G4Exp(), G4Log(), G4PhysicsVector::numberOfNodes, T_G4PhysicsLogVector, and G4PhysicsVector::type.

75  : G4PhysicsVector()
76 {
78 
79  dBin = G4Log(theEmax/theEmin)/theNbin;
80  baseBin = G4Log(theEmin)/dBin;
81 
82  numberOfNodes = theNbin + 1;
83  dataVector.reserve(numberOfNodes);
84  binVector.reserve(numberOfNodes);
85 
86  binVector.push_back(theEmin);
87  dataVector.push_back(0.0);
88 
89  for (size_t i=1; i<numberOfNodes-1; i++)
90  {
91  binVector.push_back(G4Exp((baseBin+i)*dBin));
92  dataVector.push_back(0.0);
93  }
94  binVector.push_back(theEmax);
95  dataVector.push_back(0.0);
96 
97  edgeMin = binVector[0];
98  edgeMax = binVector[numberOfNodes-1];
99 }
G4PVDataVector dataVector
G4PhysicsVector(G4bool spline=false)
G4PVDataVector binVector
G4PhysicsVectorType type
G4double G4Log(G4double x)
Definition: G4Log.hh:227
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:180
G4PhysicsLogVector::~G4PhysicsLogVector ( )
virtual

Definition at line 101 of file G4PhysicsLogVector.cc.

102 {
103 }

Member Function Documentation

G4bool G4PhysicsLogVector::Retrieve ( std::ifstream &  fIn,
G4bool  ascii 
)
virtual

Reimplemented from G4PhysicsVector.

Definition at line 105 of file G4PhysicsLogVector.cc.

References G4PhysicsVector::baseBin, G4PhysicsVector::binVector, G4PhysicsVector::dBin, G4Log(), and G4PhysicsVector::Retrieve().

106 {
107  G4bool success = G4PhysicsVector::Retrieve(fIn, ascii);
108  if (success)
109  {
110  G4double theEmin = binVector[0];
111  dBin = G4Log(binVector[1]/theEmin);
112  baseBin = G4Log(theEmin)/dBin;
113  }
114  return success;
115 }
G4PVDataVector binVector
bool G4bool
Definition: G4Types.hh:79
G4double G4Log(G4double x)
Definition: G4Log.hh:227
virtual G4bool Retrieve(std::ifstream &fIn, G4bool ascii=false)
double G4double
Definition: G4Types.hh:76
void G4PhysicsLogVector::ScaleVector ( G4double  factorE,
G4double  factorV 
)
virtual

Reimplemented from G4PhysicsVector.

Definition at line 117 of file G4PhysicsLogVector.cc.

References G4PhysicsVector::baseBin, G4PhysicsVector::binVector, G4PhysicsVector::dBin, G4Log(), and G4PhysicsVector::ScaleVector().

118 {
119  G4PhysicsVector::ScaleVector(factorE, factorV);
120  G4double theEmin = binVector[0];
121  dBin = G4Log(binVector[1]/theEmin);
122  baseBin = G4Log(theEmin)/dBin;
123 }
G4PVDataVector binVector
virtual void ScaleVector(G4double factorE, G4double factorV)
G4double G4Log(G4double x)
Definition: G4Log.hh:227
double G4double
Definition: G4Types.hh:76

The documentation for this class was generated from the following files: