Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4IonisParamMat Class Reference

#include <G4IonisParamMat.hh>

Public Member Functions

 G4IonisParamMat (const G4Material *)
 
 ~G4IonisParamMat ()
 
G4double GetMeanExcitationEnergy () const
 
void SetMeanExcitationEnergy (G4double value)
 
G4double FindMeanExcitationEnergy (const G4Material *) const
 
G4double GetLogMeanExcEnergy () const
 
G4doubleGetShellCorrectionVector () const
 
G4double GetTaul () const
 
G4double GetPlasmaEnergy () const
 
G4double GetAdjustmentFactor () const
 
G4double GetCdensity () const
 
G4double GetMdensity () const
 
G4double GetAdensity () const
 
G4double GetX0density () const
 
G4double GetX1density () const
 
G4double GetD0density () const
 
void SetDensityEffectParameters (G4double cd, G4double md, G4double ad, G4double x0, G4double x1, G4double d0)
 
void SetDensityEffectParameters (const G4Material *bmat)
 
void ComputeDensityEffectOnFly (G4bool)
 
G4double DensityCorrection (G4double x)
 
G4DensityEffectCalculatorGetDensityEffectCalculator ()
 
G4double GetDensityCorrection (G4double x)
 
G4double GetF1fluct () const
 
G4double GetF2fluct () const
 
G4double GetEnergy1fluct () const
 
G4double GetLogEnergy1fluct () const
 
G4double GetEnergy2fluct () const
 
G4double GetLogEnergy2fluct () const
 
G4double GetEnergy0fluct () const
 
G4double GetRateionexcfluct () const
 
G4double GetZeffective () const
 
G4double GetFermiEnergy () const
 
G4double GetLFactor () const
 
G4double GetInvA23 () const
 
void SetBirksConstant (G4double value)
 
G4double GetBirksConstant () const
 
void SetMeanEnergyPerIonPair (G4double value)
 
G4double GetMeanEnergyPerIonPair () const
 
 G4IonisParamMat (__void__ &)
 

Static Public Member Functions

static G4DensityEffectDataGetDensityEffectData ()
 

Detailed Description

Definition at line 60 of file G4IonisParamMat.hh.

Constructor & Destructor Documentation

◆ G4IonisParamMat() [1/2]

G4IonisParamMat::G4IonisParamMat ( const G4Material material)

Definition at line 59 of file G4IonisParamMat.cc.

60 : fMaterial(material)
61{
62 fBirks = 0.;
63 fMeanEnergyPerIon = 0.0;
64 twoln10 = 2.*G4Pow::GetInstance()->logZ(10);
65
66 // minimal set of default parameters for density effect
67 fCdensity = 0.0;
68 fD0density = 0.0;
69 fAdjustmentFactor = 1.0;
70 if(fDensityData == nullptr) { fDensityData = new G4DensityEffectData(); }
71 fDensityEffectCalc = nullptr;
72
73 // compute parameters
74 ComputeMeanParameters();
75 ComputeDensityEffectParameters();
76 ComputeFluctModel();
77 ComputeIonParameters();
78}
static G4Pow * GetInstance()
Definition: G4Pow.cc:41
G4double logZ(G4int Z) const
Definition: G4Pow.hh:137

◆ ~G4IonisParamMat()

G4IonisParamMat::~G4IonisParamMat ( )

Definition at line 121 of file G4IonisParamMat.cc.

122{
123 delete fDensityEffectCalc;
124 delete [] fShellCorrectionVector;
125 delete fDensityData;
126 fDensityData = nullptr;
127 fShellCorrectionVector = nullptr;
128 fDensityEffectCalc = nullptr;
129}

◆ G4IonisParamMat() [2/2]

G4IonisParamMat::G4IonisParamMat ( __void__ &  )

Definition at line 85 of file G4IonisParamMat.cc.

