63 fMeanEnergyPerIon = 0.0;
69 fAdjustmentFactor = 1.0;
71 fDensityEffectCalc =
nullptr;
74 ComputeMeanParameters();
75 ComputeDensityEffectParameters();
77 ComputeIonParameters();
86 : fMaterial(nullptr), fShellCorrectionVector(nullptr)
88 fMeanExcitationEnergy = 0.0;
89 fLogMeanExcEnergy = 0.0;
98 fAdjustmentFactor = 0.0;
102 fLogEnergy1fluct = 0.0;
104 fLogEnergy2fluct = 0.0;
106 fRateionexcfluct = 0.0;
112 fMeanEnergyPerIon = 0.0;
115 fDensityEffectCalc =
nullptr;
123 delete fDensityEffectCalc;
124 delete [] fShellCorrectionVector;
126 fDensityData =
nullptr;
127 fShellCorrectionVector =
nullptr;
128 fDensityEffectCalc =
nullptr;
133void G4IonisParamMat::ComputeMeanParameters()
138 fMeanExcitationEnergy = 0.;
139 fLogMeanExcEnergy = 0.;
148 if(fMeanExcitationEnergy > 0.0) {
149 fLogMeanExcEnergy =
G4Log(fMeanExcitationEnergy);
153 for (
size_t i=0; i < nElements; i++) {
155 fLogMeanExcEnergy += nAtomsPerVolume[i]*elm->
GetZ()
159 fMeanExcitationEnergy =
G4Exp(fLogMeanExcEnergy);
162 fShellCorrectionVector =
new G4double[3];
164 for (
G4int j=0; j<=2; j++)
166 fShellCorrectionVector[j] = 0.;
168 for (
size_t k=0; k<nElements; k++) {
169 fShellCorrectionVector[j] += nAtomsPerVolume[k]
170 *(((*elmVector)[k])->GetIonisation()->GetShellCorrectionVector())[j];
193void G4IonisParamMat::ComputeDensityEffectParameters()
209 static const G4double massfracmax = 0.9;
214 if(idx < 0 && 1 == nelm) {
221 if(dens <= 0.0) { idx = -1; }
225 if(std::abs(corr) > corrmax) { idx = -1; }
229 if(idx < 0 && bmat) {
233 if(std::abs(corr) > corrmax) { idx = -1; }
238 if(idx < 0 && 1 < nelm) {
240 for(
G4int i=0; i<nelm; ++i) {
242 if(frac > massfracmax) {
246 if(idx >= 0 && dens > 0.0) {
248 if(std::abs(corr) > corrmax) { idx = -1; }
279 fX0density += corr/twoln10;
280 fX1density += corr/twoln10;
284 static const G4double Cd2 = 4*
pi*hbarc_squared*classic_electr_radius;
291 fCdensity = 1. + 2*
G4Log(fMeanExcitationEnergy/fPlasmaEnergy);
297 static const G4double E100eV = 100.*eV;
298 static const G4double ClimiS[] = {3.681 , 5.215 };
299 static const G4double X0valS[] = {1.0 , 1.5 };
300 static const G4double X1valS[] = {2.0 , 3.0 };
302 if(fMeanExcitationEnergy < E100eV) { icase = 0; }
305 if(fCdensity < ClimiS[icase]) { fX0density = 0.2; }
306 else { fX0density = 0.326*fCdensity - X0valS[icase]; }
308 fX1density = X1valS[icase]; fMdensity = 3.0;
311 if (1 == nelm && 1 == Z0) {
312 fX0density = 0.425; fX1density = 2.0; fMdensity = 5.949;
320 if(fCdensity < 10.) {
322 }
else if(fCdensity < 11.5) {
323 fX0density = 1.6 + 0.2*(fCdensity - 10.);
324 }
else if(fCdensity < 12.25) {
325 fX0density = 1.9 + (fCdensity - 11.5)/7.5;
326 }
else if(fCdensity < 13.804) {
328 fX1density = 4.0 + (fCdensity - 12.25)/1.554;
330 fX0density = 0.326*fCdensity-2.5; fX1density = 5.0;
334 if (1 == nelm && 1 == Z0) {
335 fX0density = 1.837; fX1density = 3.0; fMdensity = 4.754;
339 if (1 == nelm && 2 == Z0) {
340 fX0density = 2.191; fX1density = 3.0; fMdensity = 3.297;
354 G4double DensitySTP = Density*STP_Pressure*Temp/(Pressure*NTP_Temperature);
358 fCdensity -= ParCorr;
359 fX0density -= ParCorr/twoln10;
360 fX1density -= ParCorr/twoln10;
364 if(0.0 == fD0density) {
366 fAdensity = twoln10*(Xa-fX0density)
367 /std::pow((fX1density-fX0density),fMdensity);
386void G4IonisParamMat::ComputeFluctModel()
395 fF2fluct = (Zeff > 2.) ? 2./Zeff : 0.0;
397 fF1fluct = 1. - fF2fluct;
398 fEnergy2fluct = 10.*Zeff*Zeff*eV;
399 fLogEnergy2fluct =
G4Log(fEnergy2fluct);
400 fLogEnergy1fluct = (fLogMeanExcEnergy - fF2fluct*fLogEnergy2fluct)
402 fEnergy1fluct =
G4Exp(fLogEnergy1fluct);
403 fEnergy0fluct = 10.*eV;
404 fRateionexcfluct = 0.4;
409void G4IonisParamMat::ComputeIonParameters()
413 const G4double* theAtomicNumDensityVector =
419 G4double z(0.0), vF(0.0), lF(0.0), a23(0.0);
422 if( 1 == NumberOfElements ) {
423 const G4Element* element = (*theElementVector)[0];
427 a23 = 1.0/g4pow->
A23(element->
GetN());
431 for (
G4int iel=0; iel<NumberOfElements; ++iel) {
432 const G4Element* element = (*theElementVector)[iel];
433 const G4double weight = theAtomicNumDensityVector[iel];
435 z += element->
GetZ() * weight;
438 a23 += weight/g4pow->
A23(element->
GetN());
447 fFermiEnergy = 25.*keV*vF*vF;
455 if(value == fMeanExcitationEnergy || value <= 0.0) {
return; }
457 G4cout <<
"G4Material: Mean excitation energy is changed for "
459 <<
" Iold= " << fMeanExcitationEnergy/eV
460 <<
"eV; Inew= " << value/eV <<
" eV;"
464 fMeanExcitationEnergy = value;
468 G4double corr = 2*(newlog - fLogMeanExcEnergy);
470 fX0density += corr/twoln10;
471 fX1density += corr/twoln10;
474 fLogMeanExcEnergy = newlog;
485#ifdef G4MULTITHREADED
494#ifdef G4MULTITHREADED
503#ifdef G4MULTITHREADED
516 fX0density += corr/twoln10;
517 fX1density += corr/twoln10;
518#ifdef G4MULTITHREADED
528 if(!fDensityEffectCalc) {
539 delete fDensityEffectCalc;
540 fDensityEffectCalc =
nullptr;
562 if(chFormula !=
"") {
564 static const size_t numberOfMolecula = 54;
565 static const G4String name[numberOfMolecula] = {
567 "NH_3",
"C_4H_10",
"CO_2",
"C_2H_6",
"C_7H_16-Gas",
569 "C_6H_14-Gas",
"CH_4",
"NO",
"N_2O",
"C_8H_18-Gas",
571 "C_5H_12-Gas",
"C_3H_8",
"H_2O-Gas",
575 "C_3H_6O",
"C_6H_5NH_2",
"C_6H_6",
"C_4H_9OH",
"CCl_4",
577 "C_6H_5Cl",
"CHCl_3",
"C_6H_12",
"C_6H_4Cl_2",
"C_4Cl_2H_8O",
580 "C_2Cl_2H_4",
"(C_2H_5)_2O",
"C_2H_5OH",
"C_3H_5(OH)_3",
"C_7H_16",
582 "C_6H_14",
"CH_3OH",
"C_6H_5NO_2",
"C_5H_12",
"C_3H_7OH",
584 "C_5H_5N",
"C_8H_8",
"C_2Cl_4",
"C_7H_8",
"C_2Cl_3H",
590 "C_5H_5N_5",
"C_5H_5N_5O",
"(C_6H_11NO)-nylon",
"C_25H_52",
592 "(C_2H_4)-Polyethylene",
"(C_5H_8O_2)-Polymethil_Methacrylate",
594 "(C_8H_8)-Polystyrene",
"A-150-tissue",
"Al_2O_3",
"CaF_2",
596 "LiF",
"Photo_Emulsion",
"(C_2F_4)-Teflon",
"SiO_2"
600 static const G4double meanExcitation[numberOfMolecula] = {
602 53.7, 48.3, 85.0, 45.4, 49.2,
603 49.1, 41.7, 87.8, 84.9, 49.5,
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,
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
618 for(
size_t i=0; i<numberOfMolecula; i++) {
619 if(chFormula == name[i]) {
620 res = meanExcitation[i]*eV;
std::vector< 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 ComputeDensityCorrection(G4double x)
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
G4double GetMeanIonisationPotential(G4int idx) const
G4double GetX1density(G4int idx) const
G4int GetElementIndex(G4int Z, G4State mState) 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
G4double GetDensityCorrection(G4double x)
void SetDensityEffectParameters(G4double cd, G4double md, G4double ad, G4double x0, G4double x1, G4double d0)
static G4DensityEffectData * GetDensityEffectData()
G4double DensityCorrection(G4double x)
G4double FindMeanExcitationEnergy(const G4Material *) const
void ComputeDensityEffectOnFly(G4bool)
G4double GetD0density() const
G4IonisParamMat(const G4Material *)
G4double GetAdensity() 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