62 fMeanEnergyPerIon = 0.0;
68 fAdjustmentFactor = 1.0;
69 if (fDensityData ==
nullptr) {
72 fDensityEffectCalc =
nullptr;
75 ComputeMeanParameters();
76 ComputeDensityEffectParameters();
78 ComputeIonParameters();
85 delete fDensityEffectCalc;
86 delete[] fShellCorrectionVector;
88 fDensityData =
nullptr;
89 fShellCorrectionVector =
nullptr;
90 fDensityEffectCalc =
nullptr;
100 if (fD0density > 0.0) {
101 y = fD0density *
G4Exp(twoln10 * (x - fX0density));
104 else if (x >= fX1density) {
105 y = twoln10 * x - fCdensity;
108 y = twoln10 * x - fCdensity + fAdensity *
G4Exp(
G4Log(fX1density - x) * fMdensity);
115void G4IonisParamMat::ComputeMeanParameters()
125 fLogMeanExcEnergy = 0.;
128 if (fMeanExcitationEnergy > 0.0) {
129 fLogMeanExcEnergy =
G4Log(fMeanExcitationEnergy);
134 for (std::size_t i = 0; i < nElements; ++i) {
140 fMeanExcitationEnergy =
G4Exp(fLogMeanExcEnergy);
143 fShellCorrectionVector =
new G4double[3];
145 for (
G4int j = 0; j <= 2; ++j) {
146 fShellCorrectionVector[j] = 0.;
148 for (std::size_t k = 0; k < nElements; ++k) {
149 fShellCorrectionVector[j] +=
164void G4IonisParamMat::ComputeDensityEffectParameters()
181 static const G4double massfracmax = 0.9;
186 if (idx < 0 && 1 == nelm) {
192 if (idx >= 0 && 0 < z) {
198 corr =
G4Log(dens / density);
199 if (std::abs(corr) > corrmax) {
206 if (idx < 0 &&
nullptr != bmat) {
210 if (std::abs(corr) > corrmax) {
217 if (idx < 0 && 1 < nelm) {
219 for (
G4int i = 0; i < nelm; ++i) {
221 if (frac > massfracmax) {
225 if (idx >= 0 && dens > 0.0) {
226 corr =
G4Log(dens / density);
227 if (std::abs(corr) > corrmax) {
260 fX0density += corr / twoln10;
261 fX1density += corr / twoln10;
264 static const G4double Cd2 = 4 * CLHEP::pi * CLHEP::hbarc_squared * CLHEP::classic_electr_radius;
271 fCdensity = 1. + 2 *
G4Log(fMeanExcitationEnergy / fPlasmaEnergy);
276 static const G4double E100eV = 100. * CLHEP::eV;
277 static const G4double ClimiS[] = {3.681, 5.215};
278 static const G4double X0valS[] = {1.0, 1.5};
279 static const G4double X1valS[] = {2.0, 3.0};
281 if (fMeanExcitationEnergy < E100eV) {
288 if (fCdensity < ClimiS[icase]) {
292 fX0density = 0.326 * fCdensity - X0valS[icase];
295 fX1density = X1valS[icase];
299 if (1 == nelm && 1 == Z0) {
312 if (fCdensity <= 10.) {
315 else if (fCdensity <= 10.5) {
318 else if (fCdensity <= 11.0) {
321 else if (fCdensity <= 11.5) {
324 else if (fCdensity <= 12.25) {
327 else if (fCdensity <= 13.804) {
332 fX0density = 0.326 * fCdensity - 2.5;
337 if (1 == nelm && 1 == Z0) {
344 if (1 == nelm && 2 == Z0) {
360 G4double DensitySTP = density * STP_Pressure * Temp / (Pressure * NTP_Temperature);
364 fCdensity -= ParCorr;
365 fX0density -= ParCorr / twoln10;
366 fX1density -= ParCorr / twoln10;
370 if (0.0 == fD0density) {
372 fAdensity = twoln10 * (Xa - fX0density) / std::pow((fX1density - fX0density), fMdensity);
378void G4IonisParamMat::ComputeFluctModel()
386 fF2fluct = (Zeff > 2.) ? 2. / Zeff : 0.0;
388 fF1fluct = 1. - fF2fluct;
389 fEnergy2fluct = 10. * Zeff * Zeff * CLHEP::eV;
390 fLogEnergy2fluct =
G4Log(fEnergy2fluct);
391 fLogEnergy1fluct = (fLogMeanExcEnergy - fF2fluct * fLogEnergy2fluct) / fF1fluct;
392 fEnergy1fluct =
G4Exp(fLogEnergy1fluct);
393 fEnergy0fluct = 10. * CLHEP::eV;
394 fRateionexcfluct = 0.4;
399void G4IonisParamMat::ComputeIonParameters()
408 G4double z(0.0), vF(0.0), lF(0.0), a23(0.0);
411 if (1 == NumberOfElements) {
412 const G4Element* element = (*theElementVector)[0];
416 a23 = 1.0 / g4pow->
A23(element->
GetN());
420 for (
G4int iel = 0; iel < NumberOfElements; ++iel) {
421 const G4Element* element = (*theElementVector)[iel];
422 const G4double weight = theAtomicNumDensityVector[iel];
424 z += element->
GetZ() * weight;
427 a23 += weight / g4pow->
A23(element->
GetN());
436 fFermiEnergy = 25. * CLHEP::keV * vF * vF;
444 if (value == fMeanExcitationEnergy || value <= 0.0) {
448 G4cout <<
"G4Material: Mean excitation energy is changed for " << fMaterial->
GetName()
449 <<
" Iold= " << fMeanExcitationEnergy / CLHEP::eV <<
"eV; Inew= " << value / eV <<
" eV;"
453 fMeanExcitationEnergy = value;
457 G4double corr = 2 * (newlog - fLogMeanExcEnergy);
459 fX0density += corr / twoln10;
460 fX1density += corr / twoln10;
463 fLogMeanExcEnergy = newlog;
498 fX0density += corr / twoln10;
499 fX1density += corr / twoln10;
508 if (
nullptr == fDensityEffectCalc) {
520 delete fDensityEffectCalc;
521 fDensityEffectCalc =
nullptr;
531 if (fDensityData !=
nullptr) {
543 if (! chFormula.empty()) {
544 static const size_t numberOfMolecula = 54;
546 static const G4String name[numberOfMolecula] = {
548 "NH_3",
"C_4H_10",
"CO_2",
"C_2H_6",
"C_7H_16-Gas",
550 "C_6H_14-Gas",
"CH_4",
"NO",
"N_2O",
"C_8H_18-Gas",
552 "C_5H_12-Gas",
"C_3H_8",
"H_2O-Gas",
556 "C_3H_6O",
"C_6H_5NH_2",
"C_6H_6",
"C_4H_9OH",
"CCl_4",
558 "C_6H_5Cl",
"CHCl_3",
"C_6H_12",
"C_6H_4Cl_2",
"C_4Cl_2H_8O",
561 "C_2Cl_2H_4",
"(C_2H_5)_2O",
"C_2H_5OH",
"C_3H_5(OH)_3",
"C_7H_16",
563 "C_6H_14",
"CH_3OH",
"C_6H_5NO_2",
"C_5H_12",
"C_3H_7OH",
565 "C_5H_5N",
"C_8H_8",
"C_2Cl_4",
"C_7H_8",
"C_2Cl_3H",
571 "C_5H_5N_5",
"C_5H_5N_5O",
"(C_6H_11NO)-nylon",
"C_25H_52",
573 "(C_2H_4)-Polyethylene",
"(C_5H_8O_2)-Polymethil_Methacrylate",
575 "(C_8H_8)-Polystyrene",
"A-150-tissue",
"Al_2O_3",
"CaF_2",
577 "LiF",
"Photo_Emulsion",
"(C_2F_4)-Teflon",
"SiO_2"
581 static const G4double meanExcitation[numberOfMolecula] = {
583 53.7, 48.3, 85.0, 45.4, 49.2,
584 49.1, 41.7, 87.8, 84.9, 49.5,
587 64.2, 66.2, 63.4, 59.9, 166.3,
588 89.1, 156.0, 56.4, 106.5, 103.3,
589 111.9, 60.0, 62.9, 72.6, 54.4,
590 54.0, 67.6, 75.8, 53.6, 61.1,
591 66.2, 64.0, 159.2, 62.5, 148.1,
594 71.4, 75.0, 63.9, 48.3, 57.4,
595 74.0, 68.7, 65.1, 145.2, 166.,
596 94.0, 331.0, 99.1, 139.2
600 for (std::size_t i = 0; i < numberOfMolecula; ++i) {
601 if (chFormula == name[i]) {
602 res = meanExcitation[i] * CLHEP::eV;
std::vector< const G4Element * > G4ElementVector
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double G4Log(G4double x)
#define G4MUTEX_INITIALIZER
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 * GetShellCorrectionVector() 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
const G4double * GetAtomicNumDensityVector() const
const G4double * GetVecNbOfAtomsPerVolume() const
std::size_t GetNumberOfElements() 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