66 fMeanEnergyPerIon = 0.0;
72 fAdjustmentFactor = 1.0;
74 fDensityEffectCalc =
nullptr;
77 ComputeMeanParameters();
78 ComputeDensityEffectParameters();
80 ComputeIonParameters();
89 : fMaterial(nullptr), fShellCorrectionVector(nullptr)
91 fMeanExcitationEnergy = 0.0;
92 fLogMeanExcEnergy = 0.0;
101 fAdjustmentFactor = 0.0;
105 fLogEnergy1fluct = 0.0;
107 fLogEnergy2fluct = 0.0;
109 fRateionexcfluct = 0.0;
115 fMeanEnergyPerIon = 0.0;
118 fDensityEffectCalc =
nullptr;
125 delete fDensityEffectCalc;
126 delete [] fShellCorrectionVector;
128 fDensityData =
nullptr;
129 fShellCorrectionVector =
nullptr;
130 fDensityEffectCalc =
nullptr;
140 if(fD0density > 0.0) { y = fD0density*
G4Exp(twoln10*(x - fX0density)); }
141 }
else if(x >= fX1density) {
142 y = twoln10*x - fCdensity;
144 y = twoln10*x - fCdensity +
145 fAdensity*
G4Exp(
G4Log(fX1density - x)*fMdensity);
152void G4IonisParamMat::ComputeMeanParameters()
162 fLogMeanExcEnergy = 0.;
165 if(fMeanExcitationEnergy > 0.0) {
166 fLogMeanExcEnergy =
G4Log(fMeanExcitationEnergy);
170 for (
size_t i=0; i < nElements; ++i) {
172 fLogMeanExcEnergy += nAtomsPerVolume[i]*elm->
GetZ()
176 fMeanExcitationEnergy =
G4Exp(fLogMeanExcEnergy);
179 fShellCorrectionVector =
new G4double[3];
181 for (
G4int j=0; j<=2; ++j)
183 fShellCorrectionVector[j] = 0.;
185 for (
size_t k=0; k<nElements; ++k) {
186 fShellCorrectionVector[j] += nAtomsPerVolume[k]
187 *(((*elmVector)[k])->GetIonisation()->GetShellCorrectionVector())[j];
202void G4IonisParamMat::ComputeDensityEffectParameters()
206 if(
nullptr == fDensityData) {
208 if(
nullptr == fDensityData) {
226 static const G4double massfracmax = 0.9;
231 if(idx < 0 && 1 == nelm) {
237 if(idx >= 0 && 0 < z) {
239 if(dens <= 0.0) { idx = -1; }
241 corr =
G4Log(dens/density);
242 if(std::abs(corr) > corrmax) { idx = -1; }
247 if(idx < 0 &&
nullptr != bmat) {
251 if(std::abs(corr) > corrmax) { idx = -1; }
256 if(idx < 0 && 1 < nelm) {
258 for(
G4int i=0; i<nelm; ++i) {
260 if(frac > massfracmax) {
264 if(idx >= 0 && dens > 0.0) {
265 corr =
G4Log(dens/density);
266 if(std::abs(corr) > corrmax) { idx = -1; }
297 fX0density += corr/twoln10;
298 fX1density += corr/twoln10;
303 4*CLHEP::pi*CLHEP::hbarc_squared*CLHEP::classic_electr_radius;
310 fCdensity = 1. + 2*
G4Log(fMeanExcitationEnergy/fPlasmaEnergy);
316 static const G4double E100eV = 100.*CLHEP::eV;
317 static const G4double ClimiS[] = {3.681 , 5.215 };
318 static const G4double X0valS[] = {1.0 , 1.5 };
319 static const G4double X1valS[] = {2.0 , 3.0 };
321 if(fMeanExcitationEnergy < E100eV) { icase = 0; }
324 if(fCdensity < ClimiS[icase]) { fX0density = 0.2; }
325 else { fX0density = 0.326*fCdensity - X0valS[icase]; }
327 fX1density = X1valS[icase]; fMdensity = 3.0;
330 if (1 == nelm && 1 == Z0) {
331 fX0density = 0.425; fX1density = 2.0; fMdensity = 5.949;
340 if(fCdensity <= 10.) {
342 }
else if(fCdensity <= 10.5) {
344 }
else if(fCdensity <= 11.0) {
346 }
else if(fCdensity <= 11.5) {
348 }
else if(fCdensity <= 12.25) {
350 }
else if(fCdensity <= 13.804) {
354 fX0density = 0.326*fCdensity-2.5;
359 if (1 == nelm && 1 == Z0) {
360 fX0density = 1.837; fX1density = 3.0; fMdensity = 4.754;
364 if (1 == nelm && 2 == Z0) {
365 fX0density = 2.191; fX1density = 3.0; fMdensity = 3.297;
378 G4double DensitySTP = density*STP_Pressure*Temp/(Pressure*NTP_Temperature);
382 fCdensity -= ParCorr;
383 fX0density -= ParCorr/twoln10;
384 fX1density -= ParCorr/twoln10;
388 if(0.0 == fD0density) {
390 fAdensity = twoln10*(Xa-fX0density)
391 /std::pow((fX1density-fX0density),fMdensity);
410void G4IonisParamMat::ComputeFluctModel()
419 fF2fluct = (Zeff > 2.) ? 2./Zeff : 0.0;
421 fF1fluct = 1. - fF2fluct;
422 fEnergy2fluct = 10.*Zeff*Zeff*CLHEP::eV;
423 fLogEnergy2fluct =
G4Log(fEnergy2fluct);
424 fLogEnergy1fluct = (fLogMeanExcEnergy - fF2fluct*fLogEnergy2fluct)
426 fEnergy1fluct =
G4Exp(fLogEnergy1fluct);
427 fEnergy0fluct = 10.*CLHEP::eV;
428 fRateionexcfluct = 0.4;
433void G4IonisParamMat::ComputeIonParameters()
437 const G4double* theAtomicNumDensityVector =
443 G4double z(0.0), vF(0.0), lF(0.0), a23(0.0);
446 if( 1 == NumberOfElements ) {
447 const G4Element* element = (*theElementVector)[0];
451 a23 = 1.0/g4pow->
A23(element->
GetN());
455 for (
G4int iel=0; iel<NumberOfElements; ++iel) {
456 const G4Element* element = (*theElementVector)[iel];
457 const G4double weight = theAtomicNumDensityVector[iel];
459 z += element->
GetZ() * weight;
462 a23 += weight/g4pow->
A23(element->
GetN());
471 fFermiEnergy = 25.*CLHEP::keV*vF*vF;
479 if(value == fMeanExcitationEnergy || value <= 0.0) {
return; }
481 G4cout <<
"G4Material: Mean excitation energy is changed for "
483 <<
" Iold= " << fMeanExcitationEnergy/CLHEP::eV
484 <<
"eV; Inew= " << value/eV <<
" eV;"
488 fMeanExcitationEnergy = value;
492 G4double corr = 2*(newlog - fLogMeanExcEnergy);
494 fX0density += corr/twoln10;
495 fX1density += corr/twoln10;
498 fLogMeanExcEnergy = newlog;
523#ifdef G4MULTITHREADED
536 fX0density += corr/twoln10;
537 fX1density += corr/twoln10;
538#ifdef G4MULTITHREADED
548 if(
nullptr == fDensityEffectCalc) {
559 delete fDensityEffectCalc;
560 fDensityEffectCalc =
nullptr;
570 if(fDensityData !=
nullptr)
583 if(!chFormula.empty())
585 static const size_t numberOfMolecula = 54;
586 static const G4String name[numberOfMolecula] = {
588 "NH_3",
"C_4H_10",
"CO_2",
"C_2H_6",
"C_7H_16-Gas",
590 "C_6H_14-Gas",
"CH_4",
"NO",
"N_2O",
"C_8H_18-Gas",
592 "C_5H_12-Gas",
"C_3H_8",
"H_2O-Gas",
596 "C_3H_6O",
"C_6H_5NH_2",
"C_6H_6",
"C_4H_9OH",
"CCl_4",
598 "C_6H_5Cl",
"CHCl_3",
"C_6H_12",
"C_6H_4Cl_2",
"C_4Cl_2H_8O",
601 "C_2Cl_2H_4",
"(C_2H_5)_2O",
"C_2H_5OH",
"C_3H_5(OH)_3",
"C_7H_16",
603 "C_6H_14",
"CH_3OH",
"C_6H_5NO_2",
"C_5H_12",
"C_3H_7OH",
605 "C_5H_5N",
"C_8H_8",
"C_2Cl_4",
"C_7H_8",
"C_2Cl_3H",
611 "C_5H_5N_5",
"C_5H_5N_5O",
"(C_6H_11NO)-nylon",
"C_25H_52",
613 "(C_2H_4)-Polyethylene",
"(C_5H_8O_2)-Polymethil_Methacrylate",
615 "(C_8H_8)-Polystyrene",
"A-150-tissue",
"Al_2O_3",
"CaF_2",
617 "LiF",
"Photo_Emulsion",
"(C_2F_4)-Teflon",
"SiO_2"
621 static const G4double meanExcitation[numberOfMolecula] = {
623 53.7, 48.3, 85.0, 45.4, 49.2,
624 49.1, 41.7, 87.8, 84.9, 49.5,
627 64.2, 66.2, 63.4, 59.9, 166.3,
628 89.1, 156.0, 56.4, 106.5, 103.3,
629 111.9, 60.0, 62.9, 72.6, 54.4,
630 54.0, 67.6, 75.8, 53.6, 61.1,
631 66.2, 64.0, 159.2, 62.5, 148.1,
634 71.4, 75.0, 63.9, 48.3, 57.4,
635 74.0, 68.7, 65.1, 145.2, 166.,
636 94.0, 331.0, 99.1, 139.2
639 for(
size_t i=0; i<numberOfMolecula; i++) {
640 if(chFormula == name[i]) {
641 res = meanExcitation[i]*eV;
std::vector< const G4Element * > G4ElementVector
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double G4Log(G4double x)
#define G4MUTEX_INITIALIZER
#define G4MUTEXLOCK(mutex)
#define G4MUTEXUNLOCK(mutex)
G4GLOB_DLL std::ostream G4cout
static G4int GetNumberOfShells(G4int Z)
G4double GetAdjustmentFactor(G4int idx) const
G4double GetCdensity(G4int idx) const
G4double GetMdensity(G4int idx) const
G4double GetDelta0density(G4int idx) const
G4double GetPlasmaEnergy(G4int idx) const
G4int GetElementIndex(G4int Z, G4State st=kStateUndefined) const
G4double GetMeanIonisationPotential(G4int idx) const
G4double GetX1density(G4int idx) const
G4double GetAdensity(G4int idx) const
G4int GetIndex(const G4String &matName) const
G4double GetX0density(G4int idx) const
G4IonisParamElm * GetIonisation() const
G4double GetFermiVelocity() const
G4double GetLFactor() const
G4double GetMeanExcitationEnergy() const
G4double GetMdensity() const
G4double GetX1density() const
G4double GetX0density() const
G4double GetCdensity() const
void SetDensityEffectParameters(G4double cd, G4double md, G4double ad, G4double x0, G4double x1, G4double d0)
static G4DensityEffectData * GetDensityEffectData()
G4double FindMeanExcitationEnergy(const G4Material *) const
void ComputeDensityEffectOnFly(G4bool)
G4double GetD0density() const
G4IonisParamMat(const G4Material *)
G4double GetAdensity() const
G4double GetDensityCorrection(G4double x) const
void SetMeanExcitationEnergy(G4double value)
G4double GetPressure() const
G4double GetDensity() const
const G4String & GetChemicalFormula() const
const G4ElementVector * GetElementVector() const
const G4Material * GetBaseMaterial() const
G4double GetTotNbOfAtomsPerVolume() const
G4double GetTemperature() const
const G4Element * GetElement(G4int iel) const
const G4double * GetFractionVector() const
G4double GetTotNbOfElectPerVolume() const
G4IonisParamMat * GetIonisation() const
size_t GetNumberOfElements() const
const G4double * GetAtomicNumDensityVector() const
const G4double * GetVecNbOfAtomsPerVolume() const
const G4String & GetName() const
static G4NistManager * Instance()
G4double GetNominalDensity(G4int Z) const
static G4Pow * GetInstance()
G4double logZ(G4int Z) const
G4double A23(G4double A) const