Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4PhysicsLinearVector Class Reference

#include <G4PhysicsLinearVector.hh>

Inheritance diagram for G4PhysicsLinearVector:
Collaboration diagram for G4PhysicsLinearVector:

Public Member Functions

 G4PhysicsLinearVector ()
 
 G4PhysicsLinearVector (G4double theEmin, G4double theEmax, size_t theNbin)
 
virtual ~G4PhysicsLinearVector ()
 
virtual G4bool Retrieve (std::ifstream &fIn, G4bool ascii) final
 
virtual void ScaleVector (G4double factorE, G4double factorV) final
 
- Public Member Functions inherited from G4PhysicsVector
 G4PhysicsVector (G4bool spline=false)
 
 G4PhysicsVector (const G4PhysicsVector &)
 
G4PhysicsVectoroperator= (const G4PhysicsVector &)
 
virtual ~G4PhysicsVector ()
 
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 index) const
 
G4double operator() (const size_t index) 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)
 
G4bool Store (std::ofstream &fOut, G4bool ascii=false) const
 
void DumpValues (G4double unitE=1.0, G4double unitV=1.0) const
 
void SetVerboseLevel (G4int value)
 

Additional Inherited Members

- Protected Member Functions inherited from G4PhysicsVector
void DeleteData ()
 
void CopyData (const G4PhysicsVector &vec)
 
void PrintPutValueError (size_t index)
 
- 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 G4PhysicsLinearVector.hh.

Constructor & Destructor Documentation

G4PhysicsLinearVector::G4PhysicsLinearVector ( )

Definition at line 43 of file G4PhysicsLinearVector.cc.

44  : G4PhysicsVector()
45 {
47 }
G4PhysicsVector(G4bool spline=false)
G4PhysicsVectorType type
G4PhysicsLinearVector::G4PhysicsLinearVector ( G4double  theEmin,
G4double  theEmax,
size_t  theNbin 
)

Definition at line 49 of file G4PhysicsLinearVector.cc.

51  : G4PhysicsVector()
52 {
54 
55  dBin = (theEmax-theEmin)/(G4double)theNbin;
56  baseBin = theEmin/dBin;
57 
58  numberOfNodes = theNbin + 1;
59  dataVector.reserve(numberOfNodes);
60  binVector.reserve(numberOfNodes);
61 
62  binVector.push_back(theEmin);
63  dataVector.push_back(0.0);
64 
65  for (size_t i=1; i<numberOfNodes-1; ++i)
66  {
67  binVector.push_back( theEmin + i*dBin );
68  dataVector.push_back(0.0);
69  }
70  binVector.push_back(theEmax);
71  dataVector.push_back(0.0);
72 
73  edgeMin = binVector[0];
74  edgeMax = binVector[numberOfNodes-1];
75 
76 }
G4PVDataVector dataVector
G4PhysicsVector(G4bool spline=false)
G4PVDataVector binVector
G4PhysicsVectorType type
double G4double
Definition: G4Types.hh:76
G4PhysicsLinearVector::~G4PhysicsLinearVector ( )
virtual

Definition at line 78 of file G4PhysicsLinearVector.cc.

79 {}

Member Function Documentation

G4bool G4PhysicsLinearVector::Retrieve ( std::ifstream &  fIn,
G4bool  ascii 
)
finalvirtual

Reimplemented from G4PhysicsVector.

Definition at line 81 of file G4PhysicsLinearVector.cc.

82 {
83  G4bool success = G4PhysicsVector::Retrieve(fIn, ascii);
84  if (success)
85  {
86  dBin = binVector[1]-edgeMin;
87  baseBin = edgeMin/dBin;
88  }
89  return success;
90 }
G4PVDataVector binVector
bool G4bool
Definition: G4Types.hh:79
virtual G4bool Retrieve(std::ifstream &fIn, G4bool ascii=false)

Here is the call graph for this function:

void G4PhysicsLinearVector::ScaleVector ( G4double  factorE,
G4double  factorV 
)
finalvirtual

Reimplemented from G4PhysicsVector.

Definition at line 92 of file G4PhysicsLinearVector.cc.

93 {
94  G4PhysicsVector::ScaleVector(factorE, factorV);
95  dBin = binVector[1]-edgeMin;
96  baseBin = edgeMin/dBin;
97 }
G4PVDataVector binVector
virtual void ScaleVector(G4double factorE, G4double factorV)

Here is the call graph for this function:


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