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 = (G4int)energyConstant.size(); 93 } 92 } 94 93 95 << 96 //....oooOO0OOooo........oooOO0OOooo........oo 94 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... >> 95 97 void G4MicroElecMaterialStructure::ReadMateria 96 void G4MicroElecMaterialStructure::ReadMaterialFile() 98 { 97 { 99 const char* path = G4FindDataDir("G4LEDATA") 98 const char* path = G4FindDataDir("G4LEDATA"); 100 99 101 if (materialName[0] == 'G' && materialName[1 100 if (materialName[0] == 'G' && materialName[1] == '4') { 102 //in the case the NIST database is used 101 //in the case the NIST database is used 103 materialName.erase(0, 1); 102 materialName.erase(0, 1); 104 materialName.erase(0, 1); 103 materialName.erase(0, 1); 105 materialName.erase(0, 1); 104 materialName.erase(0, 1); 106 } 105 } 107 106 108 std::ostringstream fileName; 107 std::ostringstream fileName; 109 fileName << path << "/microelec/Structure/Da 108 fileName << path << "/microelec/Structure/Data_" + materialName + ".dat"; 110 std::ifstream fichier(fileName.str().c_str() 109 std::ifstream fichier(fileName.str().c_str()); 111 110 112 int varLength = 0; 111 int varLength = 0; 113 G4String nameParameter; 112 G4String nameParameter; 114 113 115 G4String unitName; 114 G4String unitName; 116 G4double unitValue; 115 G4double unitValue; 117 G4double data; 116 G4double data; 118 G4String filler; 117 G4String filler; 119 G4String type; 118 G4String type; 120 119 121 if (fichier) 120 if (fichier) 122 { 121 { 123 fichier >> filler >> type; 122 fichier >> filler >> type; 124 materialName = filler; 123 materialName = filler; 125 if (type == "Compound") {isCompound = tr 124 if (type == "Compound") {isCompound = true; Z = 0; } 126 else { isCompound = false; Z = std::stoi 125 else { isCompound = false; Z = std::stoi(type); } 127 while(!fichier.eof()) { 126 while(!fichier.eof()) { 128 127 129 getline(fichier, filler); 128 getline(fichier, filler); 130 std::stringstream line(filler); 129 std::stringstream line(filler); 131 130 132 if (filler[0] == '#' || filler.empty()) {con 131 if (filler[0] == '#' || filler.empty()) {continue;} 133 132 134 line >> varLength; 133 line >> varLength; 135 line >> nameParameter; 134 line >> nameParameter; 136 line >> unitName; 135 line >> unitName; 137 unitValue = ConvertUnit(unitName); 136 unitValue = ConvertUnit(unitName); 138 137 139 for (int i = 0; i < varLength; i++) 138 for (int i = 0; i < varLength; i++) 140 { 139 { 141 line >> data; data = data*unitValue; 140 line >> data; data = data*unitValue; 142 141 143 if(nameParameter == "WorkFunction") 142 if(nameParameter == "WorkFunction") 144 { 143 { 145 workFunction = data; 144 workFunction = data; 146 } 145 } 147 if(nameParameter == "EnergyGap") 146 if(nameParameter == "EnergyGap") 148 { 147 { 149 energyGap = data; 148 energyGap = data; 150 } 149 } 151 150 152 if(nameParameter == "EnergyPeak") 151 if(nameParameter == "EnergyPeak") 153 { 152 { 154 energyConstant.push_back(data); 153 energyConstant.push_back(data); 155 } 154 } 156 if(nameParameter == "EnergyLimit") 155 if(nameParameter == "EnergyLimit") 157 { 156 { 158 LimitEnergy.push_back(data); 157 LimitEnergy.push_back(data); 159 } 158 } 160 if(nameParameter == "EADL") 159 if(nameParameter == "EADL") 161 { 160 { 162 EADL_Enumerator.push_back(data); 161 EADL_Enumerator.push_back(data); 163 } 162 } 164 163 165 if (nameParameter == "WeaklyBoundShell") 164 if (nameParameter == "WeaklyBoundShell") 166 {if (data == 0) { isShellWeaklyBoundVe 165 {if (data == 0) { isShellWeaklyBoundVector.push_back(false); } 167 else {isShellWeaklyBoundVector.push_back(t 166 else {isShellWeaklyBoundVector.push_back(true);}} 168 167 169 if(nameParameter == "WeaklyBoundInitia 168 if(nameParameter == "WeaklyBoundInitialEnergy") 170 { 169 { 171 initialEnergy = data; 170 initialEnergy = data; 172 } 171 } 173 172 174 if(nameParameter == "ShellAtomicNumber 173 if(nameParameter == "ShellAtomicNumber") 175 { 174 { 176 compoundShellZ.push_back(data); 175 compoundShellZ.push_back(data); 177 } 176 } 178 177 179 if(nameParameter == "DielectricModelLo 178 if(nameParameter == "DielectricModelLowEnergyLimit_e") 180 { 179 { 181 flimitInelastic[0] = data; << 180 limitInelastic[0] = data; 182 } 181 } 183 if(nameParameter == "DielectricModelHi 182 if(nameParameter == "DielectricModelHighEnergyLimit_e") 184 { 183 { 185 flimitInelastic[1] = data; << 184 limitInelastic[1] = data; 186 } 185 } 187 if(nameParameter == "DielectricModelLo 186 if(nameParameter == "DielectricModelLowEnergyLimit_p") 188 { 187 { 189 flimitInelastic[2] = data; << 188 limitInelastic[2] = data; 190 } 189 } 191 if(nameParameter == "DielectricModelHi 190 if(nameParameter == "DielectricModelHighEnergyLimit_p") 192 { 191 { 193 flimitInelastic[3] = data; << 192 limitInelastic[3] = data; 194 } 193 } 195 194 196 if(nameParameter == "ElasticModelLowEn 195 if(nameParameter == "ElasticModelLowEnergyLimit") 197 { 196 { 198 flimitElastic[0] = data; << 197 limitElastic[0] = data; 199 } 198 } 200 if(nameParameter == "ElasticModelHighE 199 if(nameParameter == "ElasticModelHighEnergyLimit") 201 { 200 { 202 flimitElastic[1] = data; << 201 limitElastic[1] = data; 203 } 202 } 204 } 203 } 205 } 204 } 206 fichier.close(); // on ferme le fichier 205 fichier.close(); // on ferme le fichier 207 } 206 } 208 else { 207 else { 209 G4String str = "file "; 208 G4String str = "file "; 210 str += fileName.str() + " not found!"; 209 str += fileName.str() + " not found!"; 211 G4Exception("G4MicroElecMaterialStructure: 210 G4Exception("G4MicroElecMaterialStructure::ReadMaterialFile", "em0002", FatalException, str); 212 } 211 } 213 } 212 } 214 213 215 //....oooOO0OOooo........oooOO0OOooo........oo 214 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 216 215 217 G4double G4MicroElecMaterialStructure::Energy( 216 G4double G4MicroElecMaterialStructure::Energy(G4int level) 218 { 217 { 219 return (level >= 0 && level < nLevels) ? ene 218 return (level >= 0 && level < nLevels) ? energyConstant[level] : 0.0; 220 } 219 } 221 220 222 //....oooOO0OOooo........oooOO0OOooo........oo 221 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 223 222 224 G4double G4MicroElecMaterialStructure::GetZ(G4 223 G4double G4MicroElecMaterialStructure::GetZ(G4int Shell) 225 { 224 { 226 if (Shell >= 0 && Shell < nLevels) { 225 if (Shell >= 0 && Shell < nLevels) { 227 if(!isCompound) 226 if(!isCompound) 228 { 227 { 229 return Z; 228 return Z; 230 } 229 } 231 else 230 else 232 { 231 { 233 return compoundShellZ[Shell]; 232 return compoundShellZ[Shell]; 234 } 233 } 235 } 234 } 236 else 235 else 237 { 236 { 238 return 0; 237 return 0; 239 } 238 } 240 } 239 } 241 240 242 //....oooOO0OOooo........oooOO0OOooo........oo 241 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 243 242 244 G4double G4MicroElecMaterialStructure::Convert 243 G4double G4MicroElecMaterialStructure::ConvertUnit(const G4String& unitName) 245 { 244 { 246 G4double unitValue = 0; 245 G4double unitValue = 0; 247 if(unitName == "meV") 246 if(unitName == "meV") 248 { 247 { 249 unitValue = 1e-3 * CLHEP::eV; 248 unitValue = 1e-3 * CLHEP::eV; 250 } 249 } 251 else if(unitName == "eV") 250 else if(unitName == "eV") 252 { 251 { 253 unitValue = CLHEP::eV; 252 unitValue = CLHEP::eV; 254 } 253 } 255 else if(unitName == "keV") 254 else if(unitName == "keV") 256 { 255 { 257 unitValue = CLHEP::keV; 256 unitValue = CLHEP::keV; 258 } 257 } 259 else if(unitName == "MeV") 258 else if(unitName == "MeV") 260 { 259 { 261 unitValue = CLHEP::MeV; 260 unitValue = CLHEP::MeV; 262 } 261 } 263 else if(unitName == "noUnit") 262 else if(unitName == "noUnit") 264 { 263 { 265 unitValue = 1; 264 unitValue = 1; 266 } 265 } 267 266 268 return unitValue; 267 return unitValue; 269 } 268 } 270 269 271 //....oooOO0OOooo........oooOO0OOooo........oo 270 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 272 271 273 G4double G4MicroElecMaterialStructure::GetLimi 272 G4double G4MicroElecMaterialStructure::GetLimitEnergy(G4int level) 274 { 273 { 275 G4double E = LimitEnergy[level]; 274 G4double E = LimitEnergy[level]; 276 if (IsShellWeaklyBound(level)) { E = energyG 275 if (IsShellWeaklyBound(level)) { E = energyGap+ initialEnergy; } 277 return E; 276 return E; 278 } 277 } 279 278 280 //....oooOO0OOooo........oooOO0OOooo........oo 279 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 281 280 282 G4double G4MicroElecMaterialStructure::GetInel 281 G4double G4MicroElecMaterialStructure::GetInelasticModelLowLimit(G4int pdg) 283 { 282 { 284 G4double res = 0.0; 283 G4double res = 0.0; 285 if(pdg == 11) 284 if(pdg == 11) 286 { 285 { 287 res = flimitInelastic[0]; << 286 res = limitInelastic[0]; 288 } 287 } 289 else if(pdg == 2212) 288 else if(pdg == 2212) 290 { 289 { 291 res = flimitInelastic[2]; << 290 res = limitInelastic[2]; 292 } 291 } 293 return res; 292 return res; 294 } 293 } 295 294 296 //....oooOO0OOooo........oooOO0OOooo........oo 295 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 297 296 298 G4double G4MicroElecMaterialStructure::GetInel 297 G4double G4MicroElecMaterialStructure::GetInelasticModelHighLimit(G4int pdg) 299 { 298 { 300 G4double res = 0.0; 299 G4double res = 0.0; 301 if(pdg == 11) 300 if(pdg == 11) 302 { 301 { 303 res = flimitInelastic[1]; << 302 res = limitInelastic[1]; 304 } 303 } 305 else if(pdg == 2212) 304 else if(pdg == 2212) 306 { 305 { 307 res = flimitInelastic[3]; << 306 res = limitInelastic[3]; 308 } 307 } 309 return res; 308 return res; 310 } 309 } 311 310 312 //....oooOO0OOooo........oooOO0OOooo........oo 311 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 313 312 314 G4bool G4MicroElecMaterialStructure::IsShellWe 313 G4bool G4MicroElecMaterialStructure::IsShellWeaklyBound(G4int level) 315 { 314 { 316 return isShellWeaklyBoundVector[level]; 315 return isShellWeaklyBoundVector[level]; 317 } 316 } 318 317 319 //....oooOO0OOooo........oooOO0OOooo........oo 318 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 320 319 321 320