#include <XVCrystalIntegratedDensity.hh>
XVCrystalIntegratedDensity::XVCrystalIntegratedDensity |
( |
| ) |
|
Definition at line 32 of file XVCrystalIntegratedDensity.cc.
33 fNumberOfPoints = 512;
34 fIntegrationPoints[0] = 32;
35 fIntegrationPoints[1] = 32;
36 fIntegrationPoints[2] = 32;
XVCrystalIntegratedDensity::~XVCrystalIntegratedDensity |
( |
| ) |
|
Reimplemented in XCrystalIntegratedDensityPlanar.
Definition at line 231 of file XVCrystalIntegratedDensity.cc.
234 unsigned int i1,i2,i3;
241 while(i1<fIntegrationPoints[2]){
243 G4double(fIntegrationPoints[2])*vSize.
z()));
244 while(i1<fIntegrationPoints[1]){
246 G4double(fIntegrationPoints[1])*vSize.
y()));
247 while(i1<fIntegrationPoints[0]){
249 G4double(fIntegrationPoints[0])*vSize.
x()));
250 if(fPotential->
GetEC(vPositionTemp,fLattice).
x()
251 < vPotentialInitial){
252 vDensity += fDensity->
GetEC(vPositionTemp,fLattice).
x();
CLHEP::Hep3Vector G4ThreeVector
unsigned int GetIntegrationPoints()
XUnitCell * GetXUnitCell()
G4ThreeVector GetEC(G4ThreeVector, XPhysicalLattice *)
void XVCrystalIntegratedDensity::ComputePotentialParameters |
( |
| ) |
|
|
protectedvirtual |
Definition at line 160 of file XVCrystalIntegratedDensity.cc.
162 if(fParticleCharge < 0.){
167 if(fParticleCharge < 0.){
G4double fPotentialMinimum
virtual G4double GetMinimum(XPhysicalLattice *)
virtual G4double GetMaximum(XPhysicalLattice *)
G4double fPotentialMaximum
Definition at line 270 of file XVCrystalIntegratedDensity.cc.
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);
Definition at line 205 of file XVCrystalIntegratedDensity.cc.
209 G4double vPotentialModified = vPotential /
221 else if(vPotentialModified < 0.)
return fTableVector->
Value(0.);
224 return fTableVector->
Value(vPotentialModified);
G4double fPotentialMinimum
G4double Value(G4double theEnergy, size_t &lastidx) const
G4bool HasBeenInitialized(XPhysicalLattice *, G4int)
G4double fPotentialMaximum
unsigned int XVCrystalIntegratedDensity::GetIntegrationPoints |
( |
unsigned int |
vIndex | ) |
|
unsigned int XVCrystalIntegratedDensity::GetIntegrationPoints |
( |
| ) |
|
unsigned int XVCrystalIntegratedDensity::GetNumberOfPoints |
( |
| ) |
|
G4int XVCrystalIntegratedDensity::GetParticleCharge |
( |
| ) |
|
G4double XVCrystalIntegratedDensity::GetStep |
( |
| ) |
|
|
protected |
Definition at line 147 of file XVCrystalIntegratedDensity.cc.
153 else if(vLattice!=fLattice)
return false;
154 else if(vParticleCharge!=fParticleCharge)
return false;
size_t GetVectorLength() const
void XVCrystalIntegratedDensity::InitializeTable |
( |
| ) |
|
|
virtual |
Definition at line 176 of file XVCrystalIntegratedDensity.cc.
180 G4cout <<
"XVCrystalIntegratedDensity::InitializeTable()::";
G4double fPotentialMinimum
virtual G4double ComputeIntegratedDensity(G4double, G4int)
unsigned int GetNumberOfPoints()
G4GLOB_DLL std::ostream G4cout
void PutValue(size_t index, G4double theValue)
static constexpr double eV
G4double fPotentialMaximum
virtual void ComputePotentialParameters()
void XVCrystalIntegratedDensity::PrintOnFile |
( |
const G4String & |
filename | ) |
|
Definition at line 289 of file XVCrystalIntegratedDensity.cc.
290 std::ofstream vFileOut;
291 vFileOut.open(filename);
294 vFileOut <<
"energy,dens" << std::endl;
295 for(
unsigned int i = 0;i < fNumberOfPoints;i++){
300 vFileOut << std::endl;
G4double fPotentialMinimum
G4double GetIntegratedDensity(G4double, XPhysicalLattice *, G4int)
static constexpr double eV
void XVCrystalIntegratedDensity::ReadFromFile |
( |
const G4String & |
filename | ) |
|
Definition at line 307 of file XVCrystalIntegratedDensity.cc.
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);
336 fNumberOfPoints = fTable.size();
340 std::fabs(fPotentialMaximum - fPotentialMinimum),
343 for(
unsigned int i=0;i<fTable.size();i++){
344 fTableVector->
PutValue(i,fTable.at(i));
349 G4cout <<
"XVCrystalIntegratedDensity::InitializeTable()::";
G4double fPotentialMinimum
G4GLOB_DLL std::ostream G4cout
void PutValue(size_t index, G4double theValue)
static constexpr double eV
G4double fPotentialMaximum
void XVCrystalIntegratedDensity::SetIntegrationPoints |
( |
unsigned int |
vIndex, |
|
|
unsigned int |
vIntegrationPoints |
|
) |
| |
void XVCrystalIntegratedDensity::SetNumberOfPoints |
( |
unsigned int |
vNumberOfPoints | ) |
|
void XVCrystalIntegratedDensity::SetParticleCharge |
( |
G4int |
vParticleCharge | ) |
|
G4double XVCrystalIntegratedDensity::fPotentialMaximum |
|
protected |
G4double XVCrystalIntegratedDensity::fPotentialMinimum |
|
protected |
G4double XVCrystalIntegratedDensity::fPotentialRange |
|
protected |
The documentation for this class was generated from the following files: