Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4MicroElecMaterialStructure.cc
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27// G4MicroElecMaterialStructure.cc, 2011/08/29 A.Valentin, M. Raine are with CEA [a]
28// 2020/05/20 P. Caron, C. Inguimbert are with ONERA [b]
29// Q. Gibaru is with CEA [a], ONERA [b] and CNES [c]
30// M. Raine and D. Lambert are with CEA [a]
31//
32// A part of this work has been funded by the French space agency(CNES[c])
33// [a] CEA, DAM, DIF - 91297 ARPAJON, France
34// [b] ONERA - DPHY, 2 avenue E.Belin, 31055 Toulouse, France
35// [c] CNES, 18 av.E.Belin, 31401 Toulouse CEDEX, France
36//
37// Based on the following publications
38// - A.Valentin, M. Raine,
39// Inelastic cross-sections of low energy electrons in silicon
40// for the simulation of heavy ion tracks with the Geant4-DNA toolkit,
41// NSS Conf. Record 2010, pp. 80-85
42// https://doi.org/10.1109/NSSMIC.2010.5873720
43//
44// - A.Valentin, M. Raine, M.Gaillardin, P.Paillet
45// Geant4 physics processes for microdosimetry simulation:
46// very low energy electromagnetic models for electrons in Silicon,
47// https://doi.org/10.1016/j.nimb.2012.06.007
48// NIM B, vol. 288, pp. 66-73, 2012, part A
49// heavy ions in Si, NIM B, vol. 287, pp. 124-129, 2012, part B
50// https://doi.org/10.1016/j.nimb.2012.07.028
51//
52// - M. Raine, M. Gaillardin, P. Paillet
53// Geant4 physics processes for silicon microdosimetry simulation:
54// Improvements and extension of the energy-range validity up to 10 GeV/nucleon
55// NIM B, vol. 325, pp. 97-100, 2014
56// https://doi.org/10.1016/j.nimb.2014.01.014
57//
58// - J. Pierron, C. Inguimbert, M. Belhaj, T. Gineste, J. Puech, M. Raine
59// Electron emission yield for low energy electrons:
60// Monte Carlo simulation and experimental comparison for Al, Ag, and Si
61// Journal of Applied Physics 121 (2017) 215107.
62// https://doi.org/10.1063/1.4984761
63//
64// - P. Caron,
65// Study of Electron-Induced Single-Event Upset in Integrated Memory Devices
66// PHD, 16th October 2019
67//
68// - Q.Gibaru, C.Inguimbert, P.Caron, M.Raine, D.Lambert, J.Puech,
69// Geant4 physics processes for microdosimetry and secondary electron emission simulation :
70// Extension of MicroElec to very low energies and new materials
71// NIM B, 2020, in review.
72//
73//
74//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
75
77#include "G4SystemOfUnits.hh"
78
79//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
80
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}
93
94//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
95
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}
213
214//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
215
217{
218 return (level >= 0 && level < nLevels) ? energyConstant[level] : 0.0;
219}
220
221//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
222
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}
240
241//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
242
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}
269
270//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
271
273{
274 G4double E = LimitEnergy[level];
275 if (IsShellWeaklyBound(level)) { E = energyGap+ initialEnergy; }
276 return E;
277}
278
279//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
280
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}
294
295//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
296
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}
310
311//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
312
314{
315 return isShellWeaklyBoundVector[level];
316}
317
318//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
319
const char * G4FindDataDir(const char *)
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:59
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
G4double ConvertUnit(const G4String &unitName)
G4MicroElecMaterialStructure(const G4String &matName="")