Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4MicroElecMaterialStructure Class Reference

#include <G4MicroElecMaterialStructure.hh>

Public Member Functions

 G4MicroElecMaterialStructure (const G4String &matName="")
 
virtual ~G4MicroElecMaterialStructure ()=default
 
void ReadMaterialFile ()
 
G4double Energy (G4int level)
 
G4int NumberOfLevels ()
 
G4double GetZ (G4int Shell)
 
G4double ConvertUnit (const G4String &unitName)
 
G4double GetEnergyGap ()
 
G4double GetInitialEnergy ()
 
G4int GetEADL_Enumerator (G4int shell)
 
G4double GetWorkFunction ()
 
G4String GetMaterialName ()
 
G4double GetLimitEnergy (G4int level)
 
G4double GetElasticModelLowLimit ()
 
G4double GetElasticModelHighLimit ()
 
G4double GetInelasticModelLowLimit (G4int pdg)
 
G4double GetInelasticModelHighLimit (G4int pdg)
 
G4bool IsShellWeaklyBound (G4int level)
 

Detailed Description

Definition at line 83 of file G4MicroElecMaterialStructure.hh.

Constructor & Destructor Documentation

◆ G4MicroElecMaterialStructure()

G4MicroElecMaterialStructure::G4MicroElecMaterialStructure ( const G4String matName = "")

Definition at line 81 of file G4MicroElecMaterialStructure.cc.

82{
83 materialName = matName;
84 if (matName == "Vacuum" || matName == "uum") {
85 workFunction = 0;
86 initialEnergy = 0;
87 }
88 else {
90 }
91 nLevels = (G4int)energyConstant.size();
92}
int G4int
Definition: G4Types.hh:85

◆ ~G4MicroElecMaterialStructure()

virtual G4MicroElecMaterialStructure::~G4MicroElecMaterialStructure ( )
virtualdefault

Member Function Documentation

◆ ConvertUnit()

G4double G4MicroElecMaterialStructure::ConvertUnit ( const G4String unitName)

Definition at line 243 of file G4MicroElecMaterialStructure.cc.

244{
245 G4double unitValue = 0;
246 if(unitName == "meV")
247 {
248 unitValue = 1e-3 * CLHEP::eV;
249 }
250 else if(unitName == "eV")
251 {
252 unitValue = CLHEP::eV;
253 }
254 else if(unitName == "keV")
255 {
256 unitValue = CLHEP::keV;
257 }
258 else if(unitName == "MeV")
259 {
260 unitValue = CLHEP::MeV;
261 }
262 else if(unitName == "noUnit")
263 {
264 unitValue = 1;
265 }
266
267 return unitValue;
268}
double G4double
Definition: G4Types.hh:83

Referenced by ReadMaterialFile().

◆ Energy()

G4double G4MicroElecMaterialStructure::Energy ( G4int  level)

Definition at line 216 of file G4MicroElecMaterialStructure.cc.

217{
218 return (level >= 0 && level < nLevels) ? energyConstant[level] : 0.0;
219}

Referenced by G4MicroElecInelasticModel_new::CrossSectionPerVolume(), and G4MicroElecInelasticModel_new::SampleSecondaries().

◆ GetEADL_Enumerator()

G4int G4MicroElecMaterialStructure::GetEADL_Enumerator ( G4int  shell)
inline

Definition at line 96 of file G4MicroElecMaterialStructure.hh.

96{ return EADL_Enumerator[shell]; };

Referenced by G4MicroElecInelasticModel_new::SampleSecondaries().

◆ GetElasticModelHighLimit()

G4double G4MicroElecMaterialStructure::GetElasticModelHighLimit ( )
inline

Definition at line 101 of file G4MicroElecMaterialStructure.hh.

101{ return limitElastic[1]; }

Referenced by G4MicroElecElasticModel_new::Initialise().

◆ GetElasticModelLowLimit()

G4double G4MicroElecMaterialStructure::GetElasticModelLowLimit ( )
inline

