#include <G4DensityEffectCalculator.hh>
◆ G4DensityEffectCalculator()
G4DensityEffectCalculator::G4DensityEffectCalculator |
( |
const G4Material * |
mat, |
|
|
G4int |
n |
|
) |
| |
Definition at line 56 of file G4DensityEffectCalculator.cc.
57 : fMaterial(mat), fVerbose(0), fWarnings(0), nlev(n)
58{
60
65 for(
G4int i=0; i<nlev; ++i) {
66 sternf[i] = 0.0;
67 levE[i] = 0.0;
68 sternl[i] = 0.0;
69 sternEbar[i] = 0.0;
70 }
71
72 fConductivity = sternx = 0.0;
74
79
80
81
82
83
84
85
89 for(
G4int i = 0; i < nshell; ++i) {
90
91
93 if(i < nshell-1 || !conductor) {
94 sternf[sh] += xx;
95 } else {
96 fConductivity += xx;
97 }
99 ++sh;
100 }
101 }
102 for(
G4int i=0; i<nlev; ++i) {
103 sum += sternf[i];
104 }
105 sum = (sum > 0.0) ? 1./sum : 0.0;
106 for(
G4int i=0; i<nlev; ++i) {
107 sternf[i] *= sum;
108 }
111}
static G4int GetNumberOfElectrons(G4int Z, G4int SubshellNb)
static G4double GetBindingEnergy(G4int Z, G4int SubshellNb)
static G4int GetNumberOfShells(G4int Z)
G4double GetMeanExcitationEnergy() const
G4double GetPlasmaEnergy() const
G4double GetTotNbOfAtomsPerVolume() const
const G4Element * GetElement(G4int iel) const
G4IonisParamMat * GetIonisation() const
G4double GetFreeElectronDensity() const
size_t GetNumberOfElements() const
const G4double * GetVecNbOfAtomsPerVolume() const
static G4NistManager * Instance()
◆ ~G4DensityEffectCalculator()
G4DensityEffectCalculator::~G4DensityEffectCalculator |
( |
| ) |
|
Definition at line 113 of file G4DensityEffectCalculator.cc.
114{
115 delete [] sternf;
116 delete [] levE;
117 delete [] sternl;
118 delete [] sternEbar;
119}
◆ ComputeDensityCorrection()
Definition at line 121 of file G4DensityEffectCalculator.cc.
122{
123 if(fVerbose > 1) {
124 G4cout <<
"G4DensityEffectCalculator::ComputeDensityCorrection for "
126 }
128 const G4double exact = FermiDeltaCalculation(x);
129
130 if(fVerbose > 1) {
131 G4cout <<
" Delta: computed= " << exact
132 <<
", parametrized= " << approx <<
G4endl;
133 }
134 if(approx > 0. && exact < 0.) {
135 if(fVerbose > 0) {
136 ++fWarnings;
139 ed <<
"Sternheimer fit failed for " << fMaterial->
GetName()
140 << ", x = " << x << ": Delta exact= "
141 << exact << ", approx= " << approx;
142 G4Exception(
"G4DensityEffectCalculator::DensityCorrection",
"mat008",
144 }
145 }
146 return approx;
147 }
148
149
150
151
152
153 if(approx >= 0. && std::abs(exact - approx) > 1.) {
154 if(fVerbose > 0) {
155 ++fWarnings;
158 ed << "Sternheimer exact= " << exact << " and approx= "
159 << approx << " are too different for "
160 << fMaterial->
GetName() <<
", x = " << x;
161 G4Exception(
"G4DensityEffectCalculator::DensityCorrection",
"mat008",
163 }
164 }
165 return approx;
166 }
167 return exact;
168}
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4GLOB_DLL std::ostream G4cout
G4double GetDensityCorrection(G4double x)
const G4String & GetName() const
Referenced by G4IonisParamMat::DensityCorrection().
The documentation for this class was generated from the following files: