#include <G4DensityEffectCalculator.hh>
◆ G4DensityEffectCalculator()
G4DensityEffectCalculator::G4DensityEffectCalculator |
( |
const G4Material * | mat, |
|
|
G4int | n ) |
Definition at line 57 of file G4DensityEffectCalculator.cc.
58 : fMaterial(mat), nlev(n)
59{
61
66 for (
G4int i = 0; i < nlev; ++i) {
67 sternf[i] = 0.0;
68 levE[i] = 0.0;
69 sternl[i] = 0.0;
70 sternEbar[i] = 0.0;
71 }
72
73 fConductivity = sternx = 0.0;
75
80
81
82
83
84
85
86
90 for (
G4int i = 0; i < nshell; ++i) {
91
92
94 if (i < nshell - 1 || ! conductor) {
95 sternf[sh] += xx;
96 }
97 else {
98 fConductivity += xx;
99 }
101 ++sh;
102 }
103 }
104 for (
G4int i = 0; i < nlev; ++i) {
105 sum += sternf[i];
106 }
107 sum += fConductivity;
108
109 const G4double invsum = (sum > 0.0) ? 1. / sum : 0.0;
110 for (
G4int i = 0; i < nlev; ++i) {
111 sternf[i] *= invsum;
112 }
113 fConductivity *= invsum;
116}
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
const G4double * GetVecNbOfAtomsPerVolume() const
std::size_t GetNumberOfElements() const
static G4NistManager * Instance()
◆ ~G4DensityEffectCalculator()
G4DensityEffectCalculator::~G4DensityEffectCalculator |
( |
| ) |
|
Definition at line 118 of file G4DensityEffectCalculator.cc.
119{
120 delete[] sternf;
121 delete[] levE;
122 delete[] sternl;
123 delete[] sternEbar;
124}
◆ ComputeDensityCorrection()
Definition at line 126 of file G4DensityEffectCalculator.cc.
127{
128 if (fVerbose > 1) {
129 G4cout <<
"G4DensityEffectCalculator::ComputeDensityCorrection for " << fMaterial->
GetName()
130 <<
", x= " << x <<
G4endl;
131 }
133 const G4double exact = FermiDeltaCalculation(x);
134
135 if (fVerbose > 1) {
136 G4cout <<
" Delta: computed= " << exact <<
", parametrized= " << approx <<
G4endl;
137 }
138 if (approx >= 0. && exact < 0.) {
139 if (fVerbose > 0) {
140 ++fWarnings;
143 ed <<
"Sternheimer fit failed for " << fMaterial->
GetName() <<
", x = " << x
144 << ": Delta exact= " << exact << ", approx= " << approx;
146 }
147 }
148 return approx;
149 }
150
151
152
153
154
155 if (approx >= 0. && std::abs(exact - approx) > 1.) {
156 if (fVerbose > 0) {
157 ++fWarnings;
160 ed << "Sternheimer exact= " << exact << " and approx= " << approx
161 <<
" are too different for " << fMaterial->
GetName() <<
", x = " << x;
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
const G4String & GetName() const
Referenced by G4IonisParamMat::DensityCorrection().
The documentation for this class was generated from the following files: