Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
XCrystalIntegratedDensityPlanar Class Reference

#include <XCrystalIntegratedDensityPlanar.hh>

Inheritance diagram for XCrystalIntegratedDensityPlanar:
Collaboration diagram for XCrystalIntegratedDensityPlanar:

Public Member Functions

 XCrystalIntegratedDensityPlanar ()
 
 ~XCrystalIntegratedDensityPlanar ()
 
- Public Member Functions inherited from XVCrystalIntegratedDensity
void SetIntegrationPoints (unsigned int, unsigned int)
 
unsigned int GetIntegrationPoints (unsigned int)
 
unsigned int GetIntegrationPoints ()
 
void SetNumberOfPoints (unsigned int)
 
unsigned int GetNumberOfPoints ()
 
void SetDensity (XVCrystalCharacteristic *)
 
XVCrystalCharacteristicGetDensity ()
 
void SetPotential (XVCrystalCharacteristic *)
 
XVCrystalCharacteristicGetPotential ()
 
void SetXPhysicalLattice (XPhysicalLattice *)
 
XPhysicalLatticeGetXPhysicalLattice ()
 
void SetParticleCharge (G4int)
 
G4int GetParticleCharge ()
 
void PrintOnFile (const G4String &)
 
void ReadFromFile (const G4String &)
 
G4bool HasBeenInitialized (XPhysicalLattice *, G4int)
 
G4double GetIntegratedDensity (G4double, XPhysicalLattice *, G4int)
 
virtual void InitializeTable ()
 
 XVCrystalIntegratedDensity ()
 
 ~XVCrystalIntegratedDensity ()
 

Protected Member Functions

virtual G4double ComputeIntegratedDensity (G4double, G4int)
 
- Protected Member Functions inherited from XVCrystalIntegratedDensity
G4double GetStep ()
 
virtual void ComputePotentialParameters ()
 
G4double FindCatmullRomInterpolate (G4double &p0, G4double &p1, G4double &p2, G4double &p3, G4double &x)
 

Additional Inherited Members

- Protected Attributes inherited from XVCrystalIntegratedDensity
G4double fPotentialMinimum
 
G4double fPotentialMaximum
 
G4double fPotentialRange
 

Detailed Description

Definition at line 36 of file XCrystalIntegratedDensityPlanar.hh.

Constructor & Destructor Documentation

XCrystalIntegratedDensityPlanar::XCrystalIntegratedDensityPlanar ( )

Definition at line 32 of file XCrystalIntegratedDensityPlanar.cc.

32  {
33  SetNumberOfPoints(256);
34 
35  SetIntegrationPoints(0,1024);
38 }
void SetIntegrationPoints(unsigned int, unsigned int)

Here is the call graph for this function:

XCrystalIntegratedDensityPlanar::~XCrystalIntegratedDensityPlanar ( )

Definition at line 42 of file XCrystalIntegratedDensityPlanar.cc.

42  {
43 }

Member Function Documentation

G4double XCrystalIntegratedDensityPlanar::ComputeIntegratedDensity ( G4double  vPotentialInitial,
G4int  vParticleCharge 
)
protectedvirtual

Reimplemented from XVCrystalIntegratedDensity.

Definition at line 47 of file XCrystalIntegratedDensityPlanar.cc.

49  {
50 
51  unsigned int i1 = 0;
52 
53  G4ThreeVector vPositionTemp = G4ThreeVector(0.,0.,0.);
54  G4double vInterplanarPeriod =
56  G4double vPotential = 0.;
57  G4double vDensity = 0.;
58  G4double xPos = 0.;
59  G4double xMin = +vInterplanarPeriod;
60  G4double xMax = -vInterplanarPeriod;
61 
62  while(i1<GetIntegrationPoints(0)){
63 
65  xPos *= vInterplanarPeriod;
66  vPositionTemp.setX(xPos + vInterplanarPeriod / 2.);
67 
68  vPotential = G4double(vParticleCharge);
69  vPotential *= GetPotential()->GetEC(
70  vPositionTemp,GetXPhysicalLattice()).x();
71 
72  if(vPotential <= vPotentialInitial){
73  vDensity += GetDensity()->GetEC(vPositionTemp,
75  if(xPos < xMin){
76  xMin = xPos;
77  }
78  if(xPos > xMax){
79  xMax = xPos;
80  }
81  }
82 
83  i1++;
84  };
85 
86 
87  vDensity *= vInterplanarPeriod;
88  vDensity *= vInterplanarPeriod/std::fabs(xMax - xMin);
89 
90  vDensity /= GetIntegrationPoints(0);
91 
92  return vDensity;
93 }
CLHEP::Hep3Vector G4ThreeVector
double x() const
void setX(double)
G4ThreeVector GetEC(G4ThreeVector, XPhysicalLattice *)
XVCrystalCharacteristic * GetDensity()
XVCrystalCharacteristic * GetPotential()
double G4double
Definition: G4Types.hh:76
G4double ComputeInterplanarPeriod()

Here is the call graph for this function:


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