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 // >> 27 // >> 28 >> 29 #include "globals.hh" 26 30 27 #include "eRositaPhysicsList.hh" 31 #include "eRositaPhysicsList.hh" 28 32 29 #include "globals.hh" << 30 #include "G4ios.hh" << 31 #include "G4ParticleDefinition.hh" << 32 #include "G4ParticleTypes.hh" << 33 #include "G4PhysicsListHelper.hh" << 34 #include "G4ProductionCutsTable.hh" << 35 #include "G4StepLimiter.hh" << 36 #include "G4SystemOfUnits.hh" 33 #include "G4SystemOfUnits.hh" 37 #include "G4VPhysicsConstructor.hh" << 34 #include "G4ProcessManager.hh" 38 << 35 #include "G4ParticleTypes.hh" 39 // Physics List << 40 #include "G4DecayPhysics.hh" << 41 #include "G4EmLivermorePhysics.hh" << 42 #include "G4EmPenelopePhysics.hh" << 43 #include "G4EmStandardPhysics.hh" << 44 36 45 // Process << 37 #include "G4PhotoElectricEffect.hh" 46 #include "G4ComptonScattering.hh" 38 #include "G4ComptonScattering.hh" 47 #include "G4eBremsstrahlung.hh" << 39 #include "G4GammaConversion.hh" >> 40 #include "G4RayleighScattering.hh" >> 41 48 #include "G4eIonisation.hh" 42 #include "G4eIonisation.hh" >> 43 #include "G4eBremsstrahlung.hh" >> 44 49 #include "G4eMultipleScattering.hh" 45 #include "G4eMultipleScattering.hh" >> 46 #include "G4hMultipleScattering.hh" >> 47 >> 48 #include "G4eIonisation.hh" >> 49 #include "G4eBremsstrahlung.hh" 50 #include "G4eplusAnnihilation.hh" 50 #include "G4eplusAnnihilation.hh" 51 #include "G4GammaConversion.hh" << 52 #include "G4hImpactIonisation.hh" << 53 #include "G4hIonisation.hh" 51 #include "G4hIonisation.hh" 54 #include "G4hMultipleScattering.hh" << 55 #include "G4ionIonisation.hh" 52 #include "G4ionIonisation.hh" 56 #include "G4PhotoElectricEffect.hh" << 57 #include "G4RayleighScattering.hh" << 58 53 59 // Model << 54 #include "G4hImpactIonisation.hh" 60 #include "G4LivermoreBremsstrahlungModel.hh" << 55 61 #include "G4LivermoreComptonModel.hh" << 56 #include "G4ProductionCutsTable.hh" 62 #include "G4LivermoreGammaConversionModel.hh" << 57 63 #include "G4LivermoreIonisationModel.hh" << 64 #include "G4LivermorePhotoElectricModel.hh" << 65 #include "G4LivermoreRayleighModel.hh" << 66 #include "G4PenelopeAnnihilationModel.hh" << 67 #include "G4UniversalFluctuation.hh" << 68 << 69 //....oooOO0OOooo........oooOO0OOooo........oo << 70 << 71 eRositaPhysicsList::eRositaPhysicsList() << 72 { << 73 SetVerboseLevel(1); << 74 << 75 constexpr auto DEFAULT_CUT_VALUE{0.001 * m << 76 SetDefaultCutValue(DEFAULT_CUT_VALUE); << 77 << 78 G4cout << "=============================== << 79 << G4endl << 80 << "Geant4 eRosita example, base << 81 << G4endl << 82 << "Further details can be found << 83 << G4endl << 84 << " M. G. Pia et al.," << 85 << G4endl << 86 << " 'PIXE Simulation With Gean << 87 << G4endl << 88 << " IEEE Trans. Nucl. Sci., vo << 89 << G4endl << 90 << " N. Meidinger et al.," << 91 << G4endl << 92 << " 'Development of the focal << 93 << G4endl << 94 << " NIM A 624, 321-329, 2010" << 95 << G4endl << 96 << "============================ << 97 << G4endl; << 98 58 99 G4cout << G4endl; << 59 eRositaPhysicsList::eRositaPhysicsList(): G4VUserPhysicsList() >> 60 { >> 61 defaultCutValue = 0.001*mm; >> 62 SetVerboseLevel(1); >> 63 >> 64 std::cout << "===============================================================================" >> 65 << std::endl >> 66 << "Geant4 eRosita example - based on a simplified version of eROSITA simulation" >> 67 << std::endl >> 68 << "Further details can be found in:" >> 69 << std::endl >> 70 << "M.G. Pia et al., 'PIXE Simulation With Geant4', " >> 71 << "IEEE Trans. Nucl. Sci., vol. 56, no. 6, pp. 3614-3649, 2009" >> 72 << std::endl >> 73 << "N. Meidinger et al., 'Development of the focal plane PNCCD camera system for the X-ray space telescope eROSITA', " >> 74 << std::endl >> 75 <<"NIM A 624, 321-329, 2010" >> 76 << std::endl >> 77 << "===============================================================================" >> 78 << std::endl; >> 79 >> 80 std::cout<< std::endl; >> 81 >> 82 std::cout << "===============================================================================" >> 83 << std::endl >> 84 << " The use of G4LowEnergyIonisation, G4LowEnergyBremsstrahlung, " >> 85 << std::endl >> 86 << "G4LowEnergyPhotoElectric, G4LowEnergyCompton, G4LowEnergyGammaConversion" >> 87 << std::endl >> 88 << "in this example is intentional. These classes will be replaced by other classes" >> 89 << std::endl >> 90 << "appropriate to the problem domain in a forthcoming Geant4 version" >> 91 << std::endl >> 92 << "===============================================================================" >> 93 << std::endl; 100 } 94 } 101 95 102 //....oooOO0OOooo........oooOO0OOooo........oo << 103 96 104 eRositaPhysicsList::~eRositaPhysicsList() 97 eRositaPhysicsList::~eRositaPhysicsList() >> 98 {} >> 99 >> 100 >> 101 void eRositaPhysicsList::ConstructParticle() 105 { 102 { >> 103 ConstructBosons(); >> 104 ConstructLeptons(); >> 105 ConstructMesons(); >> 106 ConstructBaryons(); 106 } 107 } 107 108 108 //....oooOO0OOooo........oooOO0OOooo........oo << 109 109 110 void eRositaPhysicsList::ConstructBosons() 110 void eRositaPhysicsList::ConstructBosons() 111 { 111 { 112 // geantino (pseudo-particle) << 112 // pseudo-particles 113 // G4Geantino::GeantinoDefinition(); << 113 //G4Geantino::GeantinoDefinition(); 114 << 114 //G4ChargedGeantino::ChargedGeantinoDefinition(); 115 // charged geantino (pseudo-particle) << 116 // G4ChargedGeantino::ChargedGeantinoDefin << 117 115 118 // photon (gamma) << 116 // gamma 119 G4Gamma::GammaDefinition(); << 117 G4Gamma::GammaDefinition(); 120 } 118 } 121 119 122 //....oooOO0OOooo........oooOO0OOooo........oo << 123 120 124 void eRositaPhysicsList::ConstructLeptons() 121 void eRositaPhysicsList::ConstructLeptons() 125 { 122 { 126 // leptons << 123 // leptons 127 << 124 // e+/- 128 // e+ / e- << 125 G4Electron::ElectronDefinition(); 129 G4Electron::ElectronDefinition(); << 126 G4Positron::PositronDefinition(); 130 G4Positron::PositronDefinition(); << 127 // mu+/- 131 << 128 //G4MuonPlus::MuonPlusDefinition(); 132 // mu+ / mu- << 129 //G4MuonMinus::MuonMinusDefinition(); 133 // G4MuonPlus::MuonPlusDefinition(); << 130 // nu_e 134 // G4MuonMinus::MuonMinusDefinition(); << 131 //G4NeutrinoE::NeutrinoEDefinition(); 135 << 132 //G4AntiNeutrinoE::AntiNeutrinoEDefinition(); 136 // nu_e << 133 // nu_mu 137 // G4NeutrinoE::NeutrinoEDefinition(); << 134 //G4NeutrinoMu::NeutrinoMuDefinition(); 138 // G4AntiNeutrinoE::AntiNeutrinoEDefinitio << 135 //G4AntiNeutrinoMu::AntiNeutrinoMuDefinition(); 139 << 140 // nu_mu << 141 // G4NeutrinoMu::NeutrinoMuDefinition(); << 142 // G4AntiNeutrinoMu::AntiNeutrinoMuDefinit << 143 } 136 } 144 137 145 //....oooOO0OOooo........oooOO0OOooo........oo << 146 138 147 void eRositaPhysicsList::ConstructMesons() 139 void eRositaPhysicsList::ConstructMesons() 148 { 140 { 149 // light mesons << 141 // mesons 150 << 142 // light mesons 151 // pion << 143 //G4PionPlus::PionPlusDefinition(); 152 // G4PionPlus::PionPlusDefinition(); << 144 //G4PionMinus::PionMinusDefinition(); 153 // G4PionMinus::PionMinusDefinition(); << 145 //G4PionZero::PionZeroDefinition(); 154 // G4PionZero::PionZeroDefinition(); << 146 //G4Eta::EtaDefinition(); 155 << 147 //G4EtaPrime::EtaPrimeDefinition(); 156 // eta << 148 //G4KaonPlus::KaonPlusDefinition(); 157 // G4Eta::EtaDefinition(); << 149 //G4KaonMinus::KaonMinusDefinition(); 158 // G4EtaPrime::EtaPrimeDefinition(); << 150 //G4KaonZero::KaonZeroDefinition(); 159 << 151 //G4AntiKaonZero::AntiKaonZeroDefinition(); 160 // kaon << 152 //G4KaonZeroLong::KaonZeroLongDefinition(); 161 // G4KaonPlus::KaonPlusDefinition(); << 153 //G4KaonZeroShort::KaonZeroShortDefinition(); 162 // G4KaonMinus::KaonMinusDefinition(); << 163 // G4KaonZero::KaonZeroDefinition(); << 164 // G4AntiKaonZero::AntiKaonZeroDefinition( << 165 // G4KaonZeroLong::KaonZeroLongDefinition( << 166 // G4KaonZeroShort::KaonZeroShortDefinitio << 167 } 154 } 168 155 169 //....oooOO0OOooo........oooOO0OOooo........oo << 170 156 171 void eRositaPhysicsList::ConstructBaryons() 157 void eRositaPhysicsList::ConstructBaryons() 172 { 158 { 173 // baryons << 159 // barions >> 160 G4Proton::ProtonDefinition(); >> 161 G4AntiProton::AntiProtonDefinition(); 174 162 175 // proton << 163 //G4Neutron::NeutronDefinition(); 176 G4Proton::ProtonDefinition(); << 164 //G4AntiNeutron::AntiNeutronDefinition(); 177 G4AntiProton::AntiProtonDefinition(); << 178 << 179 // neutron << 180 // G4Neutron::NeutronDefinition(); << 181 // G4AntiNeutron::AntiNeutronDefinition(); << 182 } 165 } 183 166 184 //....oooOO0OOooo........oooOO0OOooo........oo << 185 167 186 void eRositaPhysicsList::ConstructParticle() << 168 void eRositaPhysicsList::ConstructProcess() 187 { 169 { 188 ConstructBosons(); << 170 AddTransportation(); 189 ConstructLeptons(); << 171 ConstructEM(); 190 ConstructMesons(); << 172 ConstructGeneral(); 191 ConstructBaryons(); << 173 //AddStepMax(); 192 } 174 } 193 175 194 //....oooOO0OOooo........oooOO0OOooo........oo << 176 195 177 196 void eRositaPhysicsList::ConstructEM() 178 void eRositaPhysicsList::ConstructEM() 197 { 179 { 198 auto *helper = G4PhysicsListHelper::GetPhy << 180 auto theParticleIterator=GetParticleIterator(); 199 << 181 theParticleIterator->reset(); 200 auto particleIterator = GetParticleIterato << 182 while( (*theParticleIterator)() ){ 201 particleIterator->reset(); << 183 G4ParticleDefinition* particle = theParticleIterator->value(); 202 << 184 G4ProcessManager* processManager = particle->GetProcessManager(); 203 while ((*particleIterator)()) { << 185 G4String particleName = particle->GetParticleName(); 204 auto *particle = particleIterator->val << 186 205 auto particleName = particle->GetParti << 187 if (particleName == "gamma") { 206 << 188 207 if (particleName == "gamma") { // phot << 189 // photon 208 // photoelectric effect << 190 209 auto *photoelectricEffect = new G4 << 191 G4PhotoElectricEffect* photoelectric = new G4PhotoElectricEffect; 210 // photoelectricEffect->ActivateAu << 192 //photoelectric->ActivateAuger(true); 211 // photoelectricEffect->SetCutForL << 193 //photoelectric->SetCutForLowEnSecPhotons(0.250 * keV); 212 // photoelectricEffect->SetCutForL << 194 //photoelectric->SetCutForLowEnSecElectrons(0.250 * keV); 213 photoelectricEffect->SetEmModel(ne << 195 G4ComptonScattering* compton = new G4ComptonScattering; 214 helper->RegisterProcess(photoelect << 196 G4GammaConversion* gammaConversion = new G4GammaConversion; 215 << 197 G4RayleighScattering* rayleigh = new G4RayleighScattering; 216 // Compton scattering << 198 217 auto *comptonScattering = new G4Co << 199 processManager -> AddDiscreteProcess(photoelectric); 218 comptonScattering->SetEmModel(new << 200 processManager -> AddDiscreteProcess(compton); 219 helper->RegisterProcess(comptonSca << 201 processManager -> AddDiscreteProcess(gammaConversion); 220 << 202 processManager -> AddDiscreteProcess(rayleigh); 221 // gamma conversion << 203 222 auto *gammaConversion = new G4Gamm << 204 } else if (particleName == "e-") { 223 gammaConversion->SetEmModel(new G4 << 224 helper->RegisterProcess(gammaConve << 225 << 226 // Rayleigh scattering << 227 auto *rayleighScattering = new G4R << 228 rayleighScattering->SetEmModel(new << 229 helper->RegisterProcess(rayleighSc << 230 } else if (particleName == "e-") { // << 231 // multiple scattering << 232 helper->RegisterProcess(new G4eMul << 233 << 234 // ionization << 235 auto *ionization = new G4eIonisati << 236 ionization->SetEmModel(new G4Liver << 237 ionization->SetFluctModel(new G4Un << 238 helper->RegisterProcess(ionization << 239 << 240 // Bremsstrahlung << 241 auto *bremsstrahlung = new G4eBrem << 242 bremsstrahlung->SetEmModel(new G4L << 243 helper->RegisterProcess(bremsstrah << 244 } else if (particleName == "e+") { // << 245 // multiple scattering << 246 helper->RegisterProcess(new G4eMul << 247 << 248 // ionization << 249 helper->RegisterProcess(new G4eIon << 250 << 251 // Bremsstrahlung << 252 auto *bremsstrahlung = new G4eBrem << 253 bremsstrahlung->SetEmModel(new G4L << 254 helper->RegisterProcess(bremsstrah << 255 << 256 // annihilation << 257 auto *annihilation = new G4eplusAn << 258 annihilation->SetEmModel(new G4Pen << 259 helper->RegisterProcess(annihilati << 260 // } else if( particleName == "mu+" || << 261 // // muon << 262 // helper->RegisterProcess(new G4M << 263 // helper->RegisterProcess(new G4M << 264 // helper->RegisterProcess(new G4M << 265 // helper->RegisterProcess(new G4M << 266 } else if (particleName == "proton" || << 267 helper->RegisterProcess(new G4hMul << 268 helper->RegisterProcess(new G4hIon << 269 /* << 270 // proton << 271 // auto *ionization = new G4hImpac << 272 // ionization->SetPixeCrossSection << 273 // ionization->SetPixeCrossSection << 274 // ionization->SetPixeCrossSection << 275 // ionization->SetPixeProjectileMi << 276 // ionization->SetPixeProjectileMa << 277 // ionization->SetCutForSecondaryP << 278 // ionization->SetCutForAugerElect << 279 205 280 auto *ionization = new G4hIonisati << 206 // electron 281 auto *multipleScattering = new G4h << 282 207 283 processManager->AddProcess(multipl << 208 G4eMultipleScattering* eMultipleScattering = new G4eMultipleScattering(); 284 processManager->AddProcess(ionizat << 209 G4eIonisation* eIonisation = new G4eIonisation(); 285 */ << 210 G4eBremsstrahlung* eBremsstrahlung = new G4eBremsstrahlung(); 286 } else if (particleName == "alpha" || << 211 287 // pion, alpha, ion (should never << 212 processManager -> AddProcess(eMultipleScattering, -1, 1, 1); 288 helper->RegisterProcess(new G4hMul << 213 processManager -> AddProcess(eIonisation, -1, 2, 2); 289 helper->RegisterProcess(new G4ionI << 214 processManager -> AddProcess(eBremsstrahlung, -1, -1, 3); 290 } else if ((!particle->IsShortLived()) << 215 291 // every other charged particle, e << 216 } else if (particleName == "e+") { 292 helper->RegisterProcess(new G4hMul << 217 // positron 293 helper->RegisterProcess(new G4hIon << 218 processManager->AddProcess(new G4eMultipleScattering, -1, 1, 1); 294 } << 219 processManager->AddProcess(new G4eIonisation, -1, 2, 2); >> 220 processManager->AddProcess(new G4eBremsstrahlung, -1, 3, 3); >> 221 processManager->AddProcess(new G4eplusAnnihilation, 0,-1, 4); >> 222 >> 223 //} else if( particleName == "mu+" || >> 224 // particleName == "mu-" ) { >> 225 //muon >> 226 //processManager->AddProcess(new G4MuMultipleScattering, -1, 1, 1); >> 227 //processManager->AddProcess(new G4MuIonisation, -1, 2, 2); >> 228 //processManager->AddProcess(new G4MuBremsstrahlung, -1, 3, 3); >> 229 //processManager->AddProcess(new G4MuPairProduction, -1, 4, 4); >> 230 >> 231 } else if( particleName == "proton" || >> 232 particleName == "pi-" || >> 233 particleName == "pi+" ) { >> 234 //proton >> 235 /* >> 236 G4hImpactIonisation* hIonisation = new G4hImpactIonisation(); >> 237 hIonisation->SetPixeCrossSectionK("ecpssr"); >> 238 hIonisation->SetPixeCrossSectionL("ecpssr"); >> 239 hIonisation->SetPixeCrossSectionM("ecpssr"); >> 240 hIonisation->SetPixeProjectileMinEnergy(1.* keV); >> 241 hIonisation->SetPixeProjectileMaxEnergy(200. * MeV); >> 242 hIonisation->SetCutForSecondaryPhotons(250. * eV); >> 243 hIonisation->SetCutForAugerElectrons(250. * eV); >> 244 */ >> 245 G4hIonisation* hIonisation = new G4hIonisation(); >> 246 >> 247 G4hMultipleScattering* hMultipleScattering = new G4hMultipleScattering(); >> 248 >> 249 processManager -> AddProcess(hMultipleScattering, -1, 1, 1); >> 250 processManager -> AddProcess(hIonisation, -1, 2, 2); >> 251 >> 252 } else if( particleName == "alpha" || >> 253 particleName == "He3" || >> 254 particleName == "pi-" || >> 255 particleName == "pi+" || >> 256 particleName == "GenericIon" ) { >> 257 >> 258 // pions, alpha, ions (should never occur in the current example) >> 259 processManager->AddProcess(new G4hMultipleScattering, -1, 1, 1); >> 260 processManager->AddProcess(new G4ionIonisation, -1, 2, 2); >> 261 >> 262 } else if ((!particle->IsShortLived()) && >> 263 (particle->GetPDGCharge() != 0.0) && >> 264 (particle->GetParticleName() != "chargedgeantino")) { >> 265 //all others charged particles except geantino >> 266 processManager->AddProcess(new G4hMultipleScattering, -1, 1, 1); >> 267 processManager->AddProcess(new G4hIonisation, -1, 2, 2); 295 } 268 } >> 269 } 296 } 270 } 297 271 298 //....oooOO0OOooo........oooOO0OOooo........oo << 272 #include "G4Decay.hh" 299 273 300 void eRositaPhysicsList::ConstructGeneral() 274 void eRositaPhysicsList::ConstructGeneral() 301 { 275 { 302 auto *helper = G4PhysicsListHelper::GetPhy << 276 // Add Decay Process 303 << 277 G4Decay* theDecayProcess = new G4Decay(); 304 // Add decay process << 278 auto theParticleIterator=GetParticleIterator(); 305 auto *decay = new G4Decay(); << 279 theParticleIterator->reset(); 306 << 280 while( (*theParticleIterator)() ){ 307 auto particleIterator = GetParticleIterato << 281 G4ParticleDefinition* particle = theParticleIterator->value(); 308 particleIterator->reset(); << 282 G4ProcessManager* processManager = particle->GetProcessManager(); 309 << 283 if (theDecayProcess->IsApplicable(*particle)) { 310 while ((*particleIterator)()) { << 284 processManager ->AddProcess(theDecayProcess); 311 auto *particle = particleIterator->val << 285 // set ordering for PostStepDoIt and AtRestDoIt 312 << 286 processManager ->SetProcessOrdering(theDecayProcess, idxPostStep); 313 if (decay->IsApplicable(*particle)) { << 287 processManager ->SetProcessOrdering(theDecayProcess, idxAtRest); 314 if (verboseLevel > 1) { << 315 G4cout << "### Decays for " << << 316 } << 317 helper->RegisterProcess(decay, par << 318 /* << 319 // Set ordering for PostStepDoIt a << 320 processManager->SetProcessOrdering << 321 processManager->SetProcessOrdering << 322 */ << 323 } << 324 } << 325 } << 326 << 327 //....oooOO0OOooo........oooOO0OOooo........oo << 328 << 329 void eRositaPhysicsList::ConstructProcess() << 330 { << 331 AddTransportation(); << 332 ConstructEM(); << 333 ConstructGeneral(); << 334 // AddStepMax(); << 335 } << 336 << 337 //....oooOO0OOooo........oooOO0OOooo........oo << 338 << 339 void eRositaPhysicsList::SetCuts() << 340 { << 341 // Set the default cut value for all parti << 342 SetCutsWithDefault(); << 343 << 344 // Set the secondary production cut lower << 345 constexpr auto ENERGY_LOW_LIMIT{250. * eV} << 346 constexpr auto ENERGY_HIGH_LIMIT{100. * Ge << 347 << 348 G4ProductionCutsTable::GetProductionCutsTa << 349 << 350 if (verboseLevel > 0) { << 351 DumpCutValuesTable(); << 352 } 288 } >> 289 } 353 } 290 } 354 << 291 355 //....oooOO0OOooo........oooOO0OOooo........oo << 356 292 357 /* 293 /* 358 #include "G4StepLimiter.hh" 294 #include "G4StepLimiter.hh" 359 #include "G4UserSpecialCuts.hh" 295 #include "G4UserSpecialCuts.hh" 360 296 361 void eRositaPhysicsList::AddStepMax() 297 void eRositaPhysicsList::AddStepMax() 362 { 298 { 363 auto *helper = G4PhysicsListHelper::GetPhy << 299 // Step limitation seen as a process 364 << 300 G4StepLimiter* stepLimiter = new G4StepLimiter(); 365 // Step limitation seen as a process << 301 ////G4UserSpecialCuts* userCuts = new G4UserSpecialCuts(); 366 // auto *stepLimiter = new G4StepLimiter() << 302 367 // // auto *userCuts = new G4UserSpecialCu << 303 theParticleIterator->reset(); 368 << 304 while ((*theParticleIterator)()){ 369 particleIterator->reset(); << 305 G4ParticleDefinition* particle = theParticleIterator->value(); 370 << 306 G4ProcessManager* processManager = particle->GetProcessManager(); 371 while ((*particleIterator)()){ << 307 372 auto *particle = particleIterator->val << 308 if (particle->GetPDGCharge() != 0.0) 373 // auto *processManager = particle->Ge << 309 { 374 << 310 processManager ->AddDiscreteProcess(stepLimiter); 375 if (particle->GetPDGCharge() != 0.0) { << 311 ////processManager ->AddDiscreteProcess(userCuts); 376 helper->RegisterProcess(stepLimite << 377 // helper->RegisterProcess(userCut << 378 } 312 } 379 } << 313 } 380 } 314 } 381 */ 315 */ >> 316 >> 317 void eRositaPhysicsList::SetCuts() >> 318 { >> 319 //G4VUserPhysicsList::SetCutsWithDefault method sets >> 320 //the default cut value for all particle types >> 321 // >> 322 SetCutsWithDefault(); >> 323 >> 324 // Set the secondary production cut lower than 990. eV >> 325 // Very important for processes at low energies >> 326 >> 327 G4double lowLimit = 250. * eV; >> 328 G4double highLimit = 100. * GeV; >> 329 G4ProductionCutsTable::GetProductionCutsTable()->SetEnergyRange(lowLimit, highLimit); >> 330 >> 331 if (verboseLevel>0) DumpCutValuesTable(); >> 332 } >> 333 >> 334 382 335