48 unsigned int vIntegrationPoints){
50 if(vIntegrationPoints > 0){
148 G4int vParticleCharge){
153 else if(vLattice!=
fLattice)
return false;
180 G4cout <<
"XVCrystalIntegratedDensity::InitializeTable()::";
207 G4int vParticleCharge){
209 G4double vPotentialModified = vPotential /
234 unsigned int i1,i2,i3;
251 < vPotentialInitial){
276 double a0, a1 , a2 , a3 , x2;
279 a0 = -0.5 * p0 + 1.5 * p1 - 1.5 * p2 + 0.5 * p3;
280 a1 = p0 - 2.5 * p1 + 2.0 * p2 - 0.5 * p3;
281 a2 = -0.5 * p0 + 0.5 * p2;
284 return (a0 * x * x2 + a1 * x2 + a2 * x + a3);
290 std::ofstream vFileOut;
291 vFileOut.open(filename);
294 vFileOut <<
"energy,dens" << std::endl;
300 vFileOut << std::endl;
308 std::ifstream vFileIn;
309 vFileIn.open(filename);
311 G4cout <<
"XVCrystalIntegratedDensity::";
312 G4cout <<
"ReadFromFile - ERROR READING FILE!!!!! ";
326 std::vector<G4double> fTable;
328 while(!vFileIn.eof()){
330 if(vDensity < 1.E-2) {
333 fTable.push_back(vDensity);
340 std::fabs(fPotentialMaximum - fPotentialMinimum),
343 for(
unsigned int i=0;i<fTable.size();i++){
349 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)
static constexpr double eV
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()
Definition of the XVCrystalIntegratedDensity class.
virtual void ComputePotentialParameters()
unsigned int fNumberOfPoints
XVCrystalCharacteristic * fDensity
void SetParticleCharge(G4int)
XVCrystalCharacteristic * fPotential
void SetNumberOfPoints(unsigned int)