Definition at line 100 of file G4MicroElecMaterialStructure.hh.

100{return limitElastic[0];}

Referenced by G4MicroElecElasticModel_new::Initialise().

◆ GetEnergyGap()

G4double G4MicroElecMaterialStructure::GetEnergyGap ( )
inline

Definition at line 94 of file G4MicroElecMaterialStructure.hh.

94{ return energyGap; }

Referenced by G4MicroElecInelasticModel_new::SampleSecondaries().

◆ GetInelasticModelHighLimit()

G4double G4MicroElecMaterialStructure::GetInelasticModelHighLimit ( G4int  pdg)

Definition at line 297 of file G4MicroElecMaterialStructure.cc.

298{
299 G4double res = 0.0;
300 if(pdg == 11)
301 {
302 res = limitInelastic[1];
303 }
304 else if(pdg == 2212)
305 {
306 res = limitInelastic[3];
307 }
308 return res;
309}

Referenced by G4MicroElecInelasticModel_new::CrossSectionPerVolume(), and G4MicroElecInelasticModel_new::SampleSecondaries().

◆ GetInelasticModelLowLimit()

G4double G4MicroElecMaterialStructure::GetInelasticModelLowLimit ( G4int  pdg)

Definition at line 281 of file G4MicroElecMaterialStructure.cc.

282{
283 G4double res = 0.0;
284 if(pdg == 11)
285 {
286 res = limitInelastic[0];
287 }
288 else if(pdg == 2212)
289 {
290 res = limitInelastic[2];
291 }
292 return res;
293}

Referenced by G4MicroElecInelasticModel_new::CrossSectionPerVolume(), and G4MicroElecInelasticModel_new::SampleSecondaries().

◆ GetInitialEnergy()

G4double G4MicroElecMaterialStructure::GetInitialEnergy ( )
inline

Definition at line 95 of file G4MicroElecMaterialStructure.hh.

95{ return initialEnergy; }

◆ GetLimitEnergy()

G4double G4MicroElecMaterialStructure::GetLimitEnergy ( G4int  level)

Definition at line 272 of file G4MicroElecMaterialStructure.cc.

273{
274 G4double E = LimitEnergy[level];
275 if (IsShellWeaklyBound(level)) { E = energyGap+ initialEnergy; }
276 return E;
277}

Referenced by G4MicroElecInelasticModel_new::DifferentialCrossSection(), and G4MicroElecInelasticModel_new::SampleSecondaries().

◆ GetMaterialName()

G4String G4MicroElecMaterialStructure::GetMaterialName ( )
inline

Definition at line 98 of file G4MicroElecMaterialStructure.hh.

98{ return materialName; };

◆ GetWorkFunction()

G4double G4MicroElecMaterialStructure::GetWorkFunction ( )
inline

Definition at line 97 of file G4MicroElecMaterialStructure.hh.

97{ return workFunction; };

Referenced by G4MicroElecSurface::BuildPhysicsTable(), and G4MicroElecElasticModel_new::Initialise().

◆ GetZ()

G4double G4MicroElecMaterialStructure::GetZ ( G4int  Shell)

Definition at line 223 of file G4MicroElecMaterialStructure.cc.

224{
225 if (Shell >= 0 && Shell < nLevels) {
226 if(!isCompound)
227 {
228 return Z;
229 }
230 else
231 {
232 return compoundShellZ[Shell];
233 }
234 }
235 else
236 {
237 return 0;
238 }
239}

Referenced by G4MicroElecInelasticModel_new::SampleSecondaries().

◆ IsShellWeaklyBound()

G4bool G4MicroElecMaterialStructure::IsShellWeaklyBound ( G4int  level)

Definition at line 313 of file G4MicroElecMaterialStructure.cc.

314{
315 return isShellWeaklyBoundVector[level];
316}

Referenced by GetLimitEnergy(), and G4MicroElecInelasticModel_new::SampleSecondaries().