86 : fMaterial(nullptr), fShellCorrectionVector(nullptr)
87{
88 fMeanExcitationEnergy = 0.0;
89 fLogMeanExcEnergy = 0.0;
90 fTaul = 0.0;
91 fCdensity = 0.0;
92 fMdensity = 0.0;
93 fAdensity = 0.0;
94 fX0density = 0.0;
95 fX1density = 0.0;
96 fD0density = 0.0;
97 fPlasmaEnergy = 0.0;
98 fAdjustmentFactor = 0.0;
99 fF1fluct = 0.0;
100 fF2fluct = 0.0;
101 fEnergy1fluct = 0.0;
102 fLogEnergy1fluct = 0.0;
103 fEnergy2fluct = 0.0;
104 fLogEnergy2fluct = 0.0;
105 fEnergy0fluct = 0.0;
106 fRateionexcfluct = 0.0;
107 fZeff = 0.0;
108 fFermiEnergy = 0.0;
109 fLfactor = 0.0;
110 fInvA23 = 0.0;
111 fBirks = 0.0;
112 fMeanEnergyPerIon = 0.0;
113 twoln10 = 2.*G4Pow::GetInstance()->logZ(10);
114
115 fDensityEffectCalc = nullptr;
116 if(fDensityData == nullptr) { fDensityData = new G4DensityEffectData(); }
117}

Member Function Documentation

◆ ComputeDensityEffectOnFly()

void G4IonisParamMat::ComputeDensityEffectOnFly ( G4bool  val)

Definition at line 525 of file G4IonisParamMat.cc.

526{
527 if(val) {
528 if(!fDensityEffectCalc) {
529 G4int n = 0;
530 for(size_t i=0; i<fMaterial->GetNumberOfElements(); ++i) {
531 const G4int Z = fMaterial->GetElement(i)->GetZasInt();
533 }
534 // The last level is the conduction level. If this is *not* a conductor,
535 // make a dummy conductor level with zero electrons in it.
536 fDensityEffectCalc = new G4DensityEffectCalculator(fMaterial, n);
537 }
538 } else {
539 delete fDensityEffectCalc;
540 fDensityEffectCalc = nullptr;
541 }
542}
int G4int
Definition: G4Types.hh:85
static G4int GetNumberOfShells(G4int Z)
G4int GetZasInt() const
Definition: G4Element.hh:131
const G4Element * GetElement(G4int iel) const
Definition: G4Material.hh:200
size_t GetNumberOfElements() const
Definition: G4Material.hh:184

Referenced by G4Material::ComputeDensityEffectOnFly().

◆ DensityCorrection()

G4double G4IonisParamMat::DensityCorrection ( G4double  x)

Definition at line 185 of file G4IonisParamMat.cc.

186{
187 return (!fDensityEffectCalc) ? GetDensityCorrection(x)
188 : fDensityEffectCalc->ComputeDensityCorrection(x);
189}
G4double GetDensityCorrection(G4double x)

Referenced by G4MuBetheBlochModel::ComputeDEDXPerVolume(), G4BetheBlochModel::ComputeDEDXPerVolume(), G4LindhardSorensenIonModel::ComputeDEDXPerVolume(), and G4MollerBhabhaModel::ComputeDEDXPerVolume().

◆ FindMeanExcitationEnergy()

G4double G4IonisParamMat::FindMeanExcitationEnergy ( const G4Material mat) const

Definition at line 546 of file G4IonisParamMat.cc.

