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 // File name: G4EmParameters 30 // File name: G4EmParameters 31 // 31 // 32 // Author: Vladimir Ivanchenko 32 // Author: Vladimir Ivanchenko 33 // 33 // 34 // Creation date: 18.05.2013 34 // Creation date: 18.05.2013 35 // 35 // 36 // Modifications: 36 // Modifications: 37 // 37 // 38 // ------------------------------------------- 38 // ------------------------------------------------------------------- 39 // 39 // 40 //....oooOO0OOooo........oooOO0OOooo........oo 40 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 41 //....oooOO0OOooo........oooOO0OOooo........oo 41 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 42 42 43 #include "G4EmParameters.hh" 43 #include "G4EmParameters.hh" 44 #include "G4PhysicalConstants.hh" 44 #include "G4PhysicalConstants.hh" 45 #include "G4UnitsTable.hh" 45 #include "G4UnitsTable.hh" 46 #include "G4SystemOfUnits.hh" 46 #include "G4SystemOfUnits.hh" 47 #include "G4VEmProcess.hh" 47 #include "G4VEmProcess.hh" 48 #include "G4VEnergyLossProcess.hh" 48 #include "G4VEnergyLossProcess.hh" 49 #include "G4VAtomDeexcitation.hh" 49 #include "G4VAtomDeexcitation.hh" 50 #include "G4EmExtraParameters.hh" 50 #include "G4EmExtraParameters.hh" 51 #include "G4EmLowEParameters.hh" 51 #include "G4EmLowEParameters.hh" 52 #include "G4EmParametersMessenger.hh" 52 #include "G4EmParametersMessenger.hh" 53 #include "G4NistManager.hh" 53 #include "G4NistManager.hh" 54 #include "G4RegionStore.hh" 54 #include "G4RegionStore.hh" 55 #include "G4Region.hh" 55 #include "G4Region.hh" 56 #include "G4ApplicationState.hh" 56 #include "G4ApplicationState.hh" 57 #include "G4StateManager.hh" 57 #include "G4StateManager.hh" 58 #include "G4Threading.hh" 58 #include "G4Threading.hh" 59 #include "G4AutoLock.hh" 59 #include "G4AutoLock.hh" 60 60 61 G4EmParameters* G4EmParameters::theInstance = 61 G4EmParameters* G4EmParameters::theInstance = nullptr; 62 62 63 namespace 63 namespace 64 { 64 { 65 G4Mutex emParametersMutex = G4MUTEX_INITIALI 65 G4Mutex emParametersMutex = G4MUTEX_INITIALIZER; 66 } 66 } 67 67 68 //....oooOO0OOooo........oooOO0OOooo........oo 68 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 69 69 70 G4EmParameters* G4EmParameters::Instance() 70 G4EmParameters* G4EmParameters::Instance() 71 { 71 { 72 if(nullptr == theInstance) { 72 if(nullptr == theInstance) { 73 G4AutoLock l(&emParametersMutex); 73 G4AutoLock l(&emParametersMutex); 74 if(nullptr == theInstance) { 74 if(nullptr == theInstance) { 75 static G4EmParameters manager; 75 static G4EmParameters manager; 76 theInstance = &manager; 76 theInstance = &manager; 77 } 77 } 78 l.unlock(); 78 l.unlock(); 79 } 79 } 80 return theInstance; 80 return theInstance; 81 } 81 } 82 82 83 //....oooOO0OOooo........oooOO0OOooo........oo 83 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 84 84 85 G4EmParameters::~G4EmParameters() 85 G4EmParameters::~G4EmParameters() 86 { 86 { 87 delete theMessenger; 87 delete theMessenger; 88 delete fBParameters; 88 delete fBParameters; 89 delete fCParameters; 89 delete fCParameters; 90 delete emSaturation; 90 delete emSaturation; 91 } 91 } 92 92 93 //....oooOO0OOooo........oooOO0OOooo........oo 93 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 94 94 95 G4EmParameters::G4EmParameters() 95 G4EmParameters::G4EmParameters() 96 { 96 { 97 G4NistManager::Instance(); 97 G4NistManager::Instance(); 98 theMessenger = new G4EmParametersMessenger(t 98 theMessenger = new G4EmParametersMessenger(this); 99 Initialise(); 99 Initialise(); 100 100 101 fBParameters = new G4EmExtraParameters(); 101 fBParameters = new G4EmExtraParameters(); 102 fCParameters = new G4EmLowEParameters(); 102 fCParameters = new G4EmLowEParameters(); 103 103 104 fStateManager = G4StateManager::GetStateMana 104 fStateManager = G4StateManager::GetStateManager(); 105 emSaturation = nullptr; 105 emSaturation = nullptr; 106 } 106 } 107 107 108 void G4EmParameters::SetDefaults() 108 void G4EmParameters::SetDefaults() 109 { 109 { 110 if(!IsLocked()) { 110 if(!IsLocked()) { 111 Initialise(); 111 Initialise(); 112 fBParameters->Initialise(); 112 fBParameters->Initialise(); 113 fCParameters->Initialise(); 113 fCParameters->Initialise(); 114 } 114 } 115 } 115 } 116 116 117 void G4EmParameters::Initialise() 117 void G4EmParameters::Initialise() 118 { 118 { 119 lossFluctuation = true; 119 lossFluctuation = true; 120 buildCSDARange = false; 120 buildCSDARange = false; 121 flagLPM = true; 121 flagLPM = true; 122 cutAsFinalRange = false; 122 cutAsFinalRange = false; 123 applyCuts = false; 123 applyCuts = false; 124 lateralDisplacement = true; 124 lateralDisplacement = true; 125 lateralDisplacementAlg96 = true; 125 lateralDisplacementAlg96 = true; 126 muhadLateralDisplacement = false; 126 muhadLateralDisplacement = false; 127 useAngGeneratorForIonisation = false; 127 useAngGeneratorForIonisation = false; 128 useMottCorrection = false; 128 useMottCorrection = false; 129 integral = true; 129 integral = true; 130 birks = false; 130 birks = false; 131 fICRU90 = false; 131 fICRU90 = false; 132 gener = false; 132 gener = false; 133 onIsolated = false; 133 onIsolated = false; 134 fSamplingTable = false; 134 fSamplingTable = false; 135 fPolarisation = false; 135 fPolarisation = false; 136 fMuDataFromFile = false; 136 fMuDataFromFile = false; 137 fPEKShell = true; 137 fPEKShell = true; 138 fMscPosiCorr = true; 138 fMscPosiCorr = true; 139 fUseEPICS2017XS = false; << 140 f3GammaAnnihilationOnFly = false; << 141 fUseRiGePairProductionModel = false; << 142 fDNA = false; 139 fDNA = false; 143 fIsPrinted = false; 140 fIsPrinted = false; 144 141 145 minKinEnergy = 0.1*CLHEP::keV; 142 minKinEnergy = 0.1*CLHEP::keV; 146 maxKinEnergy = 100.0*CLHEP::TeV; 143 maxKinEnergy = 100.0*CLHEP::TeV; 147 maxKinEnergyCSDA = 1.0*CLHEP::GeV; 144 maxKinEnergyCSDA = 1.0*CLHEP::GeV; 148 max5DEnergyForMuPair = 0.0; 145 max5DEnergyForMuPair = 0.0; 149 lowestElectronEnergy = 1.0*CLHEP::keV; 146 lowestElectronEnergy = 1.0*CLHEP::keV; 150 lowestMuHadEnergy = 1.0*CLHEP::keV; 147 lowestMuHadEnergy = 1.0*CLHEP::keV; 151 lowestTripletEnergy = 1.0*CLHEP::MeV; 148 lowestTripletEnergy = 1.0*CLHEP::MeV; 152 maxNIELEnergy = 0.0; 149 maxNIELEnergy = 0.0; 153 linLossLimit = 0.01; 150 linLossLimit = 0.01; 154 bremsTh = bremsMuHadTh = maxKinEnergy; 151 bremsTh = bremsMuHadTh = maxKinEnergy; 155 lambdaFactor = 0.8; 152 lambdaFactor = 0.8; 156 factorForAngleLimit = 1.0; 153 factorForAngleLimit = 1.0; 157 thetaLimit = CLHEP::pi; 154 thetaLimit = CLHEP::pi; 158 energyLimit = 100.0*CLHEP::MeV; 155 energyLimit = 100.0*CLHEP::MeV; 159 rangeFactor = 0.04; 156 rangeFactor = 0.04; 160 rangeFactorMuHad = 0.2; 157 rangeFactorMuHad = 0.2; 161 geomFactor = 2.5; 158 geomFactor = 2.5; 162 skin = 1.0; 159 skin = 1.0; 163 safetyFactor = 0.6; 160 safetyFactor = 0.6; 164 lambdaLimit = 1.0*CLHEP::mm; 161 lambdaLimit = 1.0*CLHEP::mm; 165 factorScreen = 1.0; 162 factorScreen = 1.0; 166 163 167 nbinsPerDecade = 7; 164 nbinsPerDecade = 7; 168 verbose = 1; 165 verbose = 1; 169 workerVerbose = 0; 166 workerVerbose = 0; 170 nForFreeVector = 2; << 171 tripletConv = 0; 167 tripletConv = 0; 172 168 173 fTransportationWithMsc = G4TransportationWit 169 fTransportationWithMsc = G4TransportationWithMscType::fDisabled; 174 mscStepLimit = fUseSafety; 170 mscStepLimit = fUseSafety; 175 mscStepLimitMuHad = fMinimal; 171 mscStepLimitMuHad = fMinimal; 176 nucFormfactor = fExponentialNF; 172 nucFormfactor = fExponentialNF; 177 fSStype = fWVI; 173 fSStype = fWVI; 178 fFluct = fUniversalFluctuation; 174 fFluct = fUniversalFluctuation; 179 fPositronium = fSimplePositronium; << 180 << 181 const char* data_dir = G4FindDataDir("G4LEDA << 182 if (nullptr != data_dir) { << 183 fDirLEDATA = G4String(data_dir); << 184 } << 185 else { << 186 G4Exception("G4EmParameters::Initialise()" << 187 "G4LEDATA data directory was n << 188 } << 189 } 175 } 190 176 191 void G4EmParameters::SetLossFluctuations(G4boo 177 void G4EmParameters::SetLossFluctuations(G4bool val) 192 { 178 { 193 if(IsLocked()) { return; } 179 if(IsLocked()) { return; } 194 lossFluctuation = val; 180 lossFluctuation = val; 195 } 181 } 196 182 197 G4bool G4EmParameters::LossFluctuation() const 183 G4bool G4EmParameters::LossFluctuation() const 198 { 184 { 199 return lossFluctuation; 185 return lossFluctuation; 200 } 186 } 201 187 202 void G4EmParameters::SetBuildCSDARange(G4bool 188 void G4EmParameters::SetBuildCSDARange(G4bool val) 203 { 189 { 204 if(IsLocked()) { return; } 190 if(IsLocked()) { return; } 205 buildCSDARange = val; 191 buildCSDARange = val; 206 } 192 } 207 193 208 G4bool G4EmParameters::BuildCSDARange() const 194 G4bool G4EmParameters::BuildCSDARange() const 209 { 195 { 210 return buildCSDARange; 196 return buildCSDARange; 211 } 197 } 212 198 213 void G4EmParameters::SetLPM(G4bool val) 199 void G4EmParameters::SetLPM(G4bool val) 214 { 200 { 215 if(IsLocked()) { return; } 201 if(IsLocked()) { return; } 216 flagLPM = val; 202 flagLPM = val; 217 } 203 } 218 204 219 G4bool G4EmParameters::LPM() const 205 G4bool G4EmParameters::LPM() const 220 { 206 { 221 return flagLPM; 207 return flagLPM; 222 } 208 } 223 209 224 void G4EmParameters::SetUseCutAsFinalRange(G4b 210 void G4EmParameters::SetUseCutAsFinalRange(G4bool val) 225 { 211 { 226 if(IsLocked()) { return; } 212 if(IsLocked()) { return; } 227 cutAsFinalRange = val; 213 cutAsFinalRange = val; 228 } 214 } 229 215 230 G4bool G4EmParameters::UseCutAsFinalRange() co 216 G4bool G4EmParameters::UseCutAsFinalRange() const 231 { 217 { 232 return cutAsFinalRange; 218 return cutAsFinalRange; 233 } 219 } 234 220 235 void G4EmParameters::SetApplyCuts(G4bool val) 221 void G4EmParameters::SetApplyCuts(G4bool val) 236 { 222 { 237 if(IsLocked()) { return; } 223 if(IsLocked()) { return; } 238 applyCuts = val; 224 applyCuts = val; 239 } 225 } 240 226 241 G4bool G4EmParameters::ApplyCuts() const 227 G4bool G4EmParameters::ApplyCuts() const 242 { 228 { 243 return applyCuts; 229 return applyCuts; 244 } 230 } 245 231 246 void G4EmParameters::SetFluo(G4bool val) 232 void G4EmParameters::SetFluo(G4bool val) 247 { 233 { 248 if(IsLocked()) { return; } 234 if(IsLocked()) { return; } 249 fCParameters->SetFluo(val); 235 fCParameters->SetFluo(val); 250 } 236 } 251 237 252 G4bool G4EmParameters::Fluo() const 238 G4bool G4EmParameters::Fluo() const 253 { 239 { 254 return fCParameters->Fluo(); 240 return fCParameters->Fluo(); 255 } 241 } 256 242 257 G4EmFluoDirectory G4EmParameters::FluoDirector 243 G4EmFluoDirectory G4EmParameters::FluoDirectory() const 258 { 244 { 259 return fCParameters->FluoDirectory(); 245 return fCParameters->FluoDirectory(); 260 } 246 } 261 247 262 void G4EmParameters::SetFluoDirectory(G4EmFluo 248 void G4EmParameters::SetFluoDirectory(G4EmFluoDirectory val) 263 { 249 { 264 if(IsLocked()) { return; } 250 if(IsLocked()) { return; } 265 fCParameters->SetFluoDirectory(val); 251 fCParameters->SetFluoDirectory(val); 266 } 252 } 267 253 268 void G4EmParameters::SetBeardenFluoDir(G4bool 254 void G4EmParameters::SetBeardenFluoDir(G4bool val) 269 { 255 { 270 if(IsLocked()) { return; } 256 if(IsLocked()) { return; } 271 fCParameters->SetBeardenFluoDir(val); 257 fCParameters->SetBeardenFluoDir(val); 272 } 258 } 273 259 274 void G4EmParameters::SetANSTOFluoDir(G4bool va 260 void G4EmParameters::SetANSTOFluoDir(G4bool val) 275 { 261 { 276 if(IsLocked()) { return; } 262 if(IsLocked()) { return; } 277 fCParameters->SetANSTOFluoDir(val); 263 fCParameters->SetANSTOFluoDir(val); 278 } 264 } 279 265 280 void G4EmParameters::SetXDB_EADLFluoDir(G4bool 266 void G4EmParameters::SetXDB_EADLFluoDir(G4bool val) 281 { 267 { 282 if(IsLocked()) { return; } 268 if(IsLocked()) { return; } 283 fCParameters->SetXDB_EADLFluoDir(val); 269 fCParameters->SetXDB_EADLFluoDir(val); 284 } 270 } 285 271 286 void G4EmParameters::SetAuger(G4bool val) 272 void G4EmParameters::SetAuger(G4bool val) 287 { 273 { 288 if(IsLocked()) { return; } 274 if(IsLocked()) { return; } 289 fCParameters->SetAuger(val); 275 fCParameters->SetAuger(val); 290 } 276 } 291 277 292 G4bool G4EmParameters::BeardenFluoDir() 278 G4bool G4EmParameters::BeardenFluoDir() 293 { 279 { 294 auto dir = fCParameters->FluoDirectory(); 280 auto dir = fCParameters->FluoDirectory(); 295 return (dir == fluoBearden); 281 return (dir == fluoBearden); 296 } 282 } 297 283 298 G4bool G4EmParameters::ANSTOFluoDir() 284 G4bool G4EmParameters::ANSTOFluoDir() 299 { 285 { 300 auto dir = fCParameters->FluoDirectory(); 286 auto dir = fCParameters->FluoDirectory(); 301 return (dir == fluoANSTO); 287 return (dir == fluoANSTO); 302 } 288 } 303 289 304 G4bool G4EmParameters::Auger() const 290 G4bool G4EmParameters::Auger() const 305 { 291 { 306 return fCParameters->Auger(); 292 return fCParameters->Auger(); 307 } 293 } 308 294 309 void G4EmParameters::SetPixe(G4bool val) 295 void G4EmParameters::SetPixe(G4bool val) 310 { 296 { 311 if(IsLocked()) { return; } 297 if(IsLocked()) { return; } 312 fCParameters->SetPixe(val); 298 fCParameters->SetPixe(val); 313 } 299 } 314 300 315 G4bool G4EmParameters::Pixe() const 301 G4bool G4EmParameters::Pixe() const 316 { 302 { 317 return fCParameters->Pixe(); 303 return fCParameters->Pixe(); 318 } 304 } 319 305 320 void G4EmParameters::SetDeexcitationIgnoreCut( 306 void G4EmParameters::SetDeexcitationIgnoreCut(G4bool val) 321 { 307 { 322 if(IsLocked()) { return; } 308 if(IsLocked()) { return; } 323 fCParameters->SetDeexcitationIgnoreCut(val); 309 fCParameters->SetDeexcitationIgnoreCut(val); 324 } 310 } 325 311 326 G4bool G4EmParameters::DeexcitationIgnoreCut() 312 G4bool G4EmParameters::DeexcitationIgnoreCut() const 327 { 313 { 328 return fCParameters->DeexcitationIgnoreCut() 314 return fCParameters->DeexcitationIgnoreCut(); 329 } 315 } 330 316 331 void G4EmParameters::SetLateralDisplacement(G4 317 void G4EmParameters::SetLateralDisplacement(G4bool val) 332 { 318 { 333 if(IsLocked()) { return; } 319 if(IsLocked()) { return; } 334 lateralDisplacement = val; 320 lateralDisplacement = val; 335 } 321 } 336 322 337 G4bool G4EmParameters::LateralDisplacement() c 323 G4bool G4EmParameters::LateralDisplacement() const 338 { 324 { 339 return lateralDisplacement; 325 return lateralDisplacement; 340 } 326 } 341 327 342 void G4EmParameters::SetLateralDisplacementAlg 328 void G4EmParameters::SetLateralDisplacementAlg96(G4bool val) 343 { 329 { 344 if(IsLocked()) { return; } 330 if(IsLocked()) { return; } 345 lateralDisplacementAlg96 = val; 331 lateralDisplacementAlg96 = val; 346 } 332 } 347 333 348 G4bool G4EmParameters::LateralDisplacementAlg9 334 G4bool G4EmParameters::LateralDisplacementAlg96() const 349 { 335 { 350 return lateralDisplacementAlg96; 336 return lateralDisplacementAlg96; 351 } 337 } 352 338 353 void G4EmParameters::SetMuHadLateralDisplaceme 339 void G4EmParameters::SetMuHadLateralDisplacement(G4bool val) 354 { 340 { 355 if(IsLocked()) { return; } 341 if(IsLocked()) { return; } 356 muhadLateralDisplacement = val; 342 muhadLateralDisplacement = val; 357 } 343 } 358 344 359 G4bool G4EmParameters::MuHadLateralDisplacemen 345 G4bool G4EmParameters::MuHadLateralDisplacement() const 360 { 346 { 361 return muhadLateralDisplacement; 347 return muhadLateralDisplacement; 362 } 348 } 363 349 364 void G4EmParameters::ActivateAngularGeneratorF 350 void G4EmParameters::ActivateAngularGeneratorForIonisation(G4bool val) 365 { 351 { 366 if(IsLocked()) { return; } 352 if(IsLocked()) { return; } 367 useAngGeneratorForIonisation = val; 353 useAngGeneratorForIonisation = val; 368 } 354 } 369 355 370 G4bool G4EmParameters::UseAngularGeneratorForI 356 G4bool G4EmParameters::UseAngularGeneratorForIonisation() const 371 { 357 { 372 return useAngGeneratorForIonisation; 358 return useAngGeneratorForIonisation; 373 } 359 } 374 360 375 void G4EmParameters::SetUseMottCorrection(G4bo 361 void G4EmParameters::SetUseMottCorrection(G4bool val) 376 { 362 { 377 if(IsLocked()) { return; } 363 if(IsLocked()) { return; } 378 useMottCorrection = val; 364 useMottCorrection = val; 379 } 365 } 380 366 381 G4bool G4EmParameters::UseMottCorrection() con 367 G4bool G4EmParameters::UseMottCorrection() const 382 { 368 { 383 return useMottCorrection; 369 return useMottCorrection; 384 } 370 } 385 371 386 void G4EmParameters::SetIntegral(G4bool val) 372 void G4EmParameters::SetIntegral(G4bool val) 387 { 373 { 388 if(IsLocked()) { return; } 374 if(IsLocked()) { return; } 389 integral = val; 375 integral = val; 390 } 376 } 391 377 392 G4bool G4EmParameters::Integral() const 378 G4bool G4EmParameters::Integral() const 393 { 379 { 394 return integral; 380 return integral; 395 } 381 } 396 382 397 void G4EmParameters::SetEnablePolarisation(G4b 383 void G4EmParameters::SetEnablePolarisation(G4bool val) 398 { 384 { 399 if(IsLocked()) { return; } 385 if(IsLocked()) { return; } 400 fPolarisation = val; 386 fPolarisation = val; 401 } 387 } 402 388 403 G4bool G4EmParameters::EnablePolarisation() co 389 G4bool G4EmParameters::EnablePolarisation() const 404 { 390 { 405 return fPolarisation; 391 return fPolarisation; 406 } 392 } 407 393 408 void G4EmParameters::SetBirksActive(G4bool val 394 void G4EmParameters::SetBirksActive(G4bool val) 409 { 395 { 410 if(IsLocked()) { return; } 396 if(IsLocked()) { return; } 411 birks = val; 397 birks = val; 412 if(birks && nullptr == emSaturation) { emSat 398 if(birks && nullptr == emSaturation) { emSaturation = new G4EmSaturation(1); } 413 } 399 } 414 400 415 G4bool G4EmParameters::BirksActive() const 401 G4bool G4EmParameters::BirksActive() const 416 { 402 { 417 return birks; 403 return birks; 418 } 404 } 419 405 420 void G4EmParameters::SetUseICRU90Data(G4bool v 406 void G4EmParameters::SetUseICRU90Data(G4bool val) 421 { 407 { 422 if(IsLocked()) { return; } 408 if(IsLocked()) { return; } 423 fICRU90 = val; 409 fICRU90 = val; 424 } 410 } 425 411 426 G4bool G4EmParameters::UseICRU90Data() const 412 G4bool G4EmParameters::UseICRU90Data() const 427 { 413 { 428 return fICRU90; 414 return fICRU90; 429 } 415 } 430 416 431 void G4EmParameters::SetDNAFast(G4bool val) 417 void G4EmParameters::SetDNAFast(G4bool val) 432 { 418 { 433 if(IsLocked()) { return; } 419 if(IsLocked()) { return; } 434 fCParameters->SetDNAFast(val); 420 fCParameters->SetDNAFast(val); 435 if(val) { ActivateDNA(); } 421 if(val) { ActivateDNA(); } 436 } 422 } 437 423 438 G4bool G4EmParameters::DNAFast() const 424 G4bool G4EmParameters::DNAFast() const 439 { 425 { 440 return fCParameters->DNAFast(); 426 return fCParameters->DNAFast(); 441 } 427 } 442 428 443 void G4EmParameters::SetDNAStationary(G4bool v 429 void G4EmParameters::SetDNAStationary(G4bool val) 444 { 430 { 445 if(IsLocked()) { return; } 431 if(IsLocked()) { return; } 446 fCParameters->SetDNAStationary(val); 432 fCParameters->SetDNAStationary(val); 447 if(val) { ActivateDNA(); } 433 if(val) { ActivateDNA(); } 448 } 434 } 449 435 450 G4bool G4EmParameters::DNAStationary() const 436 G4bool G4EmParameters::DNAStationary() const 451 { 437 { 452 return fCParameters->DNAStationary(); 438 return fCParameters->DNAStationary(); 453 } 439 } 454 440 455 void G4EmParameters::SetDNAElectronMsc(G4bool 441 void G4EmParameters::SetDNAElectronMsc(G4bool val) 456 { 442 { 457 if(IsLocked()) { return; } 443 if(IsLocked()) { return; } 458 fCParameters->SetDNAElectronMsc(val); 444 fCParameters->SetDNAElectronMsc(val); 459 if(val) { ActivateDNA(); } 445 if(val) { ActivateDNA(); } 460 } 446 } 461 447 462 G4bool G4EmParameters::DNAElectronMsc() const 448 G4bool G4EmParameters::DNAElectronMsc() const 463 { 449 { 464 return fCParameters->DNAElectronMsc(); 450 return fCParameters->DNAElectronMsc(); 465 } 451 } 466 452 467 void G4EmParameters::SetGeneralProcessActive(G 453 void G4EmParameters::SetGeneralProcessActive(G4bool val) 468 { 454 { 469 if(IsLocked()) { return; } 455 if(IsLocked()) { return; } 470 gener = val; 456 gener = val; 471 } 457 } 472 458 473 G4bool G4EmParameters::GeneralProcessActive() 459 G4bool G4EmParameters::GeneralProcessActive() const 474 { 460 { 475 return gener; 461 return gener; 476 } 462 } 477 463 478 void G4EmParameters::SetEmSaturation(G4EmSatur 464 void G4EmParameters::SetEmSaturation(G4EmSaturation* ptr) 479 { 465 { 480 if(IsLocked()) { return; } 466 if(IsLocked()) { return; } 481 birks = (nullptr != ptr); 467 birks = (nullptr != ptr); 482 if(emSaturation != ptr) { 468 if(emSaturation != ptr) { 483 delete emSaturation; 469 delete emSaturation; 484 emSaturation = ptr; 470 emSaturation = ptr; 485 } 471 } 486 } 472 } 487 473 488 G4bool G4EmParameters::RetrieveMuDataFromFile( 474 G4bool G4EmParameters::RetrieveMuDataFromFile() const 489 { 475 { 490 return fMuDataFromFile; 476 return fMuDataFromFile; 491 } 477 } 492 478 493 void G4EmParameters::SetRetrieveMuDataFromFile 479 void G4EmParameters::SetRetrieveMuDataFromFile(G4bool v) 494 { 480 { 495 fMuDataFromFile = v; 481 fMuDataFromFile = v; 496 } 482 } 497 483 498 void G4EmParameters::SetOnIsolated(G4bool val) 484 void G4EmParameters::SetOnIsolated(G4bool val) 499 { 485 { 500 if(IsLocked()) { return; } 486 if(IsLocked()) { return; } 501 onIsolated = val; 487 onIsolated = val; 502 } 488 } 503 489 504 G4bool G4EmParameters::OnIsolated() const 490 G4bool G4EmParameters::OnIsolated() const 505 { 491 { 506 return onIsolated; 492 return onIsolated; 507 } 493 } 508 494 509 void G4EmParameters::SetEnableSamplingTable(G4 495 void G4EmParameters::SetEnableSamplingTable(G4bool val) 510 { 496 { 511 if(IsLocked()) { return; } 497 if(IsLocked()) { return; } 512 fSamplingTable = val; 498 fSamplingTable = val; 513 } 499 } 514 500 515 G4bool G4EmParameters::EnableSamplingTable() c 501 G4bool G4EmParameters::EnableSamplingTable() const 516 { 502 { 517 return fSamplingTable; 503 return fSamplingTable; 518 } 504 } 519 505 520 G4bool G4EmParameters::PhotoeffectBelowKShell( 506 G4bool G4EmParameters::PhotoeffectBelowKShell() const 521 { 507 { 522 return fPEKShell; 508 return fPEKShell; 523 } 509 } 524 510 525 void G4EmParameters::SetPhotoeffectBelowKShell 511 void G4EmParameters::SetPhotoeffectBelowKShell(G4bool v) 526 { 512 { 527 if(IsLocked()) { return; } 513 if(IsLocked()) { return; } 528 fPEKShell = v; 514 fPEKShell = v; 529 } 515 } 530 516 531 G4bool G4EmParameters::MscPositronCorrection() 517 G4bool G4EmParameters::MscPositronCorrection() const 532 { 518 { 533 return fMscPosiCorr; 519 return fMscPosiCorr; 534 } 520 } 535 521 536 void G4EmParameters::SetMscPositronCorrection( 522 void G4EmParameters::SetMscPositronCorrection(G4bool v) 537 { 523 { 538 if(IsLocked()) { return; } 524 if(IsLocked()) { return; } 539 fMscPosiCorr = v; 525 fMscPosiCorr = v; 540 } 526 } 541 527 542 G4bool G4EmParameters::UseEPICS2017XS() const << 543 { << 544 return fUseEPICS2017XS; << 545 } << 546 << 547 void G4EmParameters::SetUseEPICS2017XS(G4bool << 548 { << 549 if(IsLocked()) { return; } << 550 fUseEPICS2017XS = v; << 551 } << 552 << 553 G4bool G4EmParameters::Use3GammaAnnihilationOn << 554 { << 555 return f3GammaAnnihilationOnFly; << 556 } << 557 << 558 void G4EmParameters::Set3GammaAnnihilationOnFl << 559 { << 560 if(IsLocked()) { return; } << 561 f3GammaAnnihilationOnFly = v; << 562 } << 563 << 564 G4bool G4EmParameters::UseRiGePairProductionMo << 565 { << 566 return fUseRiGePairProductionModel; << 567 } << 568 << 569 void G4EmParameters::SetUseRiGePairProductionM << 570 { << 571 if (IsLocked()) { return; } << 572 fUseRiGePairProductionModel = v; << 573 } << 574 << 575 void G4EmParameters::ActivateDNA() 528 void G4EmParameters::ActivateDNA() 576 { 529 { 577 if(IsLocked()) { return; } 530 if(IsLocked()) { return; } 578 fDNA = true; 531 fDNA = true; 579 } 532 } 580 533 581 void G4EmParameters::SetIsPrintedFlag(G4bool v 534 void G4EmParameters::SetIsPrintedFlag(G4bool val) 582 { 535 { 583 fIsPrinted = val; 536 fIsPrinted = val; 584 } 537 } 585 538 586 G4bool G4EmParameters::IsPrintLocked() const 539 G4bool G4EmParameters::IsPrintLocked() const 587 { 540 { 588 return fIsPrinted; 541 return fIsPrinted; 589 } 542 } 590 543 591 G4EmSaturation* G4EmParameters::GetEmSaturatio 544 G4EmSaturation* G4EmParameters::GetEmSaturation() 592 { 545 { 593 if(nullptr == emSaturation) { 546 if(nullptr == emSaturation) { 594 #ifdef G4MULTITHREADED 547 #ifdef G4MULTITHREADED 595 G4MUTEXLOCK(&emParametersMutex); 548 G4MUTEXLOCK(&emParametersMutex); 596 if(nullptr == emSaturation) { 549 if(nullptr == emSaturation) { 597 #endif 550 #endif 598 emSaturation = new G4EmSaturation(1); 551 emSaturation = new G4EmSaturation(1); 599 #ifdef G4MULTITHREADED 552 #ifdef G4MULTITHREADED 600 } 553 } 601 G4MUTEXUNLOCK(&emParametersMutex); 554 G4MUTEXUNLOCK(&emParametersMutex); 602 #endif 555 #endif 603 } 556 } 604 birks = true; 557 birks = true; 605 return emSaturation; 558 return emSaturation; 606 } 559 } 607 560 608 void G4EmParameters::SetMinEnergy(G4double val 561 void G4EmParameters::SetMinEnergy(G4double val) 609 { 562 { 610 if(IsLocked()) { return; } 563 if(IsLocked()) { return; } 611 if(val > 1.e-3*CLHEP::eV && val < maxKinEner 564 if(val > 1.e-3*CLHEP::eV && val < maxKinEnergy) { 612 minKinEnergy = val; 565 minKinEnergy = val; 613 } else { 566 } else { 614 G4ExceptionDescription ed; 567 G4ExceptionDescription ed; 615 ed << "Value of MinKinEnergy - is out of r 568 ed << "Value of MinKinEnergy - is out of range: " << val/CLHEP::MeV 616 << " MeV is ignored"; 569 << " MeV is ignored"; 617 PrintWarning(ed); 570 PrintWarning(ed); 618 } 571 } 619 } 572 } 620 573 621 G4double G4EmParameters::MinKinEnergy() const 574 G4double G4EmParameters::MinKinEnergy() const 622 { 575 { 623 return minKinEnergy; 576 return minKinEnergy; 624 } 577 } 625 578 626 void G4EmParameters::SetMaxEnergy(G4double val 579 void G4EmParameters::SetMaxEnergy(G4double val) 627 { 580 { 628 if(IsLocked()) { return; } 581 if(IsLocked()) { return; } 629 if(val > std::max(minKinEnergy,599.9*CLHEP:: << 582 if(val > std::max(minKinEnergy,9.99*CLHEP::MeV) && val < 1.e+7*CLHEP::TeV) { 630 maxKinEnergy = val; 583 maxKinEnergy = val; 631 } else { 584 } else { 632 G4ExceptionDescription ed; 585 G4ExceptionDescription ed; 633 ed << "Value of MaxKinEnergy is out of ran 586 ed << "Value of MaxKinEnergy is out of range: " 634 << val/CLHEP::GeV 587 << val/CLHEP::GeV 635 << " GeV is ignored; allowed range 600 << 588 << " GeV is ignored; allowed range 10 MeV - 1.e+7 TeV"; 636 PrintWarning(ed); 589 PrintWarning(ed); 637 } 590 } 638 } 591 } 639 592 640 G4double G4EmParameters::MaxKinEnergy() const 593 G4double G4EmParameters::MaxKinEnergy() const 641 { 594 { 642 return maxKinEnergy; 595 return maxKinEnergy; 643 } 596 } 644 597 645 void G4EmParameters::SetMaxEnergyForCSDARange( 598 void G4EmParameters::SetMaxEnergyForCSDARange(G4double val) 646 { 599 { 647 if(IsLocked()) { return; } 600 if(IsLocked()) { return; } 648 if(val > minKinEnergy && val <= 100*CLHEP::T 601 if(val > minKinEnergy && val <= 100*CLHEP::TeV) { 649 maxKinEnergyCSDA = val; 602 maxKinEnergyCSDA = val; 650 } else { 603 } else { 651 G4ExceptionDescription ed; 604 G4ExceptionDescription ed; 652 ed << "Value of MaxKinEnergyCSDA is out of 605 ed << "Value of MaxKinEnergyCSDA is out of range: " 653 << val/CLHEP::GeV << " GeV is ignored; 606 << val/CLHEP::GeV << " GeV is ignored; allowed range " 654 << minKinEnergy << " MeV - 100 TeV"; 607 << minKinEnergy << " MeV - 100 TeV"; 655 PrintWarning(ed); 608 PrintWarning(ed); 656 } 609 } 657 } 610 } 658 611 659 G4double G4EmParameters::MaxEnergyForCSDARange 612 G4double G4EmParameters::MaxEnergyForCSDARange() const 660 { 613 { 661 return maxKinEnergyCSDA; 614 return maxKinEnergyCSDA; 662 } 615 } 663 616 664 void G4EmParameters::SetLowestElectronEnergy(G 617 void G4EmParameters::SetLowestElectronEnergy(G4double val) 665 { 618 { 666 if(IsLocked()) { return; } 619 if(IsLocked()) { return; } 667 if(val >= 0.0) { lowestElectronEnergy = val; 620 if(val >= 0.0) { lowestElectronEnergy = val; } 668 } 621 } 669 622 670 G4double G4EmParameters::LowestElectronEnergy( 623 G4double G4EmParameters::LowestElectronEnergy() const 671 { 624 { 672 return lowestElectronEnergy; 625 return lowestElectronEnergy; 673 } 626 } 674 627 675 void G4EmParameters::SetLowestMuHadEnergy(G4do 628 void G4EmParameters::SetLowestMuHadEnergy(G4double val) 676 { 629 { 677 if(IsLocked()) { return; } 630 if(IsLocked()) { return; } 678 if(val >= 0.0) { lowestMuHadEnergy = val; } 631 if(val >= 0.0) { lowestMuHadEnergy = val; } 679 } 632 } 680 633 681 G4double G4EmParameters::LowestMuHadEnergy() c 634 G4double G4EmParameters::LowestMuHadEnergy() const 682 { 635 { 683 return lowestMuHadEnergy; 636 return lowestMuHadEnergy; 684 } 637 } 685 638 686 void G4EmParameters::SetLowestTripletEnergy(G4 639 void G4EmParameters::SetLowestTripletEnergy(G4double val) 687 { 640 { 688 if(IsLocked()) { return; } 641 if(IsLocked()) { return; } 689 if(val > 0.0) { lowestTripletEnergy = val; } 642 if(val > 0.0) { lowestTripletEnergy = val; } 690 } 643 } 691 644 692 G4double G4EmParameters::LowestTripletEnergy() 645 G4double G4EmParameters::LowestTripletEnergy() const 693 { 646 { 694 return lowestTripletEnergy; 647 return lowestTripletEnergy; 695 } 648 } 696 649 697 void G4EmParameters::SetMaxNIELEnergy(G4double 650 void G4EmParameters::SetMaxNIELEnergy(G4double val) 698 { 651 { 699 if(IsLocked()) { return; } 652 if(IsLocked()) { return; } 700 if(val >= 0.0) { maxNIELEnergy = val; } 653 if(val >= 0.0) { maxNIELEnergy = val; } 701 } 654 } 702 655 703 G4double G4EmParameters::MaxNIELEnergy() const 656 G4double G4EmParameters::MaxNIELEnergy() const 704 { 657 { 705 return maxNIELEnergy; 658 return maxNIELEnergy; 706 } 659 } 707 660 708 void G4EmParameters::SetMaxEnergyFor5DMuPair(G 661 void G4EmParameters::SetMaxEnergyFor5DMuPair(G4double val) 709 { 662 { 710 if(IsLocked()) { return; } 663 if(IsLocked()) { return; } 711 if(val > 0.0) { max5DEnergyForMuPair = val; 664 if(val > 0.0) { max5DEnergyForMuPair = val; } 712 } 665 } 713 666 714 G4double G4EmParameters::MaxEnergyFor5DMuPair( 667 G4double G4EmParameters::MaxEnergyFor5DMuPair() const 715 { 668 { 716 return max5DEnergyForMuPair; 669 return max5DEnergyForMuPair; 717 } 670 } 718 671 719 void G4EmParameters::SetLinearLossLimit(G4doub 672 void G4EmParameters::SetLinearLossLimit(G4double val) 720 { 673 { 721 if(IsLocked()) { return; } 674 if(IsLocked()) { return; } 722 if(val > 0.0 && val < 0.5) { 675 if(val > 0.0 && val < 0.5) { 723 linLossLimit = val; 676 linLossLimit = val; 724 } else { 677 } else { 725 G4ExceptionDescription ed; 678 G4ExceptionDescription ed; 726 ed << "Value of linLossLimit is out of ran 679 ed << "Value of linLossLimit is out of range: " << val 727 << " is ignored"; 680 << " is ignored"; 728 PrintWarning(ed); 681 PrintWarning(ed); 729 } 682 } 730 } 683 } 731 684 732 G4double G4EmParameters::LinearLossLimit() con 685 G4double G4EmParameters::LinearLossLimit() const 733 { 686 { 734 return linLossLimit; 687 return linLossLimit; 735 } 688 } 736 689 737 void G4EmParameters::SetBremsstrahlungTh(G4dou 690 void G4EmParameters::SetBremsstrahlungTh(G4double val) 738 { 691 { 739 if(IsLocked()) { return; } 692 if(IsLocked()) { return; } 740 if(val > 0.0) { 693 if(val > 0.0) { 741 bremsTh = val; 694 bremsTh = val; 742 } else { 695 } else { 743 G4ExceptionDescription ed; 696 G4ExceptionDescription ed; 744 ed << "Value of bremsstrahlung threshold i 697 ed << "Value of bremsstrahlung threshold is out of range: " 745 << val/GeV << " GeV is ignored"; 698 << val/GeV << " GeV is ignored"; 746 PrintWarning(ed); 699 PrintWarning(ed); 747 } 700 } 748 } 701 } 749 702 750 G4double G4EmParameters::BremsstrahlungTh() co 703 G4double G4EmParameters::BremsstrahlungTh() const 751 { 704 { 752 return bremsTh; 705 return bremsTh; 753 } 706 } 754 707 755 void G4EmParameters::SetMuHadBremsstrahlungTh( 708 void G4EmParameters::SetMuHadBremsstrahlungTh(G4double val) 756 { 709 { 757 if(IsLocked()) { return; } 710 if(IsLocked()) { return; } 758 if(val > 0.0) { 711 if(val > 0.0) { 759 bremsMuHadTh = val; 712 bremsMuHadTh = val; 760 } else { 713 } else { 761 G4ExceptionDescription ed; 714 G4ExceptionDescription ed; 762 ed << "Value of bremsstrahlung threshold i 715 ed << "Value of bremsstrahlung threshold is out of range: " 763 << val/GeV << " GeV is ignored"; 716 << val/GeV << " GeV is ignored"; 764 PrintWarning(ed); 717 PrintWarning(ed); 765 } 718 } 766 } 719 } 767 720 768 G4double G4EmParameters::MuHadBremsstrahlungTh 721 G4double G4EmParameters::MuHadBremsstrahlungTh() const 769 { 722 { 770 return bremsMuHadTh; 723 return bremsMuHadTh; 771 } 724 } 772 725 773 void G4EmParameters::SetLambdaFactor(G4double 726 void G4EmParameters::SetLambdaFactor(G4double val) 774 { 727 { 775 if(IsLocked()) { return; } 728 if(IsLocked()) { return; } 776 if(val > 0.0 && val < 1.0) { 729 if(val > 0.0 && val < 1.0) { 777 lambdaFactor = val; 730 lambdaFactor = val; 778 } else { 731 } else { 779 G4ExceptionDescription ed; 732 G4ExceptionDescription ed; 780 ed << "Value of lambda factor is out of ra 733 ed << "Value of lambda factor is out of range: " << val 781 << " is ignored"; 734 << " is ignored"; 782 PrintWarning(ed); 735 PrintWarning(ed); 783 } 736 } 784 } 737 } 785 738 786 G4double G4EmParameters::LambdaFactor() const 739 G4double G4EmParameters::LambdaFactor() const 787 { 740 { 788 return lambdaFactor; 741 return lambdaFactor; 789 } 742 } 790 743 791 void G4EmParameters::SetFactorForAngleLimit(G4 744 void G4EmParameters::SetFactorForAngleLimit(G4double val) 792 { 745 { 793 if(IsLocked()) { return; } 746 if(IsLocked()) { return; } 794 if(val > 0.0) { 747 if(val > 0.0) { 795 factorForAngleLimit = val; 748 factorForAngleLimit = val; 796 } else { 749 } else { 797 G4ExceptionDescription ed; 750 G4ExceptionDescription ed; 798 ed << "Value of factor for enegry limit is 751 ed << "Value of factor for enegry limit is out of range: " 799 << val << " is ignored"; 752 << val << " is ignored"; 800 PrintWarning(ed); 753 PrintWarning(ed); 801 } 754 } 802 } 755 } 803 756 804 G4double G4EmParameters::FactorForAngleLimit() 757 G4double G4EmParameters::FactorForAngleLimit() const 805 { 758 { 806 return factorForAngleLimit; 759 return factorForAngleLimit; 807 } 760 } 808 761 809 void G4EmParameters::SetMscThetaLimit(G4double 762 void G4EmParameters::SetMscThetaLimit(G4double val) 810 { 763 { 811 if(IsLocked()) { return; } 764 if(IsLocked()) { return; } 812 if(val >= 0.0 && val <= pi) { 765 if(val >= 0.0 && val <= pi) { 813 thetaLimit = val; 766 thetaLimit = val; 814 } else { 767 } else { 815 G4ExceptionDescription ed; 768 G4ExceptionDescription ed; 816 ed << "Value of polar angle limit is out o 769 ed << "Value of polar angle limit is out of range: " 817 << val << " is ignored"; 770 << val << " is ignored"; 818 PrintWarning(ed); 771 PrintWarning(ed); 819 } 772 } 820 } 773 } 821 774 822 G4double G4EmParameters::MscThetaLimit() const 775 G4double G4EmParameters::MscThetaLimit() const 823 { 776 { 824 return thetaLimit; 777 return thetaLimit; 825 } 778 } 826 779 827 void G4EmParameters::SetMscEnergyLimit(G4doubl 780 void G4EmParameters::SetMscEnergyLimit(G4double val) 828 { 781 { 829 if(IsLocked()) { return; } 782 if(IsLocked()) { return; } 830 if(val >= 0.0) { 783 if(val >= 0.0) { 831 energyLimit = val; 784 energyLimit = val; 832 } else { 785 } else { 833 G4ExceptionDescription ed; 786 G4ExceptionDescription ed; 834 ed << "Value of msc energy limit is out of 787 ed << "Value of msc energy limit is out of range: " 835 << val << " is ignored"; 788 << val << " is ignored"; 836 PrintWarning(ed); 789 PrintWarning(ed); 837 } 790 } 838 } 791 } 839 792 840 G4double G4EmParameters::MscEnergyLimit() cons 793 G4double G4EmParameters::MscEnergyLimit() const 841 { 794 { 842 return energyLimit; 795 return energyLimit; 843 } 796 } 844 797 845 void G4EmParameters::SetMscRangeFactor(G4doubl 798 void G4EmParameters::SetMscRangeFactor(G4double val) 846 { 799 { 847 if(IsLocked()) { return; } 800 if(IsLocked()) { return; } 848 if(val > 0.0 && val < 1.0) { 801 if(val > 0.0 && val < 1.0) { 849 rangeFactor = val; 802 rangeFactor = val; 850 } else { 803 } else { 851 G4ExceptionDescription ed; 804 G4ExceptionDescription ed; 852 ed << "Value of rangeFactor is out of rang 805 ed << "Value of rangeFactor is out of range: " 853 << val << " is ignored"; 806 << val << " is ignored"; 854 PrintWarning(ed); 807 PrintWarning(ed); 855 } 808 } 856 } 809 } 857 810 858 G4double G4EmParameters::MscRangeFactor() cons 811 G4double G4EmParameters::MscRangeFactor() const 859 { 812 { 860 return rangeFactor; 813 return rangeFactor; 861 } 814 } 862 815 863 void G4EmParameters::SetMscMuHadRangeFactor(G4 816 void G4EmParameters::SetMscMuHadRangeFactor(G4double val) 864 { 817 { 865 if(IsLocked()) { return; } 818 if(IsLocked()) { return; } 866 if(val > 0.0 && val < 1.0) { 819 if(val > 0.0 && val < 1.0) { 867 rangeFactorMuHad = val; 820 rangeFactorMuHad = val; 868 } else { 821 } else { 869 G4ExceptionDescription ed; 822 G4ExceptionDescription ed; 870 ed << "Value of rangeFactorMuHad is out of 823 ed << "Value of rangeFactorMuHad is out of range: " 871 << val << " is ignored"; 824 << val << " is ignored"; 872 PrintWarning(ed); 825 PrintWarning(ed); 873 } 826 } 874 } 827 } 875 828 876 G4double G4EmParameters::MscMuHadRangeFactor() 829 G4double G4EmParameters::MscMuHadRangeFactor() const 877 { 830 { 878 return rangeFactorMuHad; 831 return rangeFactorMuHad; 879 } 832 } 880 833 881 void G4EmParameters::SetMscGeomFactor(G4double 834 void G4EmParameters::SetMscGeomFactor(G4double val) 882 { 835 { 883 if(IsLocked()) { return; } 836 if(IsLocked()) { return; } 884 if(val >= 1.0) { 837 if(val >= 1.0) { 885 geomFactor = val; 838 geomFactor = val; 886 } else { 839 } else { 887 G4ExceptionDescription ed; 840 G4ExceptionDescription ed; 888 ed << "Value of geomFactor is out of range 841 ed << "Value of geomFactor is out of range: " 889 << val << " is ignored"; 842 << val << " is ignored"; 890 PrintWarning(ed); 843 PrintWarning(ed); 891 } 844 } 892 } 845 } 893 846 894 G4double G4EmParameters::MscGeomFactor() const 847 G4double G4EmParameters::MscGeomFactor() const 895 { 848 { 896 return geomFactor; 849 return geomFactor; 897 } 850 } 898 851 899 void G4EmParameters::SetMscSafetyFactor(G4doub 852 void G4EmParameters::SetMscSafetyFactor(G4double val) 900 { 853 { 901 if(IsLocked()) { return; } 854 if(IsLocked()) { return; } 902 if(val >= 0.1) { 855 if(val >= 0.1) { 903 safetyFactor = val; 856 safetyFactor = val; 904 } else { 857 } else { 905 G4ExceptionDescription ed; 858 G4ExceptionDescription ed; 906 ed << "Value of safetyFactor is out of ran 859 ed << "Value of safetyFactor is out of range: " 907 << val << " is ignored"; 860 << val << " is ignored"; 908 PrintWarning(ed); 861 PrintWarning(ed); 909 } 862 } 910 } 863 } 911 864 912 G4double G4EmParameters::MscSafetyFactor() con 865 G4double G4EmParameters::MscSafetyFactor() const 913 { 866 { 914 return safetyFactor; 867 return safetyFactor; 915 } 868 } 916 869 917 void G4EmParameters::SetMscLambdaLimit(G4doubl 870 void G4EmParameters::SetMscLambdaLimit(G4double val) 918 { 871 { 919 if(IsLocked()) { return; } 872 if(IsLocked()) { return; } 920 if(val >= 0.0) { 873 if(val >= 0.0) { 921 lambdaLimit = val; 874 lambdaLimit = val; 922 } else { 875 } else { 923 G4ExceptionDescription ed; 876 G4ExceptionDescription ed; 924 ed << "Value of lambdaLimit is out of rang 877 ed << "Value of lambdaLimit is out of range: " 925 << val << " is ignored"; 878 << val << " is ignored"; 926 PrintWarning(ed); 879 PrintWarning(ed); 927 } 880 } 928 } 881 } 929 882 930 G4double G4EmParameters::MscLambdaLimit() cons 883 G4double G4EmParameters::MscLambdaLimit() const 931 { 884 { 932 return lambdaLimit; 885 return lambdaLimit; 933 } 886 } 934 887 935 void G4EmParameters::SetMscSkin(G4double val) 888 void G4EmParameters::SetMscSkin(G4double val) 936 { 889 { 937 if(IsLocked()) { return; } 890 if(IsLocked()) { return; } 938 if(val >= 1.0) { 891 if(val >= 1.0) { 939 skin = val; 892 skin = val; 940 } else { 893 } else { 941 G4ExceptionDescription ed; 894 G4ExceptionDescription ed; 942 ed << "Value of skin is out of range: " 895 ed << "Value of skin is out of range: " 943 << val << " is ignored"; 896 << val << " is ignored"; 944 PrintWarning(ed); 897 PrintWarning(ed); 945 } 898 } 946 } 899 } 947 900 948 G4double G4EmParameters::MscSkin() const 901 G4double G4EmParameters::MscSkin() const 949 { 902 { 950 return skin; 903 return skin; 951 } 904 } 952 905 953 void G4EmParameters::SetScreeningFactor(G4doub 906 void G4EmParameters::SetScreeningFactor(G4double val) 954 { 907 { 955 if(IsLocked()) { return; } 908 if(IsLocked()) { return; } 956 if(val > 0.0) { 909 if(val > 0.0) { 957 factorScreen = val; 910 factorScreen = val; 958 } else { 911 } else { 959 G4ExceptionDescription ed; 912 G4ExceptionDescription ed; 960 ed << "Value of factorScreen is out of ran 913 ed << "Value of factorScreen is out of range: " 961 << val << " is ignored"; 914 << val << " is ignored"; 962 PrintWarning(ed); 915 PrintWarning(ed); 963 } 916 } 964 } 917 } 965 918 966 G4double G4EmParameters::ScreeningFactor() con 919 G4double G4EmParameters::ScreeningFactor() const 967 { 920 { 968 return factorScreen; 921 return factorScreen; 969 } 922 } 970 923 971 void G4EmParameters::SetStepFunction(G4double 924 void G4EmParameters::SetStepFunction(G4double v1, G4double v2) 972 { 925 { 973 if(IsLocked()) { return; } 926 if(IsLocked()) { return; } 974 fBParameters->SetStepFunction(v1, v2); 927 fBParameters->SetStepFunction(v1, v2); 975 } 928 } 976 929 977 void G4EmParameters::SetStepFunctionMuHad(G4do 930 void G4EmParameters::SetStepFunctionMuHad(G4double v1, G4double v2) 978 { 931 { 979 if(IsLocked()) { return; } 932 if(IsLocked()) { return; } 980 fBParameters->SetStepFunctionMuHad(v1, v2); 933 fBParameters->SetStepFunctionMuHad(v1, v2); 981 } 934 } 982 935 983 void G4EmParameters::SetStepFunctionLightIons( 936 void G4EmParameters::SetStepFunctionLightIons(G4double v1, G4double v2) 984 { 937 { 985 if(IsLocked()) { return; } 938 if(IsLocked()) { return; } 986 fBParameters->SetStepFunctionLightIons(v1, v 939 fBParameters->SetStepFunctionLightIons(v1, v2); 987 } 940 } 988 941 989 void G4EmParameters::SetStepFunctionIons(G4dou 942 void G4EmParameters::SetStepFunctionIons(G4double v1, G4double v2) 990 { 943 { 991 if(IsLocked()) { return; } 944 if(IsLocked()) { return; } 992 fBParameters->SetStepFunctionIons(v1, v2); 945 fBParameters->SetStepFunctionIons(v1, v2); 993 } 946 } 994 947 995 void G4EmParameters::FillStepFunction(const G4 948 void G4EmParameters::FillStepFunction(const G4ParticleDefinition* part, G4VEnergyLossProcess* proc) const 996 { 949 { 997 fBParameters->FillStepFunction(part, proc); 950 fBParameters->FillStepFunction(part, proc); 998 } 951 } 999 952 1000 G4int G4EmParameters::NumberOfBins() const 953 G4int G4EmParameters::NumberOfBins() const 1001 { 954 { 1002 return nbinsPerDecade*G4lrint(std::log10(ma 955 return nbinsPerDecade*G4lrint(std::log10(maxKinEnergy/minKinEnergy)); 1003 } 956 } 1004 957 1005 void G4EmParameters::SetNumberOfBinsPerDecade 958 void G4EmParameters::SetNumberOfBinsPerDecade(G4int val) 1006 { 959 { 1007 if(IsLocked()) { return; } 960 if(IsLocked()) { return; } 1008 if(val >= 5 && val < 1000000) { 961 if(val >= 5 && val < 1000000) { 1009 nbinsPerDecade = val; 962 nbinsPerDecade = val; 1010 } else { 963 } else { 1011 G4ExceptionDescription ed; 964 G4ExceptionDescription ed; 1012 ed << "Value of number of bins per decade 965 ed << "Value of number of bins per decade is out of range: " 1013 << val << " is ignored"; 966 << val << " is ignored"; 1014 PrintWarning(ed); 967 PrintWarning(ed); 1015 } 968 } 1016 } 969 } 1017 970 1018 G4int G4EmParameters::NumberOfBinsPerDecade() 971 G4int G4EmParameters::NumberOfBinsPerDecade() const 1019 { 972 { 1020 return nbinsPerDecade; 973 return nbinsPerDecade; 1021 } 974 } 1022 975 1023 void G4EmParameters::SetVerbose(G4int val) 976 void G4EmParameters::SetVerbose(G4int val) 1024 { 977 { 1025 if(IsLocked()) { return; } 978 if(IsLocked()) { return; } 1026 verbose = val; 979 verbose = val; 1027 workerVerbose = std::min(workerVerbose, ver 980 workerVerbose = std::min(workerVerbose, verbose); 1028 } 981 } 1029 982 1030 G4int G4EmParameters::Verbose() const 983 G4int G4EmParameters::Verbose() const 1031 { 984 { 1032 return verbose; 985 return verbose; 1033 } 986 } 1034 987 1035 void G4EmParameters::SetWorkerVerbose(G4int v 988 void G4EmParameters::SetWorkerVerbose(G4int val) 1036 { 989 { 1037 if(IsLocked()) { return; } 990 if(IsLocked()) { return; } 1038 workerVerbose = val; 991 workerVerbose = val; 1039 } 992 } 1040 993 1041 G4int G4EmParameters::WorkerVerbose() const 994 G4int G4EmParameters::WorkerVerbose() const 1042 { 995 { 1043 return workerVerbose; 996 return workerVerbose; 1044 } 997 } 1045 998 1046 void G4EmParameters::SetNumberForFreeVector(G << 1047 { << 1048 if(IsLocked()) { return; } << 1049 nForFreeVector = val; << 1050 } << 1051 << 1052 G4int G4EmParameters::NumberForFreeVector() c << 1053 { << 1054 return nForFreeVector; << 1055 } << 1056 << 1057 void G4EmParameters::SetTransportationWithMsc 999 void G4EmParameters::SetTransportationWithMsc(G4TransportationWithMscType val) 1058 { 1000 { 1059 if(IsLocked()) { return; } 1001 if(IsLocked()) { return; } 1060 fTransportationWithMsc = val; 1002 fTransportationWithMsc = val; 1061 } 1003 } 1062 1004 1063 G4TransportationWithMscType G4EmParameters::T 1005 G4TransportationWithMscType G4EmParameters::TransportationWithMsc() const 1064 { 1006 { 1065 return fTransportationWithMsc; 1007 return fTransportationWithMsc; 1066 } 1008 } 1067 1009 1068 void G4EmParameters::SetFluctuationType(G4EmF 1010 void G4EmParameters::SetFluctuationType(G4EmFluctuationType val) 1069 { 1011 { 1070 if(IsLocked()) { return; } 1012 if(IsLocked()) { return; } 1071 fFluct = val; 1013 fFluct = val; 1072 } 1014 } 1073 1015 1074 G4EmFluctuationType G4EmParameters::Fluctuati 1016 G4EmFluctuationType G4EmParameters::FluctuationType() const 1075 { 1017 { 1076 return fFluct; 1018 return fFluct; 1077 } 1019 } 1078 1020 1079 void G4EmParameters::SetPositronAtRestModelTy << 1080 { << 1081 if(IsLocked()) { return; } << 1082 fPositronium = val; << 1083 } << 1084 << 1085 G4PositronAtRestModelType G4EmParameters::Pos << 1086 { << 1087 return fPositronium; << 1088 } << 1089 << 1090 void G4EmParameters::SetMscStepLimitType(G4Ms 1021 void G4EmParameters::SetMscStepLimitType(G4MscStepLimitType val) 1091 { 1022 { 1092 if(IsLocked()) { return; } 1023 if(IsLocked()) { return; } 1093 mscStepLimit = val; 1024 mscStepLimit = val; 1094 } 1025 } 1095 1026 1096 G4MscStepLimitType G4EmParameters::MscStepLim 1027 G4MscStepLimitType G4EmParameters::MscStepLimitType() const 1097 { 1028 { 1098 return mscStepLimit; 1029 return mscStepLimit; 1099 } 1030 } 1100 1031 1101 void G4EmParameters::SetMscMuHadStepLimitType 1032 void G4EmParameters::SetMscMuHadStepLimitType(G4MscStepLimitType val) 1102 { 1033 { 1103 if(IsLocked()) { return; } 1034 if(IsLocked()) { return; } 1104 mscStepLimitMuHad = val; 1035 mscStepLimitMuHad = val; 1105 } 1036 } 1106 1037 1107 G4MscStepLimitType G4EmParameters::MscMuHadSt 1038 G4MscStepLimitType G4EmParameters::MscMuHadStepLimitType() const 1108 { 1039 { 1109 return mscStepLimitMuHad; 1040 return mscStepLimitMuHad; 1110 } 1041 } 1111 1042 1112 void G4EmParameters::SetSingleScatteringType( 1043 void G4EmParameters::SetSingleScatteringType(G4eSingleScatteringType val) 1113 { 1044 { 1114 if(IsLocked()) { return; } 1045 if(IsLocked()) { return; } 1115 fSStype = val; 1046 fSStype = val; 1116 } 1047 } 1117 1048 1118 G4eSingleScatteringType G4EmParameters::Singl 1049 G4eSingleScatteringType G4EmParameters::SingleScatteringType() const 1119 { 1050 { 1120 return fSStype; 1051 return fSStype; 1121 } 1052 } 1122 1053 1123 void 1054 void 1124 G4EmParameters::SetNuclearFormfactorType(G4Nu 1055 G4EmParameters::SetNuclearFormfactorType(G4NuclearFormfactorType val) 1125 { 1056 { 1126 if(IsLocked()) { return; } 1057 if(IsLocked()) { return; } 1127 nucFormfactor = val; 1058 nucFormfactor = val; 1128 } 1059 } 1129 1060 1130 G4NuclearFormfactorType G4EmParameters::Nucle 1061 G4NuclearFormfactorType G4EmParameters::NuclearFormfactorType() const 1131 { 1062 { 1132 return nucFormfactor; 1063 return nucFormfactor; 1133 } 1064 } 1134 1065 1135 void G4EmParameters::SetDNAeSolvationSubType( 1066 void G4EmParameters::SetDNAeSolvationSubType(G4DNAModelSubType val) 1136 { 1067 { 1137 if(IsLocked()) { return; } 1068 if(IsLocked()) { return; } 1138 fCParameters->SetDNAeSolvationSubType(val); 1069 fCParameters->SetDNAeSolvationSubType(val); 1139 ActivateDNA(); 1070 ActivateDNA(); 1140 } 1071 } 1141 1072 1142 G4DNAModelSubType G4EmParameters::DNAeSolvati 1073 G4DNAModelSubType G4EmParameters::DNAeSolvationSubType() const 1143 { 1074 { 1144 return fCParameters->DNAeSolvationSubType() 1075 return fCParameters->DNAeSolvationSubType(); 1145 } 1076 } 1146 1077 1147 void G4EmParameters::SetConversionType(G4int 1078 void G4EmParameters::SetConversionType(G4int val) 1148 { 1079 { 1149 if(IsLocked()) { return; } 1080 if(IsLocked()) { return; } 1150 tripletConv = val; 1081 tripletConv = val; 1151 } 1082 } 1152 1083 1153 G4int G4EmParameters::GetConversionType() con 1084 G4int G4EmParameters::GetConversionType() const 1154 { 1085 { 1155 return tripletConv; 1086 return tripletConv; 1156 } 1087 } 1157 1088 1158 void G4EmParameters::SetPIXECrossSectionModel 1089 void G4EmParameters::SetPIXECrossSectionModel(const G4String& sss) 1159 { 1090 { 1160 if(IsLocked()) { return; } 1091 if(IsLocked()) { return; } 1161 fCParameters->SetPIXECrossSectionModel(sss) 1092 fCParameters->SetPIXECrossSectionModel(sss); 1162 } 1093 } 1163 1094 1164 const G4String& G4EmParameters::PIXECrossSect 1095 const G4String& G4EmParameters::PIXECrossSectionModel() 1165 { 1096 { 1166 return fCParameters->PIXECrossSectionModel( 1097 return fCParameters->PIXECrossSectionModel(); 1167 } 1098 } 1168 1099 1169 void G4EmParameters::SetPIXEElectronCrossSect 1100 void G4EmParameters::SetPIXEElectronCrossSectionModel(const G4String& sss) 1170 { 1101 { 1171 if(IsLocked()) { return; } 1102 if(IsLocked()) { return; } 1172 fCParameters->SetPIXEElectronCrossSectionMo 1103 fCParameters->SetPIXEElectronCrossSectionModel(sss); 1173 } 1104 } 1174 1105 1175 const G4String& G4EmParameters::PIXEElectronC 1106 const G4String& G4EmParameters::PIXEElectronCrossSectionModel() 1176 { 1107 { 1177 return fCParameters->PIXEElectronCrossSecti 1108 return fCParameters->PIXEElectronCrossSectionModel(); 1178 } 1109 } 1179 1110 1180 void G4EmParameters::SetLivermoreDataDir(cons 1111 void G4EmParameters::SetLivermoreDataDir(const G4String& sss) 1181 { 1112 { 1182 if(IsLocked()) { return; } 1113 if(IsLocked()) { return; } 1183 fCParameters->SetLivermoreDataDir(sss); 1114 fCParameters->SetLivermoreDataDir(sss); 1184 } 1115 } 1185 1116 1186 const G4String& G4EmParameters::LivermoreData 1117 const G4String& G4EmParameters::LivermoreDataDir() 1187 { 1118 { 1188 return fCParameters->LivermoreDataDir(); 1119 return fCParameters->LivermoreDataDir(); 1189 } 1120 } 1190 1121 1191 void G4EmParameters::PrintWarning(G4Exception 1122 void G4EmParameters::PrintWarning(G4ExceptionDescription& ed) const 1192 { 1123 { 1193 G4Exception("G4EmParameters", "em0044", Jus 1124 G4Exception("G4EmParameters", "em0044", JustWarning, ed); 1194 } 1125 } 1195 1126 1196 void G4EmParameters::AddPAIModel(const G4Stri 1127 void G4EmParameters::AddPAIModel(const G4String& particle, 1197 const G4Stri 1128 const G4String& region, 1198 const G4Stri 1129 const G4String& type) 1199 { 1130 { 1200 if(IsLocked()) { return; } 1131 if(IsLocked()) { return; } 1201 fBParameters->AddPAIModel(particle, region, 1132 fBParameters->AddPAIModel(particle, region, type); 1202 } 1133 } 1203 1134 1204 const std::vector<G4String>& G4EmParameters:: 1135 const std::vector<G4String>& G4EmParameters::ParticlesPAI() const 1205 { 1136 { 1206 return fBParameters->ParticlesPAI(); 1137 return fBParameters->ParticlesPAI(); 1207 } 1138 } 1208 1139 1209 const std::vector<G4String>& G4EmParameters:: 1140 const std::vector<G4String>& G4EmParameters::RegionsPAI() const 1210 { 1141 { 1211 return fBParameters->RegionsPAI(); 1142 return fBParameters->RegionsPAI(); 1212 } 1143 } 1213 1144 1214 const std::vector<G4String>& G4EmParameters:: 1145 const std::vector<G4String>& G4EmParameters::TypesPAI() const 1215 { 1146 { 1216 return fBParameters->TypesPAI(); 1147 return fBParameters->TypesPAI(); 1217 } 1148 } 1218 1149 1219 void G4EmParameters::AddMicroElec(const G4Str 1150 void G4EmParameters::AddMicroElec(const G4String& region) 1220 { 1151 { 1221 if(IsLocked()) { return; } 1152 if(IsLocked()) { return; } 1222 fCParameters->AddMicroElec(region); 1153 fCParameters->AddMicroElec(region); 1223 } 1154 } 1224 1155 1225 const std::vector<G4String>& G4EmParameters:: 1156 const std::vector<G4String>& G4EmParameters::RegionsMicroElec() const 1226 { 1157 { 1227 return fCParameters->RegionsMicroElec(); 1158 return fCParameters->RegionsMicroElec(); 1228 } 1159 } 1229 1160 1230 void G4EmParameters::AddDNA(const G4String& r 1161 void G4EmParameters::AddDNA(const G4String& region, const G4String& type) 1231 { 1162 { 1232 if(IsLocked()) { return; } 1163 if(IsLocked()) { return; } 1233 fCParameters->AddDNA(region, type); 1164 fCParameters->AddDNA(region, type); 1234 ActivateDNA(); 1165 ActivateDNA(); 1235 } 1166 } 1236 1167 1237 const std::vector<G4String>& G4EmParameters:: 1168 const std::vector<G4String>& G4EmParameters::RegionsDNA() const 1238 { 1169 { 1239 return fCParameters->RegionsDNA(); 1170 return fCParameters->RegionsDNA(); 1240 } 1171 } 1241 1172 1242 const std::vector<G4String>& G4EmParameters:: 1173 const std::vector<G4String>& G4EmParameters::TypesDNA() const 1243 { 1174 { 1244 return fCParameters->TypesDNA(); 1175 return fCParameters->TypesDNA(); 1245 } 1176 } 1246 1177 1247 void G4EmParameters::AddPhysics(const G4Strin 1178 void G4EmParameters::AddPhysics(const G4String& region, const G4String& type) 1248 { 1179 { 1249 if(IsLocked()) { return; } 1180 if(IsLocked()) { return; } 1250 fBParameters->AddPhysics(region, type); 1181 fBParameters->AddPhysics(region, type); 1251 } 1182 } 1252 1183 1253 const std::vector<G4String>& G4EmParameters:: 1184 const std::vector<G4String>& G4EmParameters::RegionsPhysics() const 1254 { 1185 { 1255 return fBParameters->RegionsPhysics(); 1186 return fBParameters->RegionsPhysics(); 1256 } 1187 } 1257 1188 1258 const std::vector<G4String>& G4EmParameters:: 1189 const std::vector<G4String>& G4EmParameters::TypesPhysics() const 1259 { 1190 { 1260 return fBParameters->TypesPhysics(); 1191 return fBParameters->TypesPhysics(); 1261 } 1192 } 1262 1193 1263 void G4EmParameters::SetSubCutRegion(const G4 1194 void G4EmParameters::SetSubCutRegion(const G4String& region) 1264 { 1195 { 1265 if(IsLocked()) { return; } 1196 if(IsLocked()) { return; } 1266 fBParameters->SetSubCutRegion(region); 1197 fBParameters->SetSubCutRegion(region); 1267 } 1198 } 1268 1199 1269 void 1200 void 1270 G4EmParameters::SetDeexActiveRegion(const G4S 1201 G4EmParameters::SetDeexActiveRegion(const G4String& region, G4bool adeex, 1271 G4bool aa 1202 G4bool aauger, G4bool apixe) 1272 { 1203 { 1273 if(IsLocked()) { return; } 1204 if(IsLocked()) { return; } 1274 fCParameters->SetDeexActiveRegion(region, a 1205 fCParameters->SetDeexActiveRegion(region, adeex, aauger, apixe); 1275 } 1206 } 1276 1207 1277 void 1208 void 1278 G4EmParameters::SetProcessBiasingFactor(const 1209 G4EmParameters::SetProcessBiasingFactor(const G4String& procname, 1279 G4dou 1210 G4double val, G4bool wflag) 1280 { 1211 { 1281 if(IsLocked()) { return; } 1212 if(IsLocked()) { return; } 1282 fBParameters->SetProcessBiasingFactor(procn 1213 fBParameters->SetProcessBiasingFactor(procname, val, wflag); 1283 } 1214 } 1284 1215 1285 void 1216 void 1286 G4EmParameters::ActivateForcedInteraction(con 1217 G4EmParameters::ActivateForcedInteraction(const G4String& procname, 1287 con 1218 const G4String& region, 1288 G4d 1219 G4double length, 1289 G4b 1220 G4bool wflag) 1290 { 1221 { 1291 if(IsLocked() && !gener) { return; } 1222 if(IsLocked() && !gener) { return; } 1292 fBParameters->ActivateForcedInteraction(pro 1223 fBParameters->ActivateForcedInteraction(procname, region, length, wflag); 1293 } 1224 } 1294 1225 1295 void 1226 void 1296 G4EmParameters::ActivateSecondaryBiasing(cons 1227 G4EmParameters::ActivateSecondaryBiasing(const G4String& procname, 1297 cons 1228 const G4String& region, 1298 G4do 1229 G4double factor, 1299 G4do 1230 G4double energyLim) 1300 { 1231 { 1301 if(IsLocked()) { return; } 1232 if(IsLocked()) { return; } 1302 fBParameters->ActivateSecondaryBiasing(proc 1233 fBParameters->ActivateSecondaryBiasing(procname, region, factor, energyLim); 1303 } 1234 } 1304 1235 1305 void G4EmParameters::DefineRegParamForLoss(G4 1236 void G4EmParameters::DefineRegParamForLoss(G4VEnergyLossProcess* ptr) const 1306 { 1237 { 1307 fBParameters->DefineRegParamForLoss(ptr); 1238 fBParameters->DefineRegParamForLoss(ptr); 1308 } 1239 } 1309 1240 1310 void G4EmParameters::DefineRegParamForEM(G4VE 1241 void G4EmParameters::DefineRegParamForEM(G4VEmProcess* ptr) const 1311 { 1242 { 1312 fBParameters->DefineRegParamForEM(ptr); 1243 fBParameters->DefineRegParamForEM(ptr); 1313 } 1244 } 1314 1245 1315 G4bool G4EmParameters::QuantumEntanglement() 1246 G4bool G4EmParameters::QuantumEntanglement() const 1316 { 1247 { 1317 return fBParameters->QuantumEntanglement(); 1248 return fBParameters->QuantumEntanglement(); 1318 } 1249 } 1319 1250 1320 void G4EmParameters::SetQuantumEntanglement(G 1251 void G4EmParameters::SetQuantumEntanglement(G4bool v) 1321 { 1252 { 1322 if(IsLocked()) { return; } 1253 if(IsLocked()) { return; } 1323 fBParameters->SetQuantumEntanglement(v); 1254 fBParameters->SetQuantumEntanglement(v); 1324 } 1255 } 1325 1256 1326 G4bool G4EmParameters::GetDirectionalSplittin 1257 G4bool G4EmParameters::GetDirectionalSplitting() const { 1327 return fBParameters->GetDirectionalSplittin 1258 return fBParameters->GetDirectionalSplitting(); 1328 } 1259 } 1329 1260 1330 void G4EmParameters::SetDirectionalSplitting( 1261 void G4EmParameters::SetDirectionalSplitting(G4bool v) 1331 { 1262 { 1332 if(IsLocked()) { return; } 1263 if(IsLocked()) { return; } 1333 fBParameters->SetDirectionalSplitting(v); 1264 fBParameters->SetDirectionalSplitting(v); 1334 } 1265 } 1335 1266 1336 void G4EmParameters::SetDirectionalSplittingT 1267 void G4EmParameters::SetDirectionalSplittingTarget(const G4ThreeVector& v) 1337 { 1268 { 1338 if(IsLocked()) { return; } 1269 if(IsLocked()) { return; } 1339 fBParameters->SetDirectionalSplittingTarget 1270 fBParameters->SetDirectionalSplittingTarget(v); 1340 } 1271 } 1341 1272 1342 G4ThreeVector G4EmParameters::GetDirectionalS 1273 G4ThreeVector G4EmParameters::GetDirectionalSplittingTarget() const 1343 { 1274 { 1344 return fBParameters->GetDirectionalSplittin 1275 return fBParameters->GetDirectionalSplittingTarget(); 1345 } 1276 } 1346 1277 1347 void G4EmParameters::SetDirectionalSplittingR 1278 void G4EmParameters::SetDirectionalSplittingRadius(G4double r) 1348 { 1279 { 1349 if(IsLocked()) { return; } 1280 if(IsLocked()) { return; } 1350 fBParameters->SetDirectionalSplittingRadius 1281 fBParameters->SetDirectionalSplittingRadius(r); 1351 } 1282 } 1352 1283 1353 G4double G4EmParameters::GetDirectionalSplitt 1284 G4double G4EmParameters::GetDirectionalSplittingRadius() 1354 { 1285 { 1355 return fBParameters->GetDirectionalSplittin 1286 return fBParameters->GetDirectionalSplittingRadius(); 1356 } 1287 } 1357 1288 1358 void G4EmParameters::DefineRegParamForDeex(G4 1289 void G4EmParameters::DefineRegParamForDeex(G4VAtomDeexcitation* ptr) const 1359 { 1290 { 1360 fCParameters->DefineRegParamForDeex(ptr); 1291 fCParameters->DefineRegParamForDeex(ptr); 1361 } 1292 } 1362 1293 1363 const G4String& G4EmParameters::GetDirLEDATA( << 1364 { << 1365 return fDirLEDATA; << 1366 } << 1367 << 1368 void G4EmParameters::StreamInfo(std::ostream& 1294 void G4EmParameters::StreamInfo(std::ostream& os) const 1369 { 1295 { 1370 G4long prec = os.precision(5); 1296 G4long prec = os.precision(5); 1371 os << "==================================== 1297 os << "=======================================================================" << "\n"; 1372 os << "====== Electromagnet 1298 os << "====== Electromagnetic Physics Parameters ========" << "\n"; 1373 os << "==================================== 1299 os << "=======================================================================" << "\n"; 1374 os << "LPM effect enabled 1300 os << "LPM effect enabled " <<flagLPM << "\n"; 1375 os << "Enable creation and use of sampling 1301 os << "Enable creation and use of sampling tables " <<fSamplingTable << "\n"; 1376 os << "Apply cuts on all EM processes 1302 os << "Apply cuts on all EM processes " <<applyCuts << "\n"; 1377 const char* transportationWithMsc = "Disabl 1303 const char* transportationWithMsc = "Disabled"; 1378 if(fTransportationWithMsc == G4Transportati 1304 if(fTransportationWithMsc == G4TransportationWithMscType::fEnabled) { 1379 transportationWithMsc = "Enabled"; 1305 transportationWithMsc = "Enabled"; 1380 } else if (fTransportationWithMsc == G4Tran 1306 } else if (fTransportationWithMsc == G4TransportationWithMscType::fMultipleSteps) { 1381 transportationWithMsc = "MultipleSteps"; 1307 transportationWithMsc = "MultipleSteps"; 1382 } 1308 } 1383 os << "Use combined TransportationWithMsc 1309 os << "Use combined TransportationWithMsc " <<transportationWithMsc << "\n"; 1384 os << "Use general process 1310 os << "Use general process " <<gener << "\n"; 1385 os << "Enable linear polarisation for gamma 1311 os << "Enable linear polarisation for gamma " <<fPolarisation << "\n"; 1386 os << "Enable photoeffect sampling below K- 1312 os << "Enable photoeffect sampling below K-shell " <<fPEKShell << "\n"; 1387 os << "Enable sampling of quantum entanglem 1313 os << "Enable sampling of quantum entanglement " 1388 <<fBParameters->QuantumEntanglement() < 1314 <<fBParameters->QuantumEntanglement() << "\n"; 1389 os << "X-section factor for integral approa 1315 os << "X-section factor for integral approach " <<lambdaFactor << "\n"; 1390 os << "Min kinetic energy for tables 1316 os << "Min kinetic energy for tables " 1391 <<G4BestUnit(minKinEnergy,"Energy") << " 1317 <<G4BestUnit(minKinEnergy,"Energy") << "\n"; 1392 os << "Max kinetic energy for tables 1318 os << "Max kinetic energy for tables " 1393 <<G4BestUnit(maxKinEnergy,"Energy") << " 1319 <<G4BestUnit(maxKinEnergy,"Energy") << "\n"; 1394 os << "Number of bins per decade of a table 1320 os << "Number of bins per decade of a table " <<nbinsPerDecade << "\n"; 1395 os << "Verbose level 1321 os << "Verbose level " <<verbose << "\n"; 1396 os << "Verbose level for worker thread 1322 os << "Verbose level for worker thread " <<workerVerbose << "\n"; 1397 os << "Bremsstrahlung energy threshold abov 1323 os << "Bremsstrahlung energy threshold above which \n" 1398 << " primary e+- is added to the list o 1324 << " primary e+- is added to the list of secondary " 1399 <<G4BestUnit(bremsTh,"Energy") << "\n"; 1325 <<G4BestUnit(bremsTh,"Energy") << "\n"; 1400 os << "Bremsstrahlung energy threshold abov 1326 os << "Bremsstrahlung energy threshold above which primary\n" 1401 << " muon/hadron is added to the list o 1327 << " muon/hadron is added to the list of secondary " 1402 <<G4BestUnit(bremsMuHadTh,"Energy") << " 1328 <<G4BestUnit(bremsMuHadTh,"Energy") << "\n"; 1403 G4String name3g = "SimplePositronium"; << 1404 if (fPositronium == fAllisonPositronium) { << 1405 else if (fPositronium == fOrePowell) { name << 1406 else if (fPositronium == fOrePowellPolar) { << 1407 os << "Positron annihilation at rest model << 1408 << 1409 os << "Enable 3 gamma annihilation on fly << 1410 << f3GammaAnnihilationOnFly << "\n"; << 1411 os << "Lowest triplet kinetic energy 1329 os << "Lowest triplet kinetic energy " 1412 <<G4BestUnit(lowestTripletEnergy,"Energy 1330 <<G4BestUnit(lowestTripletEnergy,"Energy") << "\n"; 1413 os << "Enable sampling of gamma linear pola 1331 os << "Enable sampling of gamma linear polarisation " <<fPolarisation << "\n"; 1414 os << "5D gamma conversion model type 1332 os << "5D gamma conversion model type " <<tripletConv << "\n"; 1415 os << "5D gamma conversion model on isolate 1333 os << "5D gamma conversion model on isolated ion " <<onIsolated << "\n"; 1416 if(max5DEnergyForMuPair>0.0) { 1334 if(max5DEnergyForMuPair>0.0) { 1417 os << "5D gamma conversion limit for muon p 1335 os << "5D gamma conversion limit for muon pair " 1418 << max5DEnergyForMuPair/CLHEP::GeV << " 1336 << max5DEnergyForMuPair/CLHEP::GeV << " GeV\n"; 1419 } 1337 } 1420 os << "Use Ricardo-Gerardo pair production << 1421 << fUseRiGePairProductionModel << "\n"; << 1422 os << "Livermore data directory 1338 os << "Livermore data directory " 1423 << fCParameters->LivermoreDataDir() << " 1339 << fCParameters->LivermoreDataDir() << "\n"; 1424 1340 1425 os << "==================================== 1341 os << "=======================================================================" << "\n"; 1426 os << "====== Ionisation Pa 1342 os << "====== Ionisation Parameters ========" << "\n"; 1427 os << "==================================== 1343 os << "=======================================================================" << "\n"; 1428 os << "Step function for e+- 1344 os << "Step function for e+- " 1429 <<"("<<fBParameters->GetStepFunctionP1() 1345 <<"("<<fBParameters->GetStepFunctionP1() << ", " 1430 << fBParameters->GetStepFunctionP2()/CLH 1346 << fBParameters->GetStepFunctionP2()/CLHEP::mm << " mm)\n"; 1431 os << "Step function for muons/hadrons 1347 os << "Step function for muons/hadrons " 1432 <<"("<<fBParameters->GetStepFunctionMuHa 1348 <<"("<<fBParameters->GetStepFunctionMuHadP1() << ", " 1433 << fBParameters->GetStepFunctionMuHadP2( 1349 << fBParameters->GetStepFunctionMuHadP2()/CLHEP::mm << " mm)\n"; 1434 os << "Step function for light ions 1350 os << "Step function for light ions " 1435 <<"("<<fBParameters->GetStepFunctionLigh 1351 <<"("<<fBParameters->GetStepFunctionLightIonsP1() << ", " 1436 << fBParameters->GetStepFunctionLightIon 1352 << fBParameters->GetStepFunctionLightIonsP2()/CLHEP::mm << " mm)\n"; 1437 os << "Step function for general ions 1353 os << "Step function for general ions " 1438 <<"("<<fBParameters->GetStepFunctionIons 1354 <<"("<<fBParameters->GetStepFunctionIonsP1() << ", " 1439 << fBParameters->GetStepFunctionIonsP2() 1355 << fBParameters->GetStepFunctionIonsP2()/CLHEP::mm << " mm)\n"; 1440 os << "Lowest e+e- kinetic energy 1356 os << "Lowest e+e- kinetic energy " 1441 <<G4BestUnit(lowestElectronEnergy,"Energ 1357 <<G4BestUnit(lowestElectronEnergy,"Energy") << "\n"; 1442 os << "Lowest muon/hadron kinetic energy 1358 os << "Lowest muon/hadron kinetic energy " 1443 <<G4BestUnit(lowestMuHadEnergy,"Energy") 1359 <<G4BestUnit(lowestMuHadEnergy,"Energy") << "\n"; 1444 os << "Use ICRU90 data 1360 os << "Use ICRU90 data " << fICRU90 << "\n"; 1445 os << "Fluctuations of dE/dx are enabled 1361 os << "Fluctuations of dE/dx are enabled " <<lossFluctuation << "\n"; 1446 G4String namef = "Universal"; 1362 G4String namef = "Universal"; 1447 if(fFluct == fUrbanFluctuation) { namef = " 1363 if(fFluct == fUrbanFluctuation) { namef = "Urban"; } 1448 else if(fFluct == fDummyFluctuation) { name 1364 else if(fFluct == fDummyFluctuation) { namef = "Dummy"; } 1449 os << "Type of fluctuation model for lepton 1365 os << "Type of fluctuation model for leptons and hadrons " << namef << "\n"; 1450 os << "Use built-in Birks satuaration 1366 os << "Use built-in Birks satuaration " << birks << "\n"; 1451 os << "Build CSDA range enabled 1367 os << "Build CSDA range enabled " <<buildCSDARange << "\n"; 1452 os << "Use cut as a final range enabled 1368 os << "Use cut as a final range enabled " <<cutAsFinalRange << "\n"; 1453 os << "Enable angular generator interface 1369 os << "Enable angular generator interface " 1454 <<useAngGeneratorForIonisation << "\n"; 1370 <<useAngGeneratorForIonisation << "\n"; 1455 os << "Max kinetic energy for CSDA tables 1371 os << "Max kinetic energy for CSDA tables " 1456 <<G4BestUnit(maxKinEnergyCSDA,"Energy") 1372 <<G4BestUnit(maxKinEnergyCSDA,"Energy") << "\n"; 1457 os << "Max kinetic energy for NIEL computat 1373 os << "Max kinetic energy for NIEL computation " 1458 <<G4BestUnit(maxNIELEnergy,"Energy") << 1374 <<G4BestUnit(maxNIELEnergy,"Energy") << "\n"; 1459 os << "Linear loss limit 1375 os << "Linear loss limit " <<linLossLimit << "\n"; 1460 os << "Read data from file for e+e- pair pr 1376 os << "Read data from file for e+e- pair production by mu " <<fMuDataFromFile << "\n"; 1461 1377 1462 os << "==================================== 1378 os << "=======================================================================" << "\n"; 1463 os << "====== Multiple Scat 1379 os << "====== Multiple Scattering Parameters ========" << "\n"; 1464 os << "==================================== 1380 os << "=======================================================================" << "\n"; 1465 os << "Type of msc step limit algorithm for 1381 os << "Type of msc step limit algorithm for e+- " <<mscStepLimit << "\n"; 1466 os << "Type of msc step limit algorithm for 1382 os << "Type of msc step limit algorithm for muons/hadrons " <<mscStepLimitMuHad << "\n"; 1467 os << "Msc lateral displacement for e+- ena 1383 os << "Msc lateral displacement for e+- enabled " <<lateralDisplacement << "\n"; 1468 os << "Msc lateral displacement for muons a 1384 os << "Msc lateral displacement for muons and hadrons " <<muhadLateralDisplacement << "\n"; 1469 os << "Urban msc model lateral displacement 1385 os << "Urban msc model lateral displacement alg96 " <<lateralDisplacementAlg96 << "\n"; 1470 os << "Range factor for msc step limit for 1386 os << "Range factor for msc step limit for e+- " <<rangeFactor << "\n"; 1471 os << "Range factor for msc step limit for 1387 os << "Range factor for msc step limit for muons/hadrons " <<rangeFactorMuHad << "\n"; 1472 os << "Geometry factor for msc step limitat 1388 os << "Geometry factor for msc step limitation of e+- " <<geomFactor << "\n"; 1473 os << "Safety factor for msc step limit for 1389 os << "Safety factor for msc step limit for e+- " <<safetyFactor << "\n"; 1474 os << "Skin parameter for msc step limitati 1390 os << "Skin parameter for msc step limitation of e+- " <<skin << "\n"; 1475 os << "Lambda limit for msc step limit for 1391 os << "Lambda limit for msc step limit for e+- " <<lambdaLimit/CLHEP::mm << " mm\n"; 1476 os << "Use Mott correction for e- scatterin 1392 os << "Use Mott correction for e- scattering " << useMottCorrection << "\n"; 1477 os << "Factor used for dynamic computation 1393 os << "Factor used for dynamic computation of angular \n" 1478 << " limit between single and multiple 1394 << " limit between single and multiple scattering " << factorForAngleLimit << "\n"; 1479 os << "Fixed angular limit between single \ 1395 os << "Fixed angular limit between single \n" 1480 << " and multiple scattering 1396 << " and multiple scattering " 1481 << thetaLimit/CLHEP::rad << " rad\n"; 1397 << thetaLimit/CLHEP::rad << " rad\n"; 1482 os << "Upper energy limit for e+- multiple 1398 os << "Upper energy limit for e+- multiple scattering " 1483 << energyLimit/CLHEP::MeV << " MeV\n"; 1399 << energyLimit/CLHEP::MeV << " MeV\n"; 1484 os << "Type of electron single scattering m 1400 os << "Type of electron single scattering model " <<fSStype << "\n"; 1485 os << "Type of nuclear form-factor 1401 os << "Type of nuclear form-factor " <<nucFormfactor << "\n"; 1486 os << "Screening factor 1402 os << "Screening factor " <<factorScreen << "\n"; 1487 os << "==================================== 1403 os << "=======================================================================" << "\n"; 1488 1404 1489 if(fCParameters->Fluo()) { 1405 if(fCParameters->Fluo()) { 1490 os << "====== Atomic Deexci 1406 os << "====== Atomic Deexcitation Parameters ========" << "\n"; 1491 os << "==================================== 1407 os << "=======================================================================" << "\n"; 1492 os << "Fluorescence enabled 1408 os << "Fluorescence enabled " <<fCParameters->Fluo() << "\n"; 1493 G4String named = "fluor"; 1409 G4String named = "fluor"; 1494 G4EmFluoDirectory fdir = FluoDirectory(); 1410 G4EmFluoDirectory fdir = FluoDirectory(); 1495 if(fdir == fluoBearden) { named = "fluor_Be 1411 if(fdir == fluoBearden) { named = "fluor_Bearden"; } 1496 else if(fdir == fluoANSTO) { named = "fluor 1412 else if(fdir == fluoANSTO) { named = "fluor_ANSTO"; } 1497 else if(fdir == fluoXDB_EADL) { named = "fl 1413 else if(fdir == fluoXDB_EADL) { named = "fluor_XDB_EADL"; } 1498 os << "Directory in G4LEDATA for fluorescen 1414 os << "Directory in G4LEDATA for fluorescence data files " << named << "\n"; 1499 os << "Auger electron cascade enabled 1415 os << "Auger electron cascade enabled " 1500 <<fCParameters->Auger() << "\n"; 1416 <<fCParameters->Auger() << "\n"; 1501 os << "PIXE atomic de-excitation enabled 1417 os << "PIXE atomic de-excitation enabled " <<fCParameters->Pixe() << "\n"; 1502 os << "De-excitation module ignores cuts 1418 os << "De-excitation module ignores cuts " 1503 <<fCParameters->DeexcitationIgnoreCut() 1419 <<fCParameters->DeexcitationIgnoreCut() << "\n"; 1504 os << "Type of PIXE cross section for hadro 1420 os << "Type of PIXE cross section for hadrons " 1505 <<fCParameters->PIXECrossSectionModel() 1421 <<fCParameters->PIXECrossSectionModel() << "\n"; 1506 os << "Type of PIXE cross section for e+- 1422 os << "Type of PIXE cross section for e+- " 1507 <<fCParameters->PIXEElectronCrossSection 1423 <<fCParameters->PIXEElectronCrossSectionModel() << "\n"; 1508 os << "==================================== 1424 os << "=======================================================================" << "\n"; 1509 } 1425 } 1510 if(fDNA) { 1426 if(fDNA) { 1511 os << "====== DNA Physics P 1427 os << "====== DNA Physics Parameters ========" << "\n"; 1512 os << "==================================== 1428 os << "=======================================================================" << "\n"; 1513 os << "Use fast sampling in DNA models 1429 os << "Use fast sampling in DNA models " 1514 << fCParameters->DNAFast() << "\n"; 1430 << fCParameters->DNAFast() << "\n"; 1515 os << "Use Stationary option in DNA models 1431 os << "Use Stationary option in DNA models " 1516 << fCParameters->DNAStationary() << "\n" 1432 << fCParameters->DNAStationary() << "\n"; 1517 os << "Use DNA with multiple scattering of 1433 os << "Use DNA with multiple scattering of e- " 1518 << fCParameters->DNAElectronMsc() << "\n 1434 << fCParameters->DNAElectronMsc() << "\n"; 1519 os << "Use DNA e- solvation model type 1435 os << "Use DNA e- solvation model type " 1520 << fCParameters->DNAeSolvationSubType() 1436 << fCParameters->DNAeSolvationSubType() << "\n"; 1521 auto chemModel = fCParameters->GetChemTimeS << 1522 if(fCParameters->GetChemTimeStepModel() != << 1523 { << 1524 std::vector<G4String> ChemModel{"Unknown" << 1525 os << "Use DNA Chemistry model << 1526 << ChemModel.at((std::size_t)chemModel << 1527 } << 1528 os << "==================================== 1437 os << "=======================================================================" << G4endl; 1529 } 1438 } 1530 os.precision(prec); 1439 os.precision(prec); 1531 } 1440 } 1532 1441 1533 void G4EmParameters::Dump() 1442 void G4EmParameters::Dump() 1534 { 1443 { 1535 if(fIsPrinted) return; 1444 if(fIsPrinted) return; 1536 1445 1537 #ifdef G4MULTITHREADED 1446 #ifdef G4MULTITHREADED 1538 G4MUTEXLOCK(&emParametersMutex); 1447 G4MUTEXLOCK(&emParametersMutex); 1539 #endif 1448 #endif 1540 StreamInfo(G4cout); 1449 StreamInfo(G4cout); 1541 #ifdef G4MULTITHREADED 1450 #ifdef G4MULTITHREADED 1542 G4MUTEXUNLOCK(&emParametersMutex); 1451 G4MUTEXUNLOCK(&emParametersMutex); 1543 #endif 1452 #endif 1544 } 1453 } 1545 1454 1546 std::ostream& operator<< (std::ostream& os, c 1455 std::ostream& operator<< (std::ostream& os, const G4EmParameters& par) 1547 { 1456 { 1548 par.StreamInfo(os); 1457 par.StreamInfo(os); 1549 return os; 1458 return os; 1550 } 1459 } 1551 1460 1552 G4bool G4EmParameters::IsLocked() const 1461 G4bool G4EmParameters::IsLocked() const 1553 { 1462 { 1554 return (!G4Threading::IsMasterThread() || 1463 return (!G4Threading::IsMasterThread() || 1555 (fStateManager->GetCurrentState() != G4St 1464 (fStateManager->GetCurrentState() != G4State_PreInit && 1556 fStateManager->GetCurrentState() ! 1465 fStateManager->GetCurrentState() != G4State_Init && 1557 fStateManager->GetCurrentState() != G4St 1466 fStateManager->GetCurrentState() != G4State_Idle)); 1558 } 1467 } 1559 1468 1560 << 1561 void G4EmParameters::SetTimeStepModel(const G << 1562 { << 1563 fCParameters-> SetChemTimeStepModel(model); << 1564 } << 1565 << 1566 G4ChemTimeStepModel G4EmParameters::GetTimeSt << 1567 { << 1568 return fCParameters->GetChemTimeStepModel() << 1569 } << 1570 //....oooOO0OOooo........oooOO0OOooo........o 1469 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 1571 1470