Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // 26 // 26 // 27 // G4MicroElecMaterialStructure.cc, 2011/08/29 27 // G4MicroElecMaterialStructure.cc, 2011/08/29 A.Valentin, M. Raine are with CEA [a] 28 // 2020/05/20 P. Caro 28 // 2020/05/20 P. Caron, C. Inguimbert are with ONERA [b] 29 // Q. Gibaru is with CEA [a] 29 // Q. Gibaru is with CEA [a], ONERA [b] and CNES [c] 30 // M. Raine and D. Lambert 30 // M. Raine and D. Lambert are with CEA [a] 31 // 31 // 32 // A part of this work has been funded by the 32 // A part of this work has been funded by the French space agency(CNES[c]) 33 // [a] CEA, DAM, DIF - 91297 ARPAJON, France 33 // [a] CEA, DAM, DIF - 91297 ARPAJON, France 34 // [b] ONERA - DPHY, 2 avenue E.Belin, 31055 T 34 // [b] ONERA - DPHY, 2 avenue E.Belin, 31055 Toulouse, France 35 // [c] CNES, 18 av.E.Belin, 31401 Toulouse CED 35 // [c] CNES, 18 av.E.Belin, 31401 Toulouse CEDEX, France 36 // 36 // 37 // Based on the following publications 37 // Based on the following publications 38 // - A.Valentin, M. Raine, 38 // - A.Valentin, M. Raine, 39 // Inelastic cross-sections of low energy e 39 // Inelastic cross-sections of low energy electrons in silicon 40 // for the simulation of heavy ion trac 40 // for the simulation of heavy ion tracks with the Geant4-DNA toolkit, 41 // NSS Conf. Record 2010, pp. 80-85 41 // NSS Conf. Record 2010, pp. 80-85 42 // https://doi.org/10.1109/NSSMIC. 42 // https://doi.org/10.1109/NSSMIC.2010.5873720 43 // 43 // 44 // - A.Valentin, M. Raine, M.Gaillardin, 44 // - A.Valentin, M. Raine, M.Gaillardin, P.Paillet 45 // Geant4 physics processes for microdo 45 // Geant4 physics processes for microdosimetry simulation: 46 // very low energy electromagnetic mode 46 // very low energy electromagnetic models for electrons in Silicon, 47 // https://doi.org/10.1016/j.nimb. 47 // https://doi.org/10.1016/j.nimb.2012.06.007 48 // NIM B, vol. 288, pp. 66-73, 2012, pa 48 // NIM B, vol. 288, pp. 66-73, 2012, part A 49 // heavy ions in Si, NIM B, vol. 287, p 49 // heavy ions in Si, NIM B, vol. 287, pp. 124-129, 2012, part B 50 // https://doi.org/10.1016/j.nimb. 50 // https://doi.org/10.1016/j.nimb.2012.07.028 51 // 51 // 52 // - M. Raine, M. Gaillardin, P. Paillet 52 // - M. Raine, M. Gaillardin, P. Paillet 53 // Geant4 physics processes for silicon 53 // Geant4 physics processes for silicon microdosimetry simulation: 54 // Improvements and extension of the en 54 // Improvements and extension of the energy-range validity up to 10 GeV/nucleon 55 // NIM B, vol. 325, pp. 97-100, 2014 55 // NIM B, vol. 325, pp. 97-100, 2014 56 // https://doi.org/10.1016/j.nimb. 56 // https://doi.org/10.1016/j.nimb.2014.01.014 57 // 57 // 58 // - J. Pierron, C. Inguimbert, M. Belhaj 58 // - J. Pierron, C. Inguimbert, M. Belhaj, T. Gineste, J. Puech, M. Raine 59 // Electron emission yield for low ener 59 // Electron emission yield for low energy electrons: 60 // Monte Carlo simulation and experimen 60 // Monte Carlo simulation and experimental comparison for Al, Ag, and Si 61 // Journal of Applied Physics 121 (2017 61 // Journal of Applied Physics 121 (2017) 215107. 62 // https://doi.org/10.1063/1.498 62 // https://doi.org/10.1063/1.4984761 63 // 63 // 64 // - P. Caron, 64 // - P. Caron, 65 // Study of Electron-Induced Single-Eve 65 // Study of Electron-Induced Single-Event Upset in Integrated Memory Devices 66 // PHD, 16th October 2019 66 // PHD, 16th October 2019 67 // 67 // 68 // - Q.Gibaru, C.Inguimbert, P.Caron, M.Raine 68 // - Q.Gibaru, C.Inguimbert, P.Caron, M.Raine, D.Lambert, J.Puech, 69 // Geant4 physics processes for microdo 69 // Geant4 physics processes for microdosimetry and secondary electron emission simulation : 70 // Extension of MicroElec to very low e 70 // Extension of MicroElec to very low energies and new materials 71 // NIM B, 2020, in review. 71 // NIM B, 2020, in review. 72 // 72 // 73 // 73 // 74 //....oooOO0OOooo........oooOO0OOooo........oo 74 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 75 75 76 #include "G4MicroElecMaterialStructure.hh" 76 #include "G4MicroElecMaterialStructure.hh" 77 #include "G4EnvironmentUtils.hh" << 78 #include "G4SystemOfUnits.hh" 77 #include "G4SystemOfUnits.hh" 79 78 80 //....oooOO0OOooo........oooOO0OOooo........oo 79 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 81 80 82 G4MicroElecMaterialStructure::G4MicroElecMater 81 G4MicroElecMaterialStructure::G4MicroElecMaterialStructure(const G4String& matName) 83 { 82 { 84 materialName = matName; 83 materialName = matName; 85 if (matName == "Vacuum" || matName == "uum") 84 if (matName == "Vacuum" || matName == "uum") { 86 workFunction = 0; 85 workFunction = 0; 87 initialEnergy = 0; 86 initialEnergy = 0; 88 } 87 } 89 else { 88 else { 90 ReadMaterialFile(); 89 ReadMaterialFile(); 91 } 90 } 92 nLevels = (G4int)energyConstant.size(); << 91 nLevels = energyConstant.size(); 93 } 92 } 94 93 >> 94 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... >> 95 >> 96 G4MicroElecMaterialStructure::~G4MicroElecMaterialStructure() >> 97 {} 95 98 96 //....oooOO0OOooo........oooOO0OOooo........oo 99 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... >> 100 97 void G4MicroElecMaterialStructure::ReadMateria 101 void G4MicroElecMaterialStructure::ReadMaterialFile() 98 { 102 { 99 const char* path = G4FindDataDir("G4LEDATA") << 103 char *path = std::getenv("G4LEDATA"); 100 << 104 101 if (materialName[0] == 'G' && materialName[1 << 105 if (materialName(0) == 'G' && materialName(1) == '4') { 102 //in the case the NIST database is used 106 //in the case the NIST database is used 103 materialName.erase(0, 1); 107 materialName.erase(0, 1); 104 materialName.erase(0, 1); 108 materialName.erase(0, 1); 105 materialName.erase(0, 1); 109 materialName.erase(0, 1); 106 } 110 } 107 111 108 std::ostringstream fileName; 112 std::ostringstream fileName; 109 fileName << path << "/microelec/Structure/Da 113 fileName << path << "/microelec/Structure/Data_" + materialName + ".dat"; 110 std::ifstream fichier(fileName.str().c_str() 114 std::ifstream fichier(fileName.str().c_str()); 111 115 112 int varLength = 0; 116 int varLength = 0; 113 G4String nameParameter; 117 G4String nameParameter; 114 118 115 G4String unitName; 119 G4String unitName; 116 G4double unitValue; 120 G4double unitValue; 117 G4double data; 121 G4double data; 118 G4String filler; 122 G4String filler; 119 G4String type; 123 G4String type; 120 124 121 if (fichier) 125 if (fichier) 122 { 126 { 123 fichier >> filler >> type; 127 fichier >> filler >> type; 124 materialName = filler; 128 materialName = filler; 125 if (type == "Compound") {isCompound = tr 129 if (type == "Compound") {isCompound = true; Z = 0; } 126 else { isCompound = false; Z = std::stoi 130 else { isCompound = false; Z = std::stoi(type); } 127 while(!fichier.eof()) { 131 while(!fichier.eof()) { 128 132 129 getline(fichier, filler); 133 getline(fichier, filler); 130 std::stringstream line(filler); 134 std::stringstream line(filler); 131 135 132 if (filler[0] == '#' || filler.empty()) {con << 136 if (filler(0) == '#' || filler.empty()) {continue;} 133 137 134 line >> varLength; 138 line >> varLength; 135 line >> nameParameter; 139 line >> nameParameter; 136 line >> unitName; 140 line >> unitName; 137 unitValue = ConvertUnit(unitName); 141 unitValue = ConvertUnit(unitName); 138 142 139 for (int i = 0; i < varLength; i++) 143 for (int i = 0; i < varLength; i++) 140 { 144 { 141 line >> data; data = data*unitValue; 145 line >> data; data = data*unitValue; 142 << 146 143 if(nameParameter == "WorkFunction") << 147 if (nameParameter == "WorkFunction") workFunction = data; 144 { << 148 if (nameParameter == "EnergyGap") energyGap = data; 145 workFunction = data; << 149 146 } << 150 if (nameParameter == "EnergyPeak") energyConstant.push_back(data); 147 if(nameParameter == "EnergyGap") << 151 if (nameParameter == "EnergyLimit") LimitEnergy.push_back(data); 148 { << 152 if (nameParameter == "EADL") EADL_Enumerator.push_back(data); 149 energyGap = data; << 153 150 } << 154 if (nameParameter == "WeaklyBoundShell") 151 << 152 if(nameParameter == "EnergyPeak") << 153 { << 154 energyConstant.push_back(data); << 155 } << 156 if(nameParameter == "EnergyLimit") << 157 { << 158 LimitEnergy.push_back(data); << 159 } << 160 if(nameParameter == "EADL") << 161 { << 162 EADL_Enumerator.push_back(data); << 163 } << 164 << 165 if (nameParameter == "WeaklyBoundShell") << 166 {if (data == 0) { isShellWeaklyBoundVe 155 {if (data == 0) { isShellWeaklyBoundVector.push_back(false); } 167 else {isShellWeaklyBoundVector.push_back(t 156 else {isShellWeaklyBoundVector.push_back(true);}} 168 << 157 169 if(nameParameter == "WeaklyBoundInitia << 158 if (nameParameter == "WeaklyBoundInitialEnergy") initialEnergy = data; 170 { << 159 171 initialEnergy = data; << 160 if (nameParameter == "ShellAtomicNumber") compoundShellZ.push_back(data); 172 } << 161 173 << 162 if (nameParameter == "DielectricModelLowEnergyLimit_e") limitInelastic[0]=data; 174 if(nameParameter == "ShellAtomicNumber << 163 if (nameParameter == "DielectricModelHighEnergyLimit_e") limitInelastic[1] = data; 175 { << 164 if (nameParameter == "DielectricModelLowEnergyLimit_p") limitInelastic[2] = data; 176 compoundShellZ.push_back(data); << 165 if (nameParameter == "DielectricModelHighEnergyLimit_p") limitInelastic[3] = data; 177 } << 166 178 << 167 if (nameParameter == "ElasticModelLowEnergyLimit") limitElastic[0] = data; 179 if(nameParameter == "DielectricModelLo << 168 if (nameParameter == "ElasticModelHighEnergyLimit") limitElastic[1] = data; 180 { << 169 } 181 flimitInelastic[0] = data; << 182 } << 183 if(nameParameter == "DielectricModelHi << 184 { << 185 flimitInelastic[1] = data; << 186 } << 187 if(nameParameter == "DielectricModelLo << 188 { << 189 flimitInelastic[2] = data; << 190 } << 191 if(nameParameter == "DielectricModelHi << 192 { << 193 flimitInelastic[3] = data; << 194 } << 195 << 196 if(nameParameter == "ElasticModelLowEn << 197 { << 198 flimitElastic[0] = data; << 199 } << 200 if(nameParameter == "ElasticModelHighE << 201 { << 202 flimitElastic[1] = data; << 203 } << 204 } << 205 } 170 } 206 fichier.close(); // on ferme le fichier 171 fichier.close(); // on ferme le fichier 207 } 172 } 208 else { 173 else { 209 G4String str = "file "; 174 G4String str = "file "; 210 str += fileName.str() + " not found!"; 175 str += fileName.str() + " not found!"; 211 G4Exception("G4MicroElecMaterialStructure: 176 G4Exception("G4MicroElecMaterialStructure::ReadMaterialFile", "em0002", FatalException, str); 212 } 177 } 213 } 178 } 214 179 215 //....oooOO0OOooo........oooOO0OOooo........oo 180 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 216 181 217 G4double G4MicroElecMaterialStructure::Energy( 182 G4double G4MicroElecMaterialStructure::Energy(G4int level) 218 { 183 { 219 return (level >= 0 && level < nLevels) ? ene 184 return (level >= 0 && level < nLevels) ? energyConstant[level] : 0.0; 220 } 185 } 221 186 222 //....oooOO0OOooo........oooOO0OOooo........oo 187 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 223 188 224 G4double G4MicroElecMaterialStructure::GetZ(G4 189 G4double G4MicroElecMaterialStructure::GetZ(G4int Shell) 225 { 190 { 226 if (Shell >= 0 && Shell < nLevels) { 191 if (Shell >= 0 && Shell < nLevels) { 227 if(!isCompound) << 192 if (!isCompound) return Z; 228 { << 193 else return compoundShellZ[Shell]; 229 return Z; << 230 } << 231 else << 232 { << 233 return compoundShellZ[Shell]; << 234 } << 235 } << 236 else << 237 { << 238 return 0; << 239 } 194 } >> 195 else return 0; 240 } 196 } 241 197 242 //....oooOO0OOooo........oooOO0OOooo........oo 198 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 243 199 244 G4double G4MicroElecMaterialStructure::Convert 200 G4double G4MicroElecMaterialStructure::ConvertUnit(const G4String& unitName) 245 { 201 { 246 G4double unitValue = 0; 202 G4double unitValue = 0; 247 if(unitName == "meV") << 203 if (unitName == "meV") unitValue = 1e-3*CLHEP::eV; 248 { << 204 else if (unitName == "eV") unitValue = CLHEP::eV; 249 unitValue = 1e-3 * CLHEP::eV; << 205 else if (unitName == "keV") unitValue = CLHEP::keV; 250 } << 206 else if (unitName == "MeV") unitValue = CLHEP::MeV; 251 else if(unitName == "eV") << 207 else if (unitName == "noUnit") unitValue = 1; 252 { << 208 253 unitValue = CLHEP::eV; << 254 } << 255 else if(unitName == "keV") << 256 { << 257 unitValue = CLHEP::keV; << 258 } << 259 else if(unitName == "MeV") << 260 { << 261 unitValue = CLHEP::MeV; << 262 } << 263 else if(unitName == "noUnit") << 264 { << 265 unitValue = 1; << 266 } << 267 << 268 return unitValue; 209 return unitValue; 269 } 210 } 270 211 271 //....oooOO0OOooo........oooOO0OOooo........oo 212 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 272 213 273 G4double G4MicroElecMaterialStructure::GetLimi 214 G4double G4MicroElecMaterialStructure::GetLimitEnergy(G4int level) 274 { 215 { 275 G4double E = LimitEnergy[level]; 216 G4double E = LimitEnergy[level]; 276 if (IsShellWeaklyBound(level)) { E = energyG 217 if (IsShellWeaklyBound(level)) { E = energyGap+ initialEnergy; } 277 return E; 218 return E; 278 } 219 } 279 220 280 //....oooOO0OOooo........oooOO0OOooo........oo 221 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 281 222 282 G4double G4MicroElecMaterialStructure::GetInel 223 G4double G4MicroElecMaterialStructure::GetInelasticModelLowLimit(G4int pdg) 283 { 224 { 284 G4double res = 0.0; 225 G4double res = 0.0; 285 if(pdg == 11) << 226 if (pdg == 11) res = limitInelastic[0]; 286 { << 227 else if (pdg == 2212) res = limitInelastic[2]; 287 res = flimitInelastic[0]; << 288 } << 289 else if(pdg == 2212) << 290 { << 291 res = flimitInelastic[2]; << 292 } << 293 return res; 228 return res; 294 } 229 } 295 230 296 //....oooOO0OOooo........oooOO0OOooo........oo 231 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 297 232 298 G4double G4MicroElecMaterialStructure::GetInel 233 G4double G4MicroElecMaterialStructure::GetInelasticModelHighLimit(G4int pdg) 299 { 234 { 300 G4double res = 0.0; 235 G4double res = 0.0; 301 if(pdg == 11) << 236 if (pdg == 11) res = limitInelastic[1]; 302 { << 237 else if (pdg == 2212) res = limitInelastic[3]; 303 res = flimitInelastic[1]; << 304 } << 305 else if(pdg == 2212) << 306 { << 307 res = flimitInelastic[3]; << 308 } << 309 return res; 238 return res; 310 } 239 } 311 240 312 //....oooOO0OOooo........oooOO0OOooo........oo 241 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 313 242 314 G4bool G4MicroElecMaterialStructure::IsShellWe 243 G4bool G4MicroElecMaterialStructure::IsShellWeaklyBound(G4int level) 315 { 244 { 316 return isShellWeaklyBoundVector[level]; 245 return isShellWeaklyBoundVector[level]; 317 } 246 } 318 247 319 //....oooOO0OOooo........oooOO0OOooo........oo 248 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 320 249 321 250