547{
548 G4double res = 0.0;
549 // data from density effect data
550 if(fDensityData) {
551 G4int idx = fDensityData->GetIndex(mat->GetName());
552 if(idx >= 0) {
553 res = fDensityData->GetMeanIonisationPotential(idx);
554 }
555 }
556
557 // The data on mean excitation energy for compaunds
558 // from "Stopping Powers for Electrons and Positrons"
559 // ICRU Report N#37, 1984 (energy in eV)
560 // this value overwrites Density effect data
561 G4String chFormula = mat->GetChemicalFormula();
562 if(chFormula != "") {
563
564 static const size_t numberOfMolecula = 54;
565 static const G4String name[numberOfMolecula] = {
566 // gas 0 - 12
567 "NH_3", "C_4H_10", "CO_2", "C_2H_6", "C_7H_16-Gas",
568 // "G4_AMMONIA", "G4_BUTANE","G4_CARBON_DIOXIDE","G4_ETHANE", "G4_N-HEPTANE"
569 "C_6H_14-Gas", "CH_4", "NO", "N_2O", "C_8H_18-Gas",
570 // "G4_N-HEXANE" , "G4_METHANE", "x", "G4_NITROUS_OXIDE", "G4_OCTANE"
571 "C_5H_12-Gas", "C_3H_8", "H_2O-Gas",
572 // "G4_N-PENTANE", "G4_PROPANE", "G4_WATER_VAPOR"
573
574 // liquid 13 - 39
575 "C_3H_6O", "C_6H_5NH_2", "C_6H_6", "C_4H_9OH", "CCl_4",
576 //"G4_ACETONE","G4_ANILINE","G4_BENZENE","G4_N-BUTYL_ALCOHOL","G4_CARBON_TETRACHLORIDE"
577 "C_6H_5Cl", "CHCl_3", "C_6H_12", "C_6H_4Cl_2", "C_4Cl_2H_8O",
578 //"G4_CHLOROBENZENE","G4_CHLOROFORM","G4_CYCLOHEXANE","G4_1,2-DICHLOROBENZENE",
579 //"G4_DICHLORODIETHYL_ETHER"
580 "C_2Cl_2H_4", "(C_2H_5)_2O", "C_2H_5OH", "C_3H_5(OH)_3","C_7H_16",
581 //"G4_1,2-DICHLOROETHANE","G4_DIETHYL_ETHER","G4_ETHYL_ALCOHOL","G4_GLYCEROL","G4_N-HEPTANE"
582 "C_6H_14", "CH_3OH", "C_6H_5NO_2","C_5H_12", "C_3H_7OH",
583 //"G4_N-HEXANE","G4_METHANOL","G4_NITROBENZENE","G4_N-PENTANE","G4_N-PROPYL_ALCOHOL",
584 "C_5H_5N", "C_8H_8", "C_2Cl_4", "C_7H_8", "C_2Cl_3H",
585 //"G4_PYRIDINE","G4_POLYSTYRENE","G4_TETRACHLOROETHYLENE","G4_TOLUENE","G4_TRICHLOROETHYLENE"
586 "H_2O", "C_8H_10",
587 // "G4_WATER", "G4_XYLENE"
588
589 // solid 40 - 53
590 "C_5H_5N_5", "C_5H_5N_5O", "(C_6H_11NO)-nylon", "C_25H_52",
591 // "G4_ADENINE", "G4_GUANINE", "G4_NYLON-6-6", "G4_PARAFFIN"
592 "(C_2H_4)-Polyethylene", "(C_5H_8O_2)-Polymethil_Methacrylate",
593 // "G4_ETHYLENE", "G4_PLEXIGLASS"
594 "(C_8H_8)-Polystyrene", "A-150-tissue", "Al_2O_3", "CaF_2",
595 // "G4_POLYSTYRENE", "G4_A-150_TISSUE", "G4_ALUMINUM_OXIDE", "G4_CALCIUM_FLUORIDE"
596 "LiF", "Photo_Emulsion", "(C_2F_4)-Teflon", "SiO_2"
597 // "G4_LITHIUM_FLUORIDE", "G4_PHOTO_EMULSION", "G4_TEFLON", "G4_SILICON_DIOXIDE"
598 } ;
599
600 static const G4double meanExcitation[numberOfMolecula] = {
601
602 53.7, 48.3, 85.0, 45.4, 49.2,
603 49.1, 41.7, 87.8, 84.9, 49.5,
604 48.2, 47.1, 71.6,
605
606 64.2, 66.2, 63.4, 59.9, 166.3,
607 89.1, 156.0, 56.4, 106.5, 103.3,
608 111.9, 60.0, 62.9, 72.6, 54.4,
609 54.0, 67.6, 75.8, 53.6, 61.1,
610 66.2, 64.0, 159.2, 62.5, 148.1,
611 75.0, 61.8,
612
613 71.4, 75.0, 63.9, 48.3, 57.4,
614 74.0, 68.7, 65.1, 145.2, 166.,
615 94.0, 331.0, 99.1, 139.2
616 };
617
618 for(size_t i=0; i<numberOfMolecula; i++) {
619 if(chFormula == name[i]) {
620 res = meanExcitation[i]*eV;
621 break;
622 }
623 }
624 }
625 return res;
626}
double G4double
Definition: G4Types.hh:83
G4double GetMeanIonisationPotential(G4int idx) const
G4int GetIndex(const G4String &matName) const
const G4String & GetChemicalFormula() const
Definition: G4Material.hh:176
const G4String & GetName() const
Definition: G4Material.hh:175
const char * name(G4int ptype)

◆ GetAdensity()

G4double G4IonisParamMat::GetAdensity ( ) const
inline

Definition at line 91 of file G4IonisParamMat.hh.

91{return fAdensity;};

Referenced by G4EmCorrections::DensityCorrection(), and SetDensityEffectParameters().

◆ GetAdjustmentFactor()

G4double G4IonisParamMat::GetAdjustmentFactor ( ) const
inline

Definition at line 85 of file G4IonisParamMat.hh.

85{return fAdjustmentFactor;};

◆ GetBirksConstant()

G4double G4IonisParamMat::GetBirksConstant ( ) const
inline

Definition at line 152 of file G4IonisParamMat.hh.

152{return fBirks;};

Referenced by G4EmSaturation::DumpBirksCoefficients(), and G4EmSaturation::VisibleEnergyDeposition().

◆ GetCdensity()

G4double G4IonisParamMat::GetCdensity ( ) const
inline

Definition at line 87 of file G4IonisParamMat.hh.

87{return fCdensity;};

Referenced by G4EmCorrections::DensityCorrection(), and SetDensityEffectParameters().

◆ GetD0density()

G4double G4IonisParamMat::GetD0density ( ) const
inline

Definition at line 97 of file G4IonisParamMat.hh.

97{return fD0density;};

Referenced by SetDensityEffectParameters().

◆ GetDensityCorrection()

G4double G4IonisParamMat::GetDensityCorrection ( G4double  x)
inline

Definition at line 240 of file G4IonisParamMat.hh.

241{
242 // x = log10(beta*gamma)
243 G4double y = 0.0;
244 if(x < fX0density) {
245 if(fD0density > 0.0) { y = fD0density*G4Exp(twoln10*(x - fX0density)); }
246 } else if(x >= fX1density) { y = twoln10*x - fCdensity; }
247 else {y = twoln10*x - fCdensity + fAdensity*G4Exp(G4Log(fX1density - x)*fMdensity);}
248 return y;
249}
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:179
G4double G4Log(G4double x)
Definition: G4Log.hh:226

Referenced by G4DensityEffectCalculator::ComputeDensityCorrection(), and DensityCorrection().

◆ GetDensityEffectCalculator()

G4DensityEffectCalculator * G4IonisParamMat::GetDensityEffectCalculator ( )
inline

Definition at line 112 of file G4IonisParamMat.hh.

113 { return fDensityEffectCalc; }

◆ GetDensityEffectData()

G4DensityEffectData * G4IonisParamMat::GetDensityEffectData ( )
static

Definition at line 178 of file G4IonisParamMat.cc.

179{
180 return fDensityData;
181}

Referenced by G4NistMessenger::SetNewValue().

◆ GetEnergy0fluct()

G4double G4IonisParamMat::GetEnergy0fluct ( ) const
inline

Definition at line 134 of file G4IonisParamMat.hh.

134{return fEnergy0fluct;};

Referenced by G4UniversalFluctuation::SampleFluctuations().

◆ GetEnergy1fluct()

G4double G4IonisParamMat::GetEnergy1fluct ( ) const
inline

Definition at line 126 of file G4IonisParamMat.hh.

126{return fEnergy1fluct;};

Referenced by G4UniversalFluctuation::SampleFluctuations().

◆ GetEnergy2fluct()

G4double G4IonisParamMat::GetEnergy2fluct ( ) const
inline

Definition at line 130 of file G4IonisParamMat.hh.

130{return fEnergy2fluct;};

Referenced by G4UniversalFluctuation::SampleFluctuations().

◆ GetF1fluct()

G4double G4IonisParamMat::GetF1fluct ( ) const
inline

Definition at line 122 of file G4IonisParamMat.hh.

122{return fF1fluct;};

Referenced by G4UniversalFluctuation::SampleFluctuations().

◆ GetF2fluct()

G4double G4IonisParamMat::GetF2fluct ( ) const
inline

Definition at line 124 of file G4IonisParamMat.hh.

124{return fF2fluct;};

Referenced by G4UniversalFluctuation::SampleFluctuations().

◆ GetFermiEnergy()

G4double G4IonisParamMat::GetFermiEnergy ( ) const
inline

Definition at line 142 of file G4IonisParamMat.hh.

142{return fFermiEnergy;};

Referenced by G4ionEffectiveCharge::EffectiveCharge().

◆ GetInvA23()

G4double G4IonisParamMat::GetInvA23 ( ) const
inline

◆ GetLFactor()

G4double G4IonisParamMat::GetLFactor ( ) const
inline

Definition at line 144 of file G4IonisParamMat.hh.

144{return fLfactor;};

◆ GetLogEnergy1fluct()

G4double G4IonisParamMat::GetLogEnergy1fluct ( ) const
inline

Definition at line 128 of file G4IonisParamMat.hh.

128{return fLogEnergy1fluct;};

Referenced by G4UniversalFluctuation::SampleFluctuations().

◆ GetLogEnergy2fluct()

G4double G4IonisParamMat::GetLogEnergy2fluct ( ) const
inline

Definition at line 132 of file G4IonisParamMat.hh.

132{return fLogEnergy2fluct;};

Referenced by G4UniversalFluctuation::SampleFluctuations().

◆ GetLogMeanExcEnergy()

G4double G4IonisParamMat::GetLogMeanExcEnergy ( ) const
inline

Definition at line 75 of file G4IonisParamMat.hh.

75{return fLogMeanExcEnergy;};

Referenced by G4UniversalFluctuation::SampleFluctuations().

◆ GetMdensity()

G4double G4IonisParamMat::GetMdensity ( ) const
inline

Definition at line 89 of file G4IonisParamMat.hh.

89{return fMdensity;};

Referenced by G4EmCorrections::DensityCorrection(), and SetDensityEffectParameters().

◆ GetMeanEnergyPerIonPair()

G4double G4IonisParamMat::GetMeanEnergyPerIonPair ( ) const
inline

◆ GetMeanExcitationEnergy()

◆ GetPlasmaEnergy()

G4double G4IonisParamMat::GetPlasmaEnergy ( ) const
inline

Definition at line 83 of file G4IonisParamMat.hh.

83{return fPlasmaEnergy;};

Referenced by G4DensityEffectCalculator::G4DensityEffectCalculator().

◆ GetRateionexcfluct()

G4double G4IonisParamMat::GetRateionexcfluct ( ) const
inline

Definition at line 136 of file G4IonisParamMat.hh.

136{return fRateionexcfluct;};

◆ GetShellCorrectionVector()

G4double * G4IonisParamMat::GetShellCorrectionVector ( ) const
inline

Definition at line 77 of file G4IonisParamMat.hh.

77{return fShellCorrectionVector;};

Referenced by G4EmCorrections::ShellCorrectionSTD().

◆ GetTaul()

G4double G4IonisParamMat::GetTaul ( ) const
inline

Definition at line 79 of file G4IonisParamMat.hh.

79{return fTaul;};

Referenced by G4hBetheBlochModel::LowEnergyLimit(), and G4EmCorrections::ShellCorrectionSTD().

◆ GetX0density()

G4double G4IonisParamMat::GetX0density ( ) const
inline

Definition at line 93 of file G4IonisParamMat.hh.

93{return fX0density;};

Referenced by G4EmCorrections::DensityCorrection(), and SetDensityEffectParameters().

◆ GetX1density()

G4double G4IonisParamMat::GetX1density ( ) const
inline

Definition at line 95 of file G4IonisParamMat.hh.

95{return fX1density;};

Referenced by G4EmCorrections::DensityCorrection(), and SetDensityEffectParameters().

◆ GetZeffective()

◆ SetBirksConstant()

void G4IonisParamMat::SetBirksConstant ( G4double  value)
inline

Definition at line 150 of file G4IonisParamMat.hh.

150{fBirks = value;};

◆ SetDensityEffectParameters() [1/2]

void G4IonisParamMat::SetDensityEffectParameters ( const G4Material bmat)

Definition at line 501 of file G4IonisParamMat.cc.

502{
503#ifdef G4MULTITHREADED
504 G4MUTEXLOCK(&ionisMutex);
505#endif
506 const G4IonisParamMat* ipm = bmat->GetIonisation();
507 fCdensity = ipm->GetCdensity();
508 fMdensity = ipm->GetMdensity();
509 fAdensity = ipm->GetAdensity();
510 fX0density = ipm->GetX0density();
511 fX1density = ipm->GetX1density();
512 fD0density = ipm->GetD0density();
513
514 G4double corr = G4Log(bmat->GetDensity()/fMaterial->GetDensity());
515 fCdensity += corr;
516 fX0density += corr/twoln10;
517 fX1density += corr/twoln10;
518#ifdef G4MULTITHREADED
519 G4MUTEXUNLOCK(&ionisMutex);
520#endif
521}
#define G4MUTEXLOCK(mutex)
Definition: G4Threading.hh:251
#define G4MUTEXUNLOCK(mutex)
Definition: G4Threading.hh:254
G4double GetMdensity() const
G4double GetX1density() const
G4double GetX0density() const
G4double GetCdensity() const
G4double GetD0density() const
G4double GetAdensity() const
G4double GetDensity() const
Definition: G4Material.hh:178
G4IonisParamMat * GetIonisation() const
Definition: G4Material.hh:224

◆ SetDensityEffectParameters() [2/2]

void G4IonisParamMat::SetDensityEffectParameters ( G4double  cd,
G4double  md,
G4double  ad,
G4double  x0,
G4double  x1,
G4double  d0 
)

Definition at line 480 of file G4IonisParamMat.cc.

483{
484 // no check on consistence of user parameters
485#ifdef G4MULTITHREADED
486 G4MUTEXLOCK(&ionisMutex);
487#endif
488 fCdensity = cd;
489 fMdensity = md;
490 fAdensity = ad;
491 fX0density = x0;
492 fX1density = x1;
493 fD0density = d0;
494#ifdef G4MULTITHREADED
495 G4MUTEXUNLOCK(&ionisMutex);
496#endif
497}

◆ SetMeanEnergyPerIonPair()

void G4IonisParamMat::SetMeanEnergyPerIonPair ( G4double  value)
inline

Definition at line 156 of file G4IonisParamMat.hh.

156{fMeanEnergyPerIon = value;};

Referenced by G4ElectronIonPair::FindG4MeanEnergyPerIonPair().

◆ SetMeanExcitationEnergy()

void G4IonisParamMat::SetMeanExcitationEnergy ( G4double  value)

Definition at line 453 of file G4IonisParamMat.cc.

454{
455 if(value == fMeanExcitationEnergy || value <= 0.0) { return; }
456 if (G4NistManager::Instance()->GetVerbose() > 1) {
457 G4cout << "G4Material: Mean excitation energy is changed for "
458 << fMaterial->GetName()
459 << " Iold= " << fMeanExcitationEnergy/eV
460 << "eV; Inew= " << value/eV << " eV;"
461 << G4endl;
462 }
463
464 fMeanExcitationEnergy = value;
465
466 // add corrections to density effect
467 G4double newlog = G4Log(value);
468 G4double corr = 2*(newlog - fLogMeanExcEnergy);
469 fCdensity += corr;
470 fX0density += corr/twoln10;
471 fX1density += corr/twoln10;
472
473 // recompute parameters of fluctuation model
474 fLogMeanExcEnergy = newlog;
475 ComputeFluctModel();
476}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
static G4NistManager * Instance()

Referenced by G4tgbMaterialMgr::FindOrBuildG4Material(), and G4GDMLReadMaterials::MaterialRead().


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