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 // 27 // 28 // GEANT4 Class file 28 // GEANT4 Class file 29 // 29 // 30 // 30 // 31 // File name: G4EmLowEParameters 31 // File name: G4EmLowEParameters 32 // 32 // 33 // Author: Vladimir Ivanchenko 33 // Author: Vladimir Ivanchenko 34 // 34 // 35 // Creation date: 07.05.2019 35 // Creation date: 07.05.2019 36 // 36 // 37 // ------------------------------------------- 37 // ------------------------------------------------------------------- 38 // 38 // 39 //....oooOO0OOooo........oooOO0OOooo........oo 39 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 40 //....oooOO0OOooo........oooOO0OOooo........oo 40 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 41 41 42 #include "G4EmLowEParameters.hh" 42 #include "G4EmLowEParameters.hh" 43 #include "G4PhysicalConstants.hh" 43 #include "G4PhysicalConstants.hh" 44 #include "G4UnitsTable.hh" 44 #include "G4UnitsTable.hh" 45 #include "G4SystemOfUnits.hh" 45 #include "G4SystemOfUnits.hh" 46 #include "G4VAtomDeexcitation.hh" 46 #include "G4VAtomDeexcitation.hh" 47 #include "G4EmLowEParametersMessenger.hh" 47 #include "G4EmLowEParametersMessenger.hh" 48 #include "G4RegionStore.hh" 48 #include "G4RegionStore.hh" 49 #include "G4Region.hh" 49 #include "G4Region.hh" 50 50 51 //....oooOO0OOooo........oooOO0OOooo........oo 51 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 52 52 53 G4EmLowEParameters::G4EmLowEParameters() 53 G4EmLowEParameters::G4EmLowEParameters() 54 { 54 { 55 theMessenger = new G4EmLowEParametersMesseng 55 theMessenger = new G4EmLowEParametersMessenger(this); 56 Initialise(); 56 Initialise(); 57 } 57 } 58 58 59 //....oooOO0OOooo........oooOO0OOooo........oo 59 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 60 60 61 G4EmLowEParameters::~G4EmLowEParameters() 61 G4EmLowEParameters::~G4EmLowEParameters() 62 { 62 { 63 delete theMessenger; 63 delete theMessenger; 64 } 64 } 65 65 66 //....oooOO0OOooo........oooOO0OOooo........oo 66 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 67 67 68 void G4EmLowEParameters::Initialise() 68 void G4EmLowEParameters::Initialise() 69 { 69 { 70 fluo = false; 70 fluo = false; 71 auger = false; 71 auger = false; 72 pixe = false; 72 pixe = false; 73 deexIgnoreCut = false; 73 deexIgnoreCut = false; 74 74 75 dnaFast = false; 75 dnaFast = false; 76 dnaStationary = false; 76 dnaStationary = false; 77 dnaMsc = false; 77 dnaMsc = false; 78 dnaElectronSolvation = fMeesungnoen2002eSolv 78 dnaElectronSolvation = fMeesungnoen2002eSolvation; 79 fTimeStepModel = G4ChemTimeStepModel::Unknow << 80 79 81 fFluoDirectory = fluoDefault; 80 fFluoDirectory = fluoDefault; 82 namePIXE = "Empirical"; 81 namePIXE = "Empirical"; 83 nameElectronPIXE = "Livermore"; 82 nameElectronPIXE = "Livermore"; 84 livDataDir = "epics_2017"; 83 livDataDir = "epics_2017"; 85 } 84 } 86 85 87 //....oooOO0OOooo........oooOO0OOooo........oo 86 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 88 87 89 void G4EmLowEParameters::SetFluo(G4bool val) 88 void G4EmLowEParameters::SetFluo(G4bool val) 90 { 89 { 91 fluo = val; 90 fluo = val; 92 } 91 } 93 92 94 G4bool G4EmLowEParameters::Fluo() const 93 G4bool G4EmLowEParameters::Fluo() const 95 { 94 { 96 return fluo; 95 return fluo; 97 } 96 } 98 97 99 G4EmFluoDirectory G4EmLowEParameters::FluoDire 98 G4EmFluoDirectory G4EmLowEParameters::FluoDirectory() const 100 { 99 { 101 return fFluoDirectory; 100 return fFluoDirectory; 102 } 101 } 103 102 104 void G4EmLowEParameters::SetFluoDirectory(G4Em 103 void G4EmLowEParameters::SetFluoDirectory(G4EmFluoDirectory val) 105 { 104 { 106 fFluoDirectory = fluoDefault; 105 fFluoDirectory = fluoDefault; 107 if(fluoBearden == val) { fFluoDirectory = fl 106 if(fluoBearden == val) { fFluoDirectory = fluoBearden; } 108 else if(fluoANSTO == val) { fFluoDirectory = 107 else if(fluoANSTO == val) { fFluoDirectory = fluoANSTO; } 109 else if(fluoXDB_EADL == val) { fFluoDirector 108 else if(fluoXDB_EADL == val) { fFluoDirectory = fluoXDB_EADL; } 110 } 109 } 111 110 112 void G4EmLowEParameters::SetBeardenFluoDir(G4b 111 void G4EmLowEParameters::SetBeardenFluoDir(G4bool val) 113 { 112 { 114 fFluoDirectory = val ? fluoBearden : fluoDef 113 fFluoDirectory = val ? fluoBearden : fluoDefault; 115 } 114 } 116 115 117 void G4EmLowEParameters::SetANSTOFluoDir(G4boo 116 void G4EmLowEParameters::SetANSTOFluoDir(G4bool val) 118 { 117 { 119 fFluoDirectory = val ? fluoANSTO : fluoDefau 118 fFluoDirectory = val ? fluoANSTO : fluoDefault; 120 } 119 } 121 120 122 void G4EmLowEParameters::SetXDB_EADLFluoDir(G4 121 void G4EmLowEParameters::SetXDB_EADLFluoDir(G4bool val) 123 { 122 { 124 fFluoDirectory = val ? fluoXDB_EADL : fluoDe 123 fFluoDirectory = val ? fluoXDB_EADL : fluoDefault; 125 } 124 } 126 125 127 void G4EmLowEParameters::SetAuger(G4bool val) 126 void G4EmLowEParameters::SetAuger(G4bool val) 128 { 127 { 129 auger = val; 128 auger = val; 130 if(val) { fluo = true; } 129 if(val) { fluo = true; } 131 } 130 } 132 131 133 G4bool G4EmLowEParameters::Auger() const 132 G4bool G4EmLowEParameters::Auger() const 134 { 133 { 135 return auger; 134 return auger; 136 } 135 } 137 136 138 void G4EmLowEParameters::SetPixe(G4bool val) 137 void G4EmLowEParameters::SetPixe(G4bool val) 139 { 138 { 140 pixe = val; 139 pixe = val; 141 if(val) { fluo = true; } 140 if(val) { fluo = true; } 142 } 141 } 143 142 144 G4bool G4EmLowEParameters::Pixe() const 143 G4bool G4EmLowEParameters::Pixe() const 145 { 144 { 146 return pixe; 145 return pixe; 147 } 146 } 148 147 149 void G4EmLowEParameters::SetDeexcitationIgnore 148 void G4EmLowEParameters::SetDeexcitationIgnoreCut(G4bool val) 150 { 149 { 151 deexIgnoreCut = val; 150 deexIgnoreCut = val; 152 } 151 } 153 152 154 G4bool G4EmLowEParameters::DeexcitationIgnoreC 153 G4bool G4EmLowEParameters::DeexcitationIgnoreCut() const 155 { 154 { 156 return deexIgnoreCut; 155 return deexIgnoreCut; 157 } 156 } 158 157 159 void G4EmLowEParameters::SetDNAFast(G4bool val 158 void G4EmLowEParameters::SetDNAFast(G4bool val) 160 { 159 { 161 dnaFast = val; 160 dnaFast = val; 162 } 161 } 163 162 164 G4bool G4EmLowEParameters::DNAFast() const 163 G4bool G4EmLowEParameters::DNAFast() const 165 { 164 { 166 return dnaFast; 165 return dnaFast; 167 } 166 } 168 167 169 void G4EmLowEParameters::SetDNAStationary(G4bo 168 void G4EmLowEParameters::SetDNAStationary(G4bool val) 170 { 169 { 171 dnaStationary = val; 170 dnaStationary = val; 172 } 171 } 173 172 174 G4bool G4EmLowEParameters::DNAStationary() con 173 G4bool G4EmLowEParameters::DNAStationary() const 175 { 174 { 176 return dnaStationary; 175 return dnaStationary; 177 } 176 } 178 177 179 void G4EmLowEParameters::SetDNAElectronMsc(G4b 178 void G4EmLowEParameters::SetDNAElectronMsc(G4bool val) 180 { 179 { 181 dnaMsc = val; 180 dnaMsc = val; 182 } 181 } 183 182 184 G4bool G4EmLowEParameters::DNAElectronMsc() co 183 G4bool G4EmLowEParameters::DNAElectronMsc() const 185 { 184 { 186 return dnaMsc; 185 return dnaMsc; 187 } 186 } 188 187 189 void G4EmLowEParameters::SetDNAeSolvationSubTy 188 void G4EmLowEParameters::SetDNAeSolvationSubType(G4DNAModelSubType val) 190 { 189 { 191 dnaElectronSolvation = val; 190 dnaElectronSolvation = val; 192 } 191 } 193 192 194 G4DNAModelSubType G4EmLowEParameters::DNAeSolv 193 G4DNAModelSubType G4EmLowEParameters::DNAeSolvationSubType() const 195 { 194 { 196 return dnaElectronSolvation; 195 return dnaElectronSolvation; 197 } 196 } 198 197 199 void G4EmLowEParameters::SetChemTimeStepModel( << 200 { << 201 fTimeStepModel = val; << 202 } << 203 << 204 G4ChemTimeStepModel G4EmLowEParameters::GetChe << 205 { << 206 return fTimeStepModel; << 207 } << 208 << 209 void G4EmLowEParameters::SetPIXECrossSectionMo 198 void G4EmLowEParameters::SetPIXECrossSectionModel(const G4String& sss) 210 { 199 { 211 namePIXE = sss; 200 namePIXE = sss; 212 } 201 } 213 202 214 const G4String& G4EmLowEParameters::PIXECrossS 203 const G4String& G4EmLowEParameters::PIXECrossSectionModel() 215 { 204 { 216 return namePIXE; 205 return namePIXE; 217 } 206 } 218 207 219 void G4EmLowEParameters::SetPIXEElectronCrossS 208 void G4EmLowEParameters::SetPIXEElectronCrossSectionModel(const G4String& sss) 220 { 209 { 221 nameElectronPIXE = sss; 210 nameElectronPIXE = sss; 222 } 211 } 223 212 224 const G4String& G4EmLowEParameters::PIXEElectr 213 const G4String& G4EmLowEParameters::PIXEElectronCrossSectionModel() 225 { 214 { 226 return nameElectronPIXE; 215 return nameElectronPIXE; 227 } 216 } 228 217 229 void G4EmLowEParameters::SetLivermoreDataDir(c 218 void G4EmLowEParameters::SetLivermoreDataDir(const G4String& sss) 230 { 219 { 231 livDataDir = sss; 220 livDataDir = sss; 232 } 221 } 233 222 234 const G4String& G4EmLowEParameters::LivermoreD 223 const G4String& G4EmLowEParameters::LivermoreDataDir() 235 { 224 { 236 return livDataDir; 225 return livDataDir; 237 } 226 } 238 227 239 void G4EmLowEParameters::PrintWarning(G4Except 228 void G4EmLowEParameters::PrintWarning(G4ExceptionDescription& ed) const 240 { 229 { 241 G4Exception("G4EmLowEParameters", "em0044", 230 G4Exception("G4EmLowEParameters", "em0044", JustWarning, ed); 242 } 231 } 243 232 244 G4String G4EmLowEParameters::CheckRegion(const 233 G4String G4EmLowEParameters::CheckRegion(const G4String& reg) const 245 { 234 { 246 G4String r = reg; 235 G4String r = reg; 247 if(r == "" || r == "world" || r == "World") 236 if(r == "" || r == "world" || r == "World") { 248 r = "DefaultRegionForTheWorld"; 237 r = "DefaultRegionForTheWorld"; 249 } 238 } 250 return r; 239 return r; 251 } 240 } 252 241 253 void G4EmLowEParameters::AddMicroElec(const G4 242 void G4EmLowEParameters::AddMicroElec(const G4String& region) 254 { 243 { 255 G4String r = CheckRegion(region); 244 G4String r = CheckRegion(region); 256 std::size_t nreg = m_regnamesME.size(); 245 std::size_t nreg = m_regnamesME.size(); 257 for(std::size_t i=0; i<nreg; ++i) { 246 for(std::size_t i=0; i<nreg; ++i) { 258 if(r == m_regnamesME[i]) { return; } 247 if(r == m_regnamesME[i]) { return; } 259 } 248 } 260 m_regnamesME.push_back(std::move(r)); << 249 m_regnamesME.push_back(r); 261 } 250 } 262 251 263 const std::vector<G4String>& G4EmLowEParameter 252 const std::vector<G4String>& G4EmLowEParameters::RegionsMicroElec() const 264 { 253 { 265 return m_regnamesME; 254 return m_regnamesME; 266 } 255 } 267 256 268 void G4EmLowEParameters::AddDNA(const G4String 257 void G4EmLowEParameters::AddDNA(const G4String& region, const G4String& type) 269 { 258 { 270 G4String r = CheckRegion(region); 259 G4String r = CheckRegion(region); 271 std::size_t nreg = m_regnamesDNA.size(); 260 std::size_t nreg = m_regnamesDNA.size(); 272 for(std::size_t i=0; i<nreg; ++i) { 261 for(std::size_t i=0; i<nreg; ++i) { 273 if(r == m_regnamesDNA[i]) { return; } 262 if(r == m_regnamesDNA[i]) { return; } 274 } 263 } 275 m_regnamesDNA.push_back(std::move(r)); << 264 m_regnamesDNA.push_back(r); 276 m_typesDNA.push_back(type); 265 m_typesDNA.push_back(type); 277 } 266 } 278 267 279 const std::vector<G4String>& G4EmLowEParameter 268 const std::vector<G4String>& G4EmLowEParameters::RegionsDNA() const 280 { 269 { 281 return m_regnamesDNA; 270 return m_regnamesDNA; 282 } 271 } 283 272 284 const std::vector<G4String>& G4EmLowEParameter 273 const std::vector<G4String>& G4EmLowEParameters::TypesDNA() const 285 { 274 { 286 return m_typesDNA; 275 return m_typesDNA; 287 } 276 } 288 277 289 void 278 void 290 G4EmLowEParameters::SetDeexActiveRegion(const 279 G4EmLowEParameters::SetDeexActiveRegion(const G4String& region, G4bool fdeex, 291 G4bool 280 G4bool fauger, G4bool fpixe) 292 { 281 { 293 if(fdeex) { fluo = true; } 282 if(fdeex) { fluo = true; } 294 G4String r = CheckRegion(region); 283 G4String r = CheckRegion(region); 295 std::size_t nreg = m_regnamesDeex.size(); 284 std::size_t nreg = m_regnamesDeex.size(); 296 if(0 == nreg && r != "DefaultRegionForTheWor 285 if(0 == nreg && r != "DefaultRegionForTheWorld") { 297 m_regnamesDeex.push_back("DefaultRegionFor 286 m_regnamesDeex.push_back("DefaultRegionForTheWorld"); 298 m_fluo.push_back(false); 287 m_fluo.push_back(false); 299 m_auger.push_back(false); 288 m_auger.push_back(false); 300 m_pixe.push_back(false); 289 m_pixe.push_back(false); 301 nreg = 1; 290 nreg = 1; 302 } 291 } 303 for(std::size_t i=0; i<nreg; ++i) { 292 for(std::size_t i=0; i<nreg; ++i) { 304 if(r == m_regnamesDeex[i]) { 293 if(r == m_regnamesDeex[i]) { 305 m_fluo[i] = fdeex; 294 m_fluo[i] = fdeex; 306 m_auger[i]= fauger; 295 m_auger[i]= fauger; 307 m_pixe[i] = fpixe; 296 m_pixe[i] = fpixe; 308 return; 297 return; 309 } 298 } 310 } 299 } 311 m_regnamesDeex.push_back(std::move(r)); << 300 m_regnamesDeex.push_back(r); 312 m_fluo.push_back(fdeex); 301 m_fluo.push_back(fdeex); 313 m_auger.push_back(fauger); 302 m_auger.push_back(fauger); 314 m_pixe.push_back(fpixe); 303 m_pixe.push_back(fpixe); 315 } 304 } 316 305 317 void G4EmLowEParameters::DefineRegParamForDeex 306 void G4EmLowEParameters::DefineRegParamForDeex(G4VAtomDeexcitation* ptr) const 318 { 307 { 319 std::size_t n = m_regnamesDeex.size(); 308 std::size_t n = m_regnamesDeex.size(); 320 for(std::size_t i=0; i<n; ++i) { 309 for(std::size_t i=0; i<n; ++i) { 321 ptr->SetDeexcitationActiveRegion(m_regname 310 ptr->SetDeexcitationActiveRegion(m_regnamesDeex[i], 322 m_fluo[i], m_auger[i], m_pixe[i]) 311 m_fluo[i], m_auger[i], m_pixe[i]); 323 } 312 } 324 } 313 } 325 314 326 //....oooOO0OOooo........oooOO0OOooo........oo 315 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 327 316