◆ NumberOfLevels()

G4int G4MicroElecMaterialStructure::NumberOfLevels ( )
inline

◆ ReadMaterialFile()

void G4MicroElecMaterialStructure::ReadMaterialFile ( )

Definition at line 96 of file G4MicroElecMaterialStructure.cc.

97{
98 const char* path = G4FindDataDir("G4LEDATA");
99
100 if (materialName[0] == 'G' && materialName[1] == '4') {
101 //in the case the NIST database is used
102 materialName.erase(0, 1);
103 materialName.erase(0, 1);
104 materialName.erase(0, 1);
105 }
106
107 std::ostringstream fileName;
108 fileName << path << "/microelec/Structure/Data_" + materialName + ".dat";
109 std::ifstream fichier(fileName.str().c_str());
110
111 int varLength = 0;
112 G4String nameParameter;
113
114 G4String unitName;
115 G4double unitValue;
116 G4double data;
117 G4String filler;
118 G4String type;
119
120 if (fichier)
121 {
122 fichier >> filler >> type;
123 materialName = filler;
124 if (type == "Compound") {isCompound = true; Z = 0; }
125 else { isCompound = false; Z = std::stoi(type); }
126 while(!fichier.eof()) {
127
128 getline(fichier, filler);
129 std::stringstream line(filler);
130
131 if (filler[0] == '#' || filler.empty()) {continue;}
132
133 line >> varLength;
134 line >> nameParameter;
135 line >> unitName;
136 unitValue = ConvertUnit(unitName);
137
138 for (int i = 0; i < varLength; i++)
139 {
140 line >> data; data = data*unitValue;
141
142 if(nameParameter == "WorkFunction")
143 {
144 workFunction = data;
145 }
146 if(nameParameter == "EnergyGap")
147 {
148 energyGap = data;
149 }
150
151 if(nameParameter == "EnergyPeak")
152 {
153 energyConstant.push_back(data);
154 }
155 if(nameParameter == "EnergyLimit")
156 {
157 LimitEnergy.push_back(data);
158 }
159 if(nameParameter == "EADL")
160 {
161 EADL_Enumerator.push_back(data);
162 }
163
164 if (nameParameter == "WeaklyBoundShell")
165 {if (data == 0) { isShellWeaklyBoundVector.push_back(false); }
166 else {isShellWeaklyBoundVector.push_back(true);}}
167
168 if(nameParameter == "WeaklyBoundInitialEnergy")
169 {
170 initialEnergy = data;
171 }
172
173 if(nameParameter == "ShellAtomicNumber")
174 {
175 compoundShellZ.push_back(data);
176 }
177
178 if(nameParameter == "DielectricModelLowEnergyLimit_e")
179 {
180 limitInelastic[0] = data;
181 }
182 if(nameParameter == "DielectricModelHighEnergyLimit_e")
183 {
184 limitInelastic[1] = data;
185 }
186 if(nameParameter == "DielectricModelLowEnergyLimit_p")
187 {
188 limitInelastic[2] = data;
189 }
190 if(nameParameter == "DielectricModelHighEnergyLimit_p")
191 {
192 limitInelastic[3] = data;
193 }
194
195 if(nameParameter == "ElasticModelLowEnergyLimit")
196 {
197 limitElastic[0] = data;
198 }
199 if(nameParameter == "ElasticModelHighEnergyLimit")
200 {
201 limitElastic[1] = data;
202 }
203 }
204 }
205 fichier.close(); // on ferme le fichier
206 }
207 else {
208 G4String str = "file ";
209 str += fileName.str() + " not found!";
210 G4Exception("G4MicroElecMaterialStructure::ReadMaterialFile", "em0002", FatalException, str);
211 }
212}
const char * G4FindDataDir(const char *)
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:59
G4double ConvertUnit(const G4String &unitName)

Referenced by G4MicroElecMaterialStructure().


The documentation for this class was generated from the following files: