45 unsigned int vIntegrationPoints){
47 if(vIntegrationPoints > 0){
145 G4int vParticleCharge){
150 else if(vLattice!=
fLattice)
return false;
177 G4cout <<
"XVCrystalIntegratedDensity::InitializeTable()::";
204 G4int vParticleCharge){
206 G4double vPotentialModified = vPotential /
231 unsigned int i1,i2,i3;
248 < vPotentialInitial){
276 a0 = -0.5 * p0 + 1.5 * p1 - 1.5 * p2 + 0.5 * p3;
277 a1 = p0 - 2.5 * p1 + 2.0 * p2 - 0.5 * p3;
278 a2 = -0.5 * p0 + 0.5 * p2;
281 return (a0 * x * x2 + a1 * x2 + a2 * x + a3);
287 std::ofstream vFileOut;
288 vFileOut.open(filename);
291 vFileOut <<
"energy,dens" << std::endl;
297 vFileOut << std::endl;
305 std::ifstream vFileIn;
306 vFileIn.open(filename);
308 G4cout <<
"XVCrystalIntegratedDensity::";
309 G4cout <<
"ReadFromFile - ERROR READING FILE!!!!! ";
323 std::vector<G4double> fTable;
325 while(!vFileIn.eof()){
327 if(vDensity < 1.E-2) {
330 fTable.push_back(vDensity);
337 std::fabs(fPotentialMaximum - fPotentialMinimum),
340 for(
unsigned int i=0;i<fTable.size();i++){
346 G4cout <<
"XVCrystalIntegratedDensity::InitializeTable()::";
G4double fPotentialMinimum
void SetIntegrationPoints(unsigned int, unsigned int)
virtual void InitializeTable()
G4PhysicsLinearVector * fTableVector
CLHEP::Hep3Vector G4ThreeVector
void ReadFromFile(const G4String &)
virtual G4double ComputeIntegratedDensity(G4double, G4int)
G4double FindCatmullRomInterpolate(G4double &p0, G4double &p1, G4double &p2, G4double &p3, G4double &x)
XPhysicalLattice * fLattice
unsigned int GetNumberOfPoints()
size_t GetVectorLength() const
XPhysicalLattice * GetXPhysicalLattice()
G4double GetIntegratedDensity(G4double, XPhysicalLattice *, G4int)
virtual G4double GetMinimum(XPhysicalLattice *)
unsigned int fIntegrationPoints[3]
G4GLOB_DLL std::ostream G4cout
void PrintOnFile(const G4String &)
void PutValue(size_t index, G4double theValue)
unsigned int GetIntegrationPoints()
XUnitCell * GetXUnitCell()
G4double Value(G4double theEnergy, size_t &lastidx) const
void SetXPhysicalLattice(XPhysicalLattice *)
void SetDensity(XVCrystalCharacteristic *)
G4ThreeVector GetEC(G4ThreeVector, XPhysicalLattice *)
G4int GetParticleCharge()
virtual G4double GetMaximum(XPhysicalLattice *)
G4bool HasBeenInitialized(XPhysicalLattice *, G4int)
G4double fPotentialMaximum
~XVCrystalIntegratedDensity()
void SetPotential(XVCrystalCharacteristic *)
XVCrystalCharacteristic * GetDensity()
XVCrystalIntegratedDensity()
XVCrystalCharacteristic * GetPotential()
virtual void ComputePotentialParameters()
unsigned int fNumberOfPoints
XVCrystalCharacteristic * fDensity
void SetParticleCharge(G4int)
XVCrystalCharacteristic * fPotential
void SetNumberOfPoints(unsigned int)