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 // GEANT 4 - Underground Dark Matter Detecto 28 // GEANT 4 - Underground Dark Matter Detector Advanced Example 29 // 29 // 30 // For information related to this code c 30 // For information related to this code contact: Alex Howard 31 // e-mail: alexander.howard@cern.ch 31 // e-mail: alexander.howard@cern.ch 32 // ------------------------------------------- 32 // -------------------------------------------------------------- 33 // Comments 33 // Comments 34 // 34 // 35 // Underground Advanced 35 // Underground Advanced 36 // by A. Howard and H. Araujo 36 // by A. Howard and H. Araujo 37 // (27th November 2001) 37 // (27th November 2001) 38 // 38 // 39 // PhysicsList program 39 // PhysicsList program 40 // 40 // 41 // Modified: 41 // Modified: 42 // 42 // 43 // 14-02-03 Fix bugs in msc and hIon instancia 43 // 14-02-03 Fix bugs in msc and hIon instanciation + cut per region 44 // 44 // 45 // 05-02-05 AH - changes to G4Decay - added is 45 // 05-02-05 AH - changes to G4Decay - added is not short lived protection 46 // and redefined particles to allow n 46 // and redefined particles to allow non-static creation 47 // i.e. changed construction to G4Mes 47 // i.e. changed construction to G4MesonConstructor, G4BaryonConstructor 48 // 48 // 49 // 23-10-09 LP - migrated EM physics from the 49 // 23-10-09 LP - migrated EM physics from the LowEnergy processes (not supported) to 50 // the new G4Livermore model implemen 50 // the new G4Livermore model implementation. Results unchanged. 51 // 51 // 52 // ------------------------------------------- 52 // -------------------------------------------------------------- 53 53 54 #include <iomanip> 54 #include <iomanip> 55 55 56 #include "DMXPhysicsList.hh" 56 #include "DMXPhysicsList.hh" 57 57 58 #include "globals.hh" 58 #include "globals.hh" 59 #include "G4SystemOfUnits.hh" 59 #include "G4SystemOfUnits.hh" 60 #include "G4ProcessManager.hh" 60 #include "G4ProcessManager.hh" 61 #include "G4ProcessVector.hh" 61 #include "G4ProcessVector.hh" 62 62 63 #include "G4ParticleDefinition.hh" 63 #include "G4ParticleDefinition.hh" 64 #include "G4ParticleWithCuts.hh" 64 #include "G4ParticleWithCuts.hh" 65 #include "G4ParticleTypes.hh" 65 #include "G4ParticleTypes.hh" 66 #include "G4ParticleTable.hh" 66 #include "G4ParticleTable.hh" 67 67 68 #include "G4ios.hh" 68 #include "G4ios.hh" 69 #include "G4UserLimits.hh" 69 #include "G4UserLimits.hh" 70 70 71 #include "G4MesonConstructor.hh" << 72 #include "G4BaryonConstructor.hh" << 73 #include "G4IonConstructor.hh" << 74 #include "G4ShortLivedConstructor.hh" << 75 << 76 #include "DMXMaxTimeCuts.hh" << 77 #include "DMXMinEkineCuts.hh" << 78 #include "G4StepLimiter.hh" << 79 << 80 // gamma << 81 #include "G4PhotoElectricEffect.hh" << 82 #include "G4LivermorePhotoElectricModel.hh" << 83 << 84 #include "G4ComptonScattering.hh" << 85 #include "G4LivermoreComptonModel.hh" << 86 << 87 #include "G4GammaConversion.hh" << 88 #include "G4BetheHeitler5DModel.hh" << 89 << 90 #include "G4RayleighScattering.hh" << 91 #include "G4LivermoreRayleighModel.hh" << 92 << 93 // e- << 94 #include "G4eMultipleScattering.hh" << 95 << 96 #include "G4eIonisation.hh" << 97 #include "G4LivermoreIonisationModel.hh" << 98 << 99 #include "G4eBremsstrahlung.hh" << 100 #include "G4UniversalFluctuation.hh" << 101 << 102 // e+ << 103 #include "G4eIonisation.hh" << 104 #include "G4eBremsstrahlung.hh" << 105 #include "G4eplusAnnihilation.hh" << 106 << 107 // alpha and GenericIon and deuterons, triton, << 108 //muon: << 109 #include "G4MuIonisation.hh" << 110 #include "G4MuBremsstrahlung.hh" << 111 #include "G4MuPairProduction.hh" << 112 #include "G4MuMultipleScattering.hh" << 113 #include "G4MuonMinusCapture.hh" << 114 << 115 //OTHERS: << 116 #include "G4hIonisation.hh" << 117 #include "G4hMultipleScattering.hh" << 118 #include "G4hBremsstrahlung.hh" << 119 #include "G4ionIonisation.hh" << 120 #include "G4IonParametrisedLossModel.hh" << 121 #include "G4NuclearStopping.hh" << 122 << 123 //em process options to allow msc step-limitat << 124 #include "G4EmParameters.hh" << 125 #include "G4VAtomDeexcitation.hh" << 126 #include "G4UAtomicDeexcitation.hh" << 127 #include "G4LossTableManager.hh" << 128 << 129 #include "G4Scintillation.hh" << 130 #include "G4OpAbsorption.hh" << 131 #include "G4OpBoundaryProcess.hh" << 132 #include "G4OpticalParameters.hh" << 133 << 134 // Elastic processes: << 135 #include "G4HadronElasticProcess.hh" << 136 #include "G4ChipsElasticModel.hh" << 137 #include "G4ElasticHadrNucleusHE.hh" << 138 << 139 // Inelastic processes: << 140 #include "G4HadronInelasticProcess.hh" << 141 << 142 // High energy FTFP model and Bertini cascade << 143 #include "G4FTFModel.hh" << 144 #include "G4LundStringFragmentation.hh" << 145 #include "G4ExcitedStringDecay.hh" << 146 #include "G4PreCompoundModel.hh" << 147 #include "G4GeneratorPrecompoundInterface.hh" << 148 #include "G4TheoFSGenerator.hh" << 149 #include "G4CascadeInterface.hh" << 150 << 151 // Cross sections << 152 #include "G4VCrossSectionDataSet.hh" << 153 #include "G4CrossSectionDataSetRegistry.hh" << 154 << 155 #include "G4CrossSectionElastic.hh" << 156 #include "G4CrossSectionInelastic.hh" << 157 #include "G4BGGPionElasticXS.hh" << 158 #include "G4BGGPionInelasticXS.hh" << 159 #include "G4AntiNuclElastic.hh" << 160 << 161 #include "G4CrossSectionInelastic.hh" << 162 #include "G4BGGNucleonInelasticXS.hh" << 163 #include "G4BGGNucleonElasticXS.hh" << 164 #include "G4NeutronInelasticXS.hh" << 165 #include "G4NeutronElasticXS.hh" << 166 #include "G4ComponentAntiNuclNuclearXS.hh" << 167 #include "G4ComponentGGNuclNuclXsc.hh" << 168 #include "G4ComponentGGHadronNucleusXsc.hh" << 169 << 170 #include "G4HadronElastic.hh" << 171 #include "G4NeutronCaptureProcess.hh" << 172 << 173 // Neutron high-precision models: <20 MeV << 174 #include "G4ParticleHPElastic.hh" << 175 #include "G4ParticleHPElasticData.hh" << 176 #include "G4ParticleHPCapture.hh" << 177 #include "G4ParticleHPCaptureData.hh" << 178 #include "G4ParticleHPInelastic.hh" << 179 #include "G4ParticleHPInelasticData.hh" << 180 << 181 // Stopping processes << 182 #include "G4HadronStoppingProcess.hh" << 183 #include "G4HadronicAbsorptionBertini.hh" << 184 #include "G4HadronicAbsorptionFritiof.hh" << 185 << 186 #include "G4HadronicParameters.hh" << 187 << 188 #include "G4Decay.hh" << 189 #include "G4RadioactiveDecay.hh" << 190 #include "G4PhysicsListHelper.hh" << 191 #include "G4NuclideTable.hh" << 192 #include "G4NuclearLevelData.hh" << 193 << 194 // Constructor /////////////////////////////// 71 // Constructor ///////////////////////////////////////////////////////////// 195 DMXPhysicsList::DMXPhysicsList() : G4VUserPhys 72 DMXPhysicsList::DMXPhysicsList() : G4VUserPhysicsList() 196 { 73 { 197 74 198 defaultCutValue = 1.0*micrometer; // 75 defaultCutValue = 1.0*micrometer; // 199 cutForGamma = defaultCutValue; 76 cutForGamma = defaultCutValue; 200 cutForElectron = 1.0*nanometer; 77 cutForElectron = 1.0*nanometer; 201 cutForPositron = defaultCutValue; 78 cutForPositron = defaultCutValue; 202 79 203 VerboseLevel = 1; 80 VerboseLevel = 1; 204 OpVerbLevel = 0; 81 OpVerbLevel = 0; 205 82 206 //set a finer grid of the physic tables in o << 207 //former LowEnergy models have 200 bins up t << 208 G4EmParameters* param = G4EmParameters::Inst << 209 param->SetMaxEnergy(100*GeV); << 210 param->SetNumberOfBinsPerDecade(20); << 211 param->SetMscStepLimitType(fMinimal); << 212 param->SetFluo(true); << 213 param->SetPixe(true); << 214 param->SetAuger(true); << 215 << 216 G4EmParameters::Instance()->AddPhysics("Worl << 217 G4DeexPrecoParameters* deex = G4NuclearLevel << 218 deex->SetStoreICLevelData(true); << 219 deex->SetMaxLifeTime(G4NuclideTable::GetInst << 220 /std::log(2.)); << 221 SetVerboseLevel(VerboseLevel); 83 SetVerboseLevel(VerboseLevel); 222 } 84 } 223 85 >> 86 224 // Destructor //////////////////////////////// 87 // Destructor ////////////////////////////////////////////////////////////// 225 DMXPhysicsList::~DMXPhysicsList() 88 DMXPhysicsList::~DMXPhysicsList() 226 {;} 89 {;} 227 90 >> 91 228 // Construct Particles /////////////////////// 92 // Construct Particles ///////////////////////////////////////////////////// 229 void DMXPhysicsList::ConstructParticle() 93 void DMXPhysicsList::ConstructParticle() 230 { 94 { >> 95 231 // In this method, static member functions s 96 // In this method, static member functions should be called 232 // for all particles which you want to use. 97 // for all particles which you want to use. 233 // This ensures that objects of these partic 98 // This ensures that objects of these particle types will be 234 // created in the program. 99 // created in the program. 235 100 236 ConstructMyBosons(); 101 ConstructMyBosons(); 237 ConstructMyLeptons(); 102 ConstructMyLeptons(); 238 ConstructMyHadrons(); 103 ConstructMyHadrons(); 239 ConstructMyShortLiveds(); 104 ConstructMyShortLiveds(); >> 105 240 } 106 } 241 107 >> 108 242 // construct Bosons:////////////////////////// 109 // construct Bosons:///////////////////////////////////////////////////// 243 void DMXPhysicsList::ConstructMyBosons() 110 void DMXPhysicsList::ConstructMyBosons() 244 { 111 { 245 // pseudo-particles 112 // pseudo-particles 246 G4Geantino::GeantinoDefinition(); 113 G4Geantino::GeantinoDefinition(); 247 G4ChargedGeantino::ChargedGeantinoDefinition 114 G4ChargedGeantino::ChargedGeantinoDefinition(); 248 115 249 // gamma 116 // gamma 250 G4Gamma::GammaDefinition(); 117 G4Gamma::GammaDefinition(); 251 118 252 //OpticalPhotons 119 //OpticalPhotons 253 G4OpticalPhoton::OpticalPhotonDefinition(); 120 G4OpticalPhoton::OpticalPhotonDefinition(); 254 121 255 } 122 } 256 123 >> 124 257 // construct Leptons:///////////////////////// 125 // construct Leptons:///////////////////////////////////////////////////// 258 void DMXPhysicsList::ConstructMyLeptons() 126 void DMXPhysicsList::ConstructMyLeptons() 259 { 127 { 260 // leptons 128 // leptons 261 G4Electron::ElectronDefinition(); 129 G4Electron::ElectronDefinition(); 262 G4Positron::PositronDefinition(); 130 G4Positron::PositronDefinition(); 263 G4MuonPlus::MuonPlusDefinition(); 131 G4MuonPlus::MuonPlusDefinition(); 264 G4MuonMinus::MuonMinusDefinition(); 132 G4MuonMinus::MuonMinusDefinition(); 265 133 266 G4NeutrinoE::NeutrinoEDefinition(); 134 G4NeutrinoE::NeutrinoEDefinition(); 267 G4AntiNeutrinoE::AntiNeutrinoEDefinition(); 135 G4AntiNeutrinoE::AntiNeutrinoEDefinition(); 268 G4NeutrinoMu::NeutrinoMuDefinition(); 136 G4NeutrinoMu::NeutrinoMuDefinition(); 269 G4AntiNeutrinoMu::AntiNeutrinoMuDefinition() 137 G4AntiNeutrinoMu::AntiNeutrinoMuDefinition(); 270 } 138 } 271 139 >> 140 >> 141 #include "G4MesonConstructor.hh" >> 142 #include "G4BaryonConstructor.hh" >> 143 #include "G4IonConstructor.hh" >> 144 272 // construct Hadrons:///////////////////////// 145 // construct Hadrons:///////////////////////////////////////////////////// 273 void DMXPhysicsList::ConstructMyHadrons() 146 void DMXPhysicsList::ConstructMyHadrons() 274 { 147 { 275 // mesons 148 // mesons 276 G4MesonConstructor mConstructor; 149 G4MesonConstructor mConstructor; 277 mConstructor.ConstructParticle(); 150 mConstructor.ConstructParticle(); 278 151 279 // baryons 152 // baryons 280 G4BaryonConstructor bConstructor; 153 G4BaryonConstructor bConstructor; 281 bConstructor.ConstructParticle(); 154 bConstructor.ConstructParticle(); 282 155 283 // ions 156 // ions 284 G4IonConstructor iConstructor; 157 G4IonConstructor iConstructor; 285 iConstructor.ConstructParticle(); 158 iConstructor.ConstructParticle(); >> 159 286 } 160 } 287 161 >> 162 288 // construct Shortliveds:///////////////////// 163 // construct Shortliveds:///////////////////////////////////////////////////// 289 void DMXPhysicsList::ConstructMyShortLiveds() 164 void DMXPhysicsList::ConstructMyShortLiveds() 290 { 165 { 291 G4ShortLivedConstructor slConstructor; << 166 // ShortLiveds 292 slConstructor.ConstructParticle(); << 167 ; 293 } 168 } 294 169 >> 170 >> 171 >> 172 295 // Construct Processes /////////////////////// 173 // Construct Processes ////////////////////////////////////////////////////// 296 void DMXPhysicsList::ConstructProcess() 174 void DMXPhysicsList::ConstructProcess() 297 { 175 { >> 176 298 AddTransportation(); 177 AddTransportation(); 299 178 300 ConstructEM(); 179 ConstructEM(); 301 180 302 ConstructOp(); 181 ConstructOp(); 303 182 304 ConstructHad(); 183 ConstructHad(); 305 184 306 ConstructGeneral(); 185 ConstructGeneral(); >> 186 307 } 187 } 308 188 >> 189 309 // Transportation //////////////////////////// 190 // Transportation /////////////////////////////////////////////////////////// >> 191 #include "DMXMaxTimeCuts.hh" >> 192 #include "DMXMinEkineCuts.hh" >> 193 #include "G4StepLimiter.hh" >> 194 310 void DMXPhysicsList::AddTransportation() { 195 void DMXPhysicsList::AddTransportation() { 311 196 312 G4VUserPhysicsList::AddTransportation(); 197 G4VUserPhysicsList::AddTransportation(); 313 198 314 auto particleIterator=GetParticleIterator(); << 199 theParticleIterator->reset(); 315 particleIterator->reset(); << 200 while( (*theParticleIterator)() ){ 316 while( (*particleIterator)() ){ << 201 G4ParticleDefinition* particle = theParticleIterator->value(); 317 G4ParticleDefinition* particle = particleI << 318 G4ProcessManager* pmanager = particle->Get 202 G4ProcessManager* pmanager = particle->GetProcessManager(); 319 G4String particleName = particle->GetParti 203 G4String particleName = particle->GetParticleName(); 320 // time cuts for ONLY neutrons: 204 // time cuts for ONLY neutrons: 321 if(particleName == "neutron") 205 if(particleName == "neutron") 322 pmanager->AddDiscreteProcess(new DMXMaxT 206 pmanager->AddDiscreteProcess(new DMXMaxTimeCuts()); 323 // Energy cuts to kill charged (embedded i 207 // Energy cuts to kill charged (embedded in method) particles: 324 pmanager->AddDiscreteProcess(new DMXMinEki 208 pmanager->AddDiscreteProcess(new DMXMinEkineCuts()); 325 209 326 // Step limit applied to all particles: 210 // Step limit applied to all particles: 327 pmanager->AddDiscreteProcess(new G4StepLim << 211 pmanager->AddProcess(new G4StepLimiter, -1,-1,1); >> 212 328 } 213 } 329 } 214 } 330 215 >> 216 331 // Electromagnetic Processes ///////////////// 217 // Electromagnetic Processes //////////////////////////////////////////////// 332 // all charged particles 218 // all charged particles 333 void DMXPhysicsList::ConstructEM() { << 334 << 335 G4LossTableManager* man = G4LossTableManager << 336 man->SetAtomDeexcitation(new G4UAtomicDeexci << 337 219 338 G4EmParameters* em_params = G4EmParameters:: << 220 // gamma >> 221 #include "G4PhotoElectricEffect.hh" >> 222 #include "G4LivermorePhotoElectricModel.hh" >> 223 >> 224 #include "G4ComptonScattering.hh" >> 225 #include "G4LivermoreComptonModel.hh" >> 226 >> 227 #include "G4GammaConversion.hh" >> 228 #include "G4LivermoreGammaConversionModel.hh" >> 229 >> 230 #include "G4RayleighScattering.hh" >> 231 #include "G4LivermoreRayleighModel.hh" >> 232 >> 233 >> 234 // e- >> 235 #include "G4eMultipleScattering.hh" >> 236 >> 237 #include "G4eIonisation.hh" >> 238 #include "G4LivermoreIonisationModel.hh" >> 239 >> 240 #include "G4eBremsstrahlung.hh" >> 241 #include "G4LivermoreBremsstrahlungModel.hh" >> 242 >> 243 >> 244 // e+ >> 245 #include "G4eIonisation.hh" >> 246 #include "G4eBremsstrahlung.hh" >> 247 #include "G4eplusAnnihilation.hh" >> 248 >> 249 >> 250 // alpha and GenericIon and deuterons, triton, He3: >> 251 #include "G4EnergyLossTables.hh" >> 252 >> 253 //muon: >> 254 #include "G4MuIonisation.hh" >> 255 #include "G4MuBremsstrahlung.hh" >> 256 #include "G4MuPairProduction.hh" >> 257 #include "G4MuonMinusCaptureAtRest.hh" >> 258 >> 259 //OTHERS: >> 260 #include "G4hIonisation.hh" >> 261 #include "G4hMultipleScattering.hh" >> 262 #include "G4hBremsstrahlung.hh" >> 263 #include "G4ionIonisation.hh" >> 264 #include "G4IonParametrisedLossModel.hh" >> 265 >> 266 //em process options to allow msc step-limitation to be switched off >> 267 #include "G4EmProcessOptions.hh" >> 268 >> 269 void DMXPhysicsList::ConstructEM() { 339 270 340 auto particleIterator=GetParticleIterator(); << 271 //set a finer grid of the physic tables in order to improve precision 341 particleIterator->reset(); << 272 //former LowEnergy models have 200 bins up to 100 GeV 342 while( (*particleIterator)() ){ << 273 G4EmProcessOptions opt; 343 G4ParticleDefinition* particle = particleI << 274 opt.SetMaxEnergy(100*GeV); >> 275 opt.SetDEDXBinning(200); >> 276 opt.SetLambdaBinning(200); >> 277 >> 278 theParticleIterator->reset(); >> 279 while( (*theParticleIterator)() ){ >> 280 G4ParticleDefinition* particle = theParticleIterator->value(); 344 G4ProcessManager* pmanager = particle->Get 281 G4ProcessManager* pmanager = particle->GetProcessManager(); 345 G4String particleName = particle->GetParti 282 G4String particleName = particle->GetParticleName(); 346 G4String particleType = particle->GetParti 283 G4String particleType = particle->GetParticleType(); 347 G4double charge = particle->GetPDGCharge() 284 G4double charge = particle->GetPDGCharge(); 348 285 349 if (particleName == "gamma") 286 if (particleName == "gamma") 350 { 287 { 351 //gamma 288 //gamma 352 G4RayleighScattering* theRayleigh = new G4Ra 289 G4RayleighScattering* theRayleigh = new G4RayleighScattering(); >> 290 theRayleigh->SetModel(new G4LivermoreRayleighModel()); //not strictly necessary 353 pmanager->AddDiscreteProcess(theRayleigh); 291 pmanager->AddDiscreteProcess(theRayleigh); 354 292 355 G4PhotoElectricEffect* thePhotoElectricEffec 293 G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect(); 356 thePhotoElectricEffect->SetEmModel(new G4Liv << 294 thePhotoElectricEffect->SetModel(new G4LivermorePhotoElectricModel()); 357 pmanager->AddDiscreteProcess(thePhotoElectri 295 pmanager->AddDiscreteProcess(thePhotoElectricEffect); 358 296 359 G4ComptonScattering* theComptonScattering = 297 G4ComptonScattering* theComptonScattering = new G4ComptonScattering(); 360 theComptonScattering->SetEmModel(new G4Liver << 298 theComptonScattering->SetModel(new G4LivermoreComptonModel()); 361 pmanager->AddDiscreteProcess(theComptonScatt 299 pmanager->AddDiscreteProcess(theComptonScattering); 362 300 363 G4GammaConversion* theGammaConversion = new 301 G4GammaConversion* theGammaConversion = new G4GammaConversion(); 364 theGammaConversion->SetEmModel(new G4BetheHe << 302 theGammaConversion->SetModel(new G4LivermoreGammaConversionModel()); 365 pmanager->AddDiscreteProcess(theGammaConvers 303 pmanager->AddDiscreteProcess(theGammaConversion); 366 304 367 } 305 } 368 else if (particleName == "e-") 306 else if (particleName == "e-") 369 { 307 { 370 //electron 308 //electron 371 // process ordering: AddProcess(name, at res 309 // process ordering: AddProcess(name, at rest, along step, post step) 372 // Multiple scattering 310 // Multiple scattering 373 G4eMultipleScattering* msc = new G4eMultiple 311 G4eMultipleScattering* msc = new G4eMultipleScattering(); 374 em_params->SetMscStepLimitType(fUseDistanceT << 312 msc->SetStepLimitType(fUseDistanceToBoundary); 375 pmanager->AddProcess(msc,-1, 1, -1); << 313 pmanager->AddProcess(msc,-1, 1, 1); 376 314 377 // Ionisation 315 // Ionisation 378 G4eIonisation* eIonisation = new G4eIonisati 316 G4eIonisation* eIonisation = new G4eIonisation(); 379 G4VEmModel* theIoniLiv = new G4Livermo << 317 eIonisation->SetEmModel(new G4LivermoreIonisationModel()); 380 theIoniLiv->SetHighEnergyLimit(0.1*MeV << 318 eIonisation->SetStepFunction(0.2, 100*um); //improved precision in tracking 381 eIonisation->AddEmModel(0, theIoniLiv, << 319 pmanager->AddProcess(eIonisation,-1, 2, 2); 382 em_params->SetStepFunction(0.2, 100*um); //i << 383 pmanager->AddProcess(eIonisation,-1, 2, 1); << 384 320 385 // Bremsstrahlung 321 // Bremsstrahlung 386 G4eBremsstrahlung* eBremsstrahlung = new G4e 322 G4eBremsstrahlung* eBremsstrahlung = new G4eBremsstrahlung(); 387 pmanager->AddProcess(eBremsstrahlung, -1,-3, << 323 eBremsstrahlung->SetEmModel(new G4LivermoreBremsstrahlungModel()); >> 324 pmanager->AddProcess(eBremsstrahlung, -1,-3, 3); 388 } 325 } 389 else if (particleName == "e+") 326 else if (particleName == "e+") 390 { 327 { 391 //positron 328 //positron 392 G4eMultipleScattering* msc = new G4eMultiple 329 G4eMultipleScattering* msc = new G4eMultipleScattering(); 393 msc->SetStepLimitType(fUseDistanceToBoundary 330 msc->SetStepLimitType(fUseDistanceToBoundary); 394 pmanager->AddProcess(msc,-1, 1, -1); << 331 pmanager->AddProcess(msc,-1, 1, 1); 395 332 396 // Ionisation 333 // Ionisation 397 G4eIonisation* eIonisation = new G4eIonisati 334 G4eIonisation* eIonisation = new G4eIonisation(); 398 // eIonisation->SetStepFunction(0.2, 100*um) << 335 eIonisation->SetStepFunction(0.2, 100*um); // 399 pmanager->AddProcess(eIonisation, << 336 pmanager->AddProcess(eIonisation, -1, 2, 2); 400 337 401 //Bremsstrahlung (use default, no low-energy 338 //Bremsstrahlung (use default, no low-energy available) 402 pmanager->AddProcess(new G4eBremsstrahlung() << 339 pmanager->AddProcess(new G4eBremsstrahlung(), -1,-1, 3); 403 340 404 //Annihilation 341 //Annihilation 405 pmanager->AddProcess(new G4eplusAnnihilation << 342 pmanager->AddProcess(new G4eplusAnnihilation(),0,-1, 4); 406 } 343 } 407 else if( particleName == "mu+" || 344 else if( particleName == "mu+" || 408 particleName == "mu-" ) 345 particleName == "mu-" ) 409 { 346 { 410 //muon 347 //muon 411 pmanager->AddProcess(new G4MuMultipleScatter << 348 pmanager->AddProcess(new G4eMultipleScattering, -1, 1, 1); 412 pmanager->AddProcess(new G4MuIonisation(), << 349 pmanager->AddProcess(new G4MuIonisation(), -1, 2, 2); 413 pmanager->AddProcess(new G4MuBremsstrahlung( << 350 pmanager->AddProcess(new G4MuBremsstrahlung(), -1,-1, 3); 414 pmanager->AddProcess(new G4MuPairProduction( << 351 pmanager->AddProcess(new G4MuPairProduction(), -1,-1, 4); 415 if( particleName == "mu-" ) 352 if( particleName == "mu-" ) 416 pmanager->AddProcess(new G4MuonMinusCaptur << 353 pmanager->AddProcess(new G4MuonMinusCaptureAtRest(), 0,-1,-1); 417 } 354 } 418 else if (particleName == "proton" || 355 else if (particleName == "proton" || 419 particleName == "pi+" || 356 particleName == "pi+" || 420 particleName == "pi-") 357 particleName == "pi-") 421 { 358 { 422 //multiple scattering 359 //multiple scattering 423 pmanager->AddProcess(new G4hMultipleScatteri << 360 pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); 424 361 425 //ionisation 362 //ionisation 426 G4hIonisation* hIonisation = new G4hIonisati 363 G4hIonisation* hIonisation = new G4hIonisation(); 427 em_params->SetStepFunctionMuHad(0.2, 50*um); << 364 hIonisation->SetStepFunction(0.2, 50*um); 428 pmanager->AddProcess(hIonisation, << 365 pmanager->AddProcess(hIonisation, -1, 2, 2); 429 366 430 //bremmstrahlung 367 //bremmstrahlung 431 pmanager->AddProcess(new G4hBremsstrahlung, << 368 pmanager->AddProcess(new G4hBremsstrahlung, -1,-3, 3); 432 } 369 } 433 else if(particleName == "alpha" || 370 else if(particleName == "alpha" || 434 particleName == "deuteron" || 371 particleName == "deuteron" || 435 particleName == "triton" || 372 particleName == "triton" || 436 particleName == "He3") 373 particleName == "He3") 437 { 374 { 438 //multiple scattering 375 //multiple scattering 439 pmanager->AddProcess(new G4hMultipleScatteri << 376 pmanager->AddProcess(new G4hMultipleScattering,-1,1,1); 440 377 441 //ionisation 378 //ionisation 442 G4ionIonisation* ionIoni = new G4ionIonisati 379 G4ionIonisation* ionIoni = new G4ionIonisation(); 443 em_params->SetStepFunctionLightIons(0.1, 1*C << 380 ionIoni->SetStepFunction(0.1, 20*um); 444 pmanager->AddProcess(ionIoni, << 381 pmanager->AddProcess(ionIoni, -1, 2, 2); 445 pmanager->AddProcess(new G4NuclearStopping() << 446 } 382 } 447 else if (particleName == "GenericIon") 383 else if (particleName == "GenericIon") 448 { 384 { 449 // OBJECT may be dynamically created as eith 385 // OBJECT may be dynamically created as either a GenericIon or nucleus 450 // G4Nucleus exists and therefore has partic 386 // G4Nucleus exists and therefore has particle type nucleus 451 // genericIon: 387 // genericIon: 452 388 453 //multiple scattering 389 //multiple scattering 454 pmanager->AddProcess(new G4hMultipleScatteri << 390 pmanager->AddProcess(new G4hMultipleScattering,-1,1,1); 455 391 456 //ionisation 392 //ionisation 457 G4ionIonisation* ionIoni = new G4ionIonisati 393 G4ionIonisation* ionIoni = new G4ionIonisation(); 458 em_params->SetStepFunctionIons(0.1, 1*CLHEP: << 394 ionIoni->SetEmModel(new G4IonParametrisedLossModel()); 459 pmanager->AddProcess(ionIoni, << 395 ionIoni->SetStepFunction(0.1, 20*um); 460 pmanager->AddProcess(new G4NuclearStopping() << 396 pmanager->AddProcess(ionIoni, -1, 2, 2); 461 } 397 } 462 398 463 else if ((!particle->IsShortLived()) && 399 else if ((!particle->IsShortLived()) && 464 (charge != 0.0) && 400 (charge != 0.0) && 465 (particle->GetParticleName() != "charge 401 (particle->GetParticleName() != "chargedgeantino")) 466 { 402 { 467 //all others charged particles except geanti 403 //all others charged particles except geantino 468 G4hMultipleScattering* aMultipleScatte 404 G4hMultipleScattering* aMultipleScattering = new G4hMultipleScattering(); 469 G4hIonisation* ahadronIon = new G4hIon 405 G4hIonisation* ahadronIon = new G4hIonisation(); 470 406 471 //multiple scattering 407 //multiple scattering 472 pmanager->AddProcess(aMultipleScattering,-1, << 408 pmanager->AddProcess(aMultipleScattering,-1,1,1); 473 409 474 //ionisation 410 //ionisation 475 pmanager->AddProcess(ahadronIon, -1,2, << 411 pmanager->AddProcess(ahadronIon, -1,2,2); 476 } 412 } >> 413 477 } 414 } >> 415 >> 416 // turn off msc step-limitation - especially as electron cut 1nm >> 417 opt.SetMscStepLimitation(fMinimal); >> 418 >> 419 // switch on fluorescence, PIXE and Auger: >> 420 opt.SetFluo(true); >> 421 opt.SetPIXE(true); >> 422 opt.SetAuger(true); >> 423 478 } 424 } 479 425 >> 426 480 // Optical Processes ///////////////////////// 427 // Optical Processes //////////////////////////////////////////////////////// >> 428 #include "G4Scintillation.hh" >> 429 #include "G4OpAbsorption.hh" >> 430 //#include "G4OpRayleigh.hh" >> 431 #include "G4OpBoundaryProcess.hh" >> 432 481 void DMXPhysicsList::ConstructOp() 433 void DMXPhysicsList::ConstructOp() 482 { 434 { 483 G4OpticalParameters* opParams = G4OpticalPar << 435 // default scintillation process 484 G4Scintillation* theScintProcessDef = new G4 436 G4Scintillation* theScintProcessDef = new G4Scintillation("Scintillation"); 485 opParams->SetScintTrackSecondariesFirst(true << 437 // theScintProcessDef->DumpPhysicsTable(); 486 opParams->SetScintByParticleType(true); << 438 theScintProcessDef->SetTrackSecondariesFirst(true); >> 439 theScintProcessDef->SetScintillationYieldFactor(1.0); // >> 440 theScintProcessDef->SetScintillationExcitationRatio(0.0); // >> 441 theScintProcessDef->SetVerboseLevel(OpVerbLevel); >> 442 >> 443 // scintillation process for alpha: >> 444 G4Scintillation* theScintProcessAlpha = new G4Scintillation("Scintillation"); >> 445 // theScintProcessNuc->DumpPhysicsTable(); >> 446 theScintProcessAlpha->SetTrackSecondariesFirst(true); >> 447 theScintProcessAlpha->SetScintillationYieldFactor(1.1); >> 448 theScintProcessAlpha->SetScintillationExcitationRatio(1.0); >> 449 theScintProcessAlpha->SetVerboseLevel(OpVerbLevel); >> 450 >> 451 // scintillation process for heavy nuclei >> 452 G4Scintillation* theScintProcessNuc = new G4Scintillation("Scintillation"); >> 453 // theScintProcessNuc->DumpPhysicsTable(); >> 454 theScintProcessNuc->SetTrackSecondariesFirst(true); >> 455 theScintProcessNuc->SetScintillationYieldFactor(0.2); >> 456 theScintProcessNuc->SetScintillationExcitationRatio(1.0); >> 457 theScintProcessNuc->SetVerboseLevel(OpVerbLevel); 487 458 488 // optical processes 459 // optical processes 489 G4OpAbsorption* theAbsorptionProcess = new G 460 G4OpAbsorption* theAbsorptionProcess = new G4OpAbsorption(); >> 461 // G4OpRayleigh* theRayleighScatteringProcess = new G4OpRayleigh(); 490 G4OpBoundaryProcess* theBoundaryProcess = ne 462 G4OpBoundaryProcess* theBoundaryProcess = new G4OpBoundaryProcess(); >> 463 // theAbsorptionProcess->DumpPhysicsTable(); >> 464 // theRayleighScatteringProcess->DumpPhysicsTable(); >> 465 theAbsorptionProcess->SetVerboseLevel(OpVerbLevel); >> 466 // theRayleighScatteringProcess->SetVerboseLevel(OpVerbLevel); >> 467 theBoundaryProcess->SetVerboseLevel(OpVerbLevel); 491 468 492 auto particleIterator=GetParticleIterator(); << 469 theParticleIterator->reset(); 493 particleIterator->reset(); << 470 while( (*theParticleIterator)() ) 494 while( (*particleIterator)() ) << 495 { 471 { 496 G4ParticleDefinition* particle = particl << 472 G4ParticleDefinition* particle = theParticleIterator->value(); 497 G4ProcessManager* pmanager = particle->G 473 G4ProcessManager* pmanager = particle->GetProcessManager(); 498 G4String particleName = particle->GetPar 474 G4String particleName = particle->GetParticleName(); 499 if (theScintProcessDef->IsApplicable(*pa 475 if (theScintProcessDef->IsApplicable(*particle)) { 500 pmanager->AddProcess(theScintProcessDe << 476 // if(particle->GetPDGMass() > 5.0*GeV) 501 pmanager->SetProcessOrderingToLast(the << 477 if(particle->GetParticleName() == "GenericIon") { 502 pmanager->SetProcessOrderingToLast(the << 478 pmanager->AddProcess(theScintProcessNuc); // AtRestDiscrete >> 479 pmanager->SetProcessOrderingToLast(theScintProcessNuc,idxAtRest); >> 480 pmanager->SetProcessOrderingToLast(theScintProcessNuc,idxPostStep); >> 481 } >> 482 else if(particle->GetParticleName() == "alpha") { >> 483 pmanager->AddProcess(theScintProcessAlpha); >> 484 pmanager->SetProcessOrderingToLast(theScintProcessAlpha,idxAtRest); >> 485 pmanager->SetProcessOrderingToLast(theScintProcessAlpha,idxPostStep); >> 486 } >> 487 else { >> 488 pmanager->AddProcess(theScintProcessDef); >> 489 pmanager->SetProcessOrderingToLast(theScintProcessDef,idxAtRest); >> 490 pmanager->SetProcessOrderingToLast(theScintProcessDef,idxPostStep); >> 491 } 503 } 492 } 504 493 505 if (particleName == "opticalphoton") { 494 if (particleName == "opticalphoton") { 506 pmanager->AddDiscreteProcess(theAbsorptionPr 495 pmanager->AddDiscreteProcess(theAbsorptionProcess); >> 496 // pmanager->AddDiscreteProcess(theRayleighScatteringProcess); 507 pmanager->AddDiscreteProcess(theBoundaryProc 497 pmanager->AddDiscreteProcess(theBoundaryProcess); 508 } 498 } 509 } 499 } 510 } 500 } 511 501 >> 502 512 // Hadronic processes //////////////////////// 503 // Hadronic processes //////////////////////////////////////////////////////// 513 504 >> 505 // Elastic processes: >> 506 #include "G4HadronElasticProcess.hh" >> 507 >> 508 // Inelastic processes: >> 509 #include "G4PionPlusInelasticProcess.hh" >> 510 #include "G4PionMinusInelasticProcess.hh" >> 511 #include "G4KaonPlusInelasticProcess.hh" >> 512 #include "G4KaonZeroSInelasticProcess.hh" >> 513 #include "G4KaonZeroLInelasticProcess.hh" >> 514 #include "G4KaonMinusInelasticProcess.hh" >> 515 #include "G4ProtonInelasticProcess.hh" >> 516 #include "G4AntiProtonInelasticProcess.hh" >> 517 #include "G4NeutronInelasticProcess.hh" >> 518 #include "G4AntiNeutronInelasticProcess.hh" >> 519 #include "G4DeuteronInelasticProcess.hh" >> 520 #include "G4TritonInelasticProcess.hh" >> 521 #include "G4AlphaInelasticProcess.hh" >> 522 >> 523 // Low-energy Models: < 20GeV >> 524 #include "G4LElastic.hh" >> 525 #include "G4LEPionPlusInelastic.hh" >> 526 #include "G4LEPionMinusInelastic.hh" >> 527 #include "G4LEKaonPlusInelastic.hh" >> 528 #include "G4LEKaonZeroSInelastic.hh" >> 529 #include "G4LEKaonZeroLInelastic.hh" >> 530 #include "G4LEKaonMinusInelastic.hh" >> 531 #include "G4LEProtonInelastic.hh" >> 532 #include "G4LEAntiProtonInelastic.hh" >> 533 #include "G4LENeutronInelastic.hh" >> 534 #include "G4LEAntiNeutronInelastic.hh" >> 535 #include "G4LEDeuteronInelastic.hh" >> 536 #include "G4LETritonInelastic.hh" >> 537 #include "G4LEAlphaInelastic.hh" >> 538 #include "G4HadronCaptureProcess.hh" >> 539 // High-energy Models: >20 GeV >> 540 #include "G4HEPionPlusInelastic.hh" >> 541 #include "G4HEPionMinusInelastic.hh" >> 542 #include "G4HEKaonPlusInelastic.hh" >> 543 #include "G4HEKaonZeroInelastic.hh" >> 544 #include "G4HEKaonZeroInelastic.hh" >> 545 #include "G4HEKaonMinusInelastic.hh" >> 546 #include "G4HEProtonInelastic.hh" >> 547 #include "G4HEAntiProtonInelastic.hh" >> 548 #include "G4HENeutronInelastic.hh" >> 549 #include "G4HEAntiNeutronInelastic.hh" >> 550 >> 551 // Neutron high-precision models: <20 MeV >> 552 #include "G4NeutronHPElastic.hh" >> 553 #include "G4NeutronHPElasticData.hh" >> 554 #include "G4NeutronHPCapture.hh" >> 555 #include "G4NeutronHPCaptureData.hh" >> 556 #include "G4NeutronHPInelastic.hh" >> 557 #include "G4NeutronHPInelasticData.hh" >> 558 #include "G4LCapture.hh" >> 559 >> 560 // Stopping processes >> 561 #include "G4PiMinusAbsorptionAtRest.hh" >> 562 #include "G4KaonMinusAbsorptionAtRest.hh" >> 563 #include "G4AntiProtonAnnihilationAtRest.hh" >> 564 #include "G4AntiNeutronAnnihilationAtRest.hh" >> 565 >> 566 >> 567 // ConstructHad() >> 568 // Makes discrete physics processes for the hadrons, at present limited >> 569 // to those particles with GHEISHA interactions (INTRC > 0). >> 570 // The processes are: Elastic scattering and Inelastic scattering. >> 571 // F.W.Jones 09-JUL-1998 514 void DMXPhysicsList::ConstructHad() 572 void DMXPhysicsList::ConstructHad() 515 { 573 { 516 //Elastic models << 574 G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess; 517 G4HadronElastic* elastic_lhep0 = new G4Hadro << 575 G4LElastic* theElasticModel = new G4LElastic; 518 G4ChipsElasticModel* elastic_chip = new G4Ch << 576 theElasticProcess->RegisterMe(theElasticModel); 519 G4ElasticHadrNucleusHE* elastic_he = new G4E << 520 577 521 // Inelastic scattering << 578 theParticleIterator->reset(); 522 const G4double theFTFMin0 = 0.0*GeV; << 579 while ((*theParticleIterator)()) 523 const G4double theFTFMin1 = 3.0*GeV; << 524 const G4double theFTFMax = G4HadronicParamet << 525 const G4double theBERTMin0 = 0.0*GeV; << 526 const G4double theBERTMin1 = 19.0*MeV; << 527 const G4double theBERTMax = 6.0*GeV; << 528 const G4double theHPMin = 0.0*GeV; << 529 const G4double theHPMax = 20.0*MeV; << 530 << 531 G4FTFModel * theStringModel = new G4FTFModel << 532 G4ExcitedStringDecay * theStringDecay = new << 533 theStringModel->SetFragmentationModel( theSt << 534 G4PreCompoundModel * thePreEquilib = new G4P << 535 G4GeneratorPrecompoundInterface * theCascade << 536 << 537 G4TheoFSGenerator * theFTFModel0 = new G4The << 538 theFTFModel0->SetHighEnergyGenerator( theStr << 539 theFTFModel0->SetTransport( theCascade ); << 540 theFTFModel0->SetMinEnergy( theFTFMin0 ); << 541 theFTFModel0->SetMaxEnergy( theFTFMax ); << 542 << 543 G4TheoFSGenerator * theFTFModel1 = new G4The << 544 theFTFModel1->SetHighEnergyGenerator( theStr << 545 theFTFModel1->SetTransport( theCascade ); << 546 theFTFModel1->SetMinEnergy( theFTFMin1 ); << 547 theFTFModel1->SetMaxEnergy( theFTFMax ); << 548 << 549 G4CascadeInterface * theBERTModel0 = new G4C << 550 theBERTModel0->SetMinEnergy( theBERTMin0 ); << 551 theBERTModel0->SetMaxEnergy( theBERTMax ); << 552 << 553 G4CascadeInterface * theBERTModel1 = new G4C << 554 theBERTModel1->SetMinEnergy( theBERTMin1 ); << 555 theBERTModel1->SetMaxEnergy( theBERTMax ); << 556 << 557 G4VCrossSectionDataSet * theAntiNucleonData << 558 G4ComponentGGNuclNuclXsc * ggNuclNuclXsec = << 559 G4VCrossSectionDataSet * theGGNuclNuclData = << 560 G4VCrossSectionDataSet * theGGNNEl = new G4C << 561 G4ComponentGGHadronNucleusXsc * ggHNXsec = n << 562 G4VCrossSectionDataSet * theGGHNEl = new G4C << 563 G4VCrossSectionDataSet * theGGHNInel = new G << 564 << 565 auto particleIterator=GetParticleIterator(); << 566 particleIterator->reset(); << 567 while ((*particleIterator)()) << 568 { 580 { 569 G4ParticleDefinition* particle = particl << 581 G4ParticleDefinition* particle = theParticleIterator->value(); 570 G4ProcessManager* pmanager = particle->G 582 G4ProcessManager* pmanager = particle->GetProcessManager(); 571 G4String particleName = particle->GetPar 583 G4String particleName = particle->GetParticleName(); 572 584 573 if (particleName == "pi+") 585 if (particleName == "pi+") 574 { 586 { 575 // Elastic scattering << 587 pmanager->AddDiscreteProcess(theElasticProcess); 576 G4HadronElasticProcess* theElasticPr << 588 G4PionPlusInelasticProcess* theInelasticProcess = 577 theElasticProcess->AddDataSet( new G << 589 new G4PionPlusInelasticProcess("inelastic"); 578 theElasticProcess->RegisterMe( elast << 590 G4LEPionPlusInelastic* theLEInelasticModel = 579 pmanager->AddDiscreteProcess( theElasticPr << 591 new G4LEPionPlusInelastic; 580 //Inelastic scattering << 592 theInelasticProcess->RegisterMe(theLEInelasticModel); 581 G4HadronInelasticProcess* theInelasticProc << 593 G4HEPionPlusInelastic* theHEInelasticModel = 582 new G4HadronInelasticProcess( "inelastic << 594 new G4HEPionPlusInelastic; 583 theInelasticProcess->AddDataSet( new G4BGG << 595 theInelasticProcess->RegisterMe(theHEInelasticModel); 584 theInelasticProcess->RegisterMe( theFTFMod << 596 pmanager->AddDiscreteProcess(theInelasticProcess); 585 theInelasticProcess->RegisterMe( the << 586 pmanager->AddDiscreteProcess( theInelastic << 587 } 597 } 588 598 589 else if (particleName == "pi-") 599 else if (particleName == "pi-") 590 { 600 { 591 // Elastic scattering << 601 pmanager->AddDiscreteProcess(theElasticProcess); 592 G4HadronElasticProcess* theElasticPr << 602 G4PionMinusInelasticProcess* theInelasticProcess = 593 theElasticProcess->AddDataSet( new G << 603 new G4PionMinusInelasticProcess("inelastic"); 594 theElasticProcess->RegisterMe( elast << 604 G4LEPionMinusInelastic* theLEInelasticModel = 595 pmanager->AddDiscreteProcess( theElasticPr << 605 new G4LEPionMinusInelastic; 596 //Inelastic scattering << 606 theInelasticProcess->RegisterMe(theLEInelasticModel); 597 G4HadronInelasticProcess* theInelasticProc << 607 G4HEPionMinusInelastic* theHEInelasticModel = 598 new G4HadronInelasticProcess( "inelastic << 608 new G4HEPionMinusInelastic; 599 theInelasticProcess->AddDataSet( new G4BGG << 609 theInelasticProcess->RegisterMe(theHEInelasticModel); 600 theInelasticProcess->RegisterMe( theFTFMod << 610 pmanager->AddDiscreteProcess(theInelasticProcess); 601 theInelasticProcess->RegisterMe( the << 611 G4String prcNam; 602 pmanager->AddDiscreteProcess( theInelastic << 612 pmanager->AddRestProcess(new G4PiMinusAbsorptionAtRest, ordDefault); 603 //Absorption << 604 pmanager->AddRestProcess(new G4HadronicAbs << 605 } 613 } >> 614 606 else if (particleName == "kaon+") 615 else if (particleName == "kaon+") 607 { 616 { 608 // Elastic scattering << 617 pmanager->AddDiscreteProcess(theElasticProcess); 609 G4HadronElasticProcess* theElasticPr << 618 G4KaonPlusInelasticProcess* theInelasticProcess = 610 theElasticProcess->AddDataSet( theGGHNEl ) << 619 new G4KaonPlusInelasticProcess("inelastic"); 611 theElasticProcess->RegisterMe( elast << 620 G4LEKaonPlusInelastic* theLEInelasticModel = 612 pmanager->AddDiscreteProcess( theElasticPr << 621 new G4LEKaonPlusInelastic; 613 // Inelastic scattering << 622 theInelasticProcess->RegisterMe(theLEInelasticModel); 614 G4HadronInelasticProcess* theInelasticProc << 623 G4HEKaonPlusInelastic* theHEInelasticModel = 615 new G4HadronInelasticProcess( "inelastic << 624 new G4HEKaonPlusInelastic; 616 theInelasticProcess->AddDataSet( theGGHNIn << 625 theInelasticProcess->RegisterMe(theHEInelasticModel); 617 theInelasticProcess->RegisterMe( theFTFMod << 626 pmanager->AddDiscreteProcess(theInelasticProcess); 618 theInelasticProcess->RegisterMe( the << 627 } 619 pmanager->AddDiscreteProcess( theInelastic << 628 620 } << 621 else if (particleName == "kaon0S") 629 else if (particleName == "kaon0S") 622 { 630 { 623 // Elastic scattering << 631 pmanager->AddDiscreteProcess(theElasticProcess); 624 G4HadronElasticProcess* theElasticPr << 632 G4KaonZeroSInelasticProcess* theInelasticProcess = 625 theElasticProcess->AddDataSet( theGGHNEl ) << 633 new G4KaonZeroSInelasticProcess("inelastic"); 626 theElasticProcess->RegisterMe( elast << 634 G4LEKaonZeroSInelastic* theLEInelasticModel = 627 pmanager->AddDiscreteProcess( theElasticPr << 635 new G4LEKaonZeroSInelastic; 628 // Inelastic scattering << 636 theInelasticProcess->RegisterMe(theLEInelasticModel); 629 G4HadronInelasticProcess* theInelasticProc << 637 G4HEKaonZeroInelastic* theHEInelasticModel = 630 new G4HadronInelasticProcess( "inelastic << 638 new G4HEKaonZeroInelastic; 631 theInelasticProcess->AddDataSet( theGGHNIn << 639 theInelasticProcess->RegisterMe(theHEInelasticModel); 632 theInelasticProcess->RegisterMe( theFTFMod << 640 pmanager->AddDiscreteProcess(theInelasticProcess); 633 theInelasticProcess->RegisterMe( the << 634 pmanager->AddDiscreteProcess( theInelastic << 635 } 641 } 636 642 637 else if (particleName == "kaon0L") 643 else if (particleName == "kaon0L") 638 { 644 { 639 // Elastic scattering << 645 pmanager->AddDiscreteProcess(theElasticProcess); 640 G4HadronElasticProcess* theElasticPr << 646 G4KaonZeroLInelasticProcess* theInelasticProcess = 641 theElasticProcess->AddDataSet( theGGHNEl ) << 647 new G4KaonZeroLInelasticProcess("inelastic"); 642 theElasticProcess->RegisterMe( elast << 648 G4LEKaonZeroLInelastic* theLEInelasticModel = 643 pmanager->AddDiscreteProcess( theElasticPr << 649 new G4LEKaonZeroLInelastic; 644 // Inelastic scattering << 650 theInelasticProcess->RegisterMe(theLEInelasticModel); 645 G4HadronInelasticProcess* theInelasticProc << 651 G4HEKaonZeroInelastic* theHEInelasticModel = 646 new G4HadronInelasticProcess( "inelastic << 652 new G4HEKaonZeroInelastic; 647 theInelasticProcess->AddDataSet( theGGHNIn << 653 theInelasticProcess->RegisterMe(theHEInelasticModel); 648 theInelasticProcess->RegisterMe( theFTFMod << 654 pmanager->AddDiscreteProcess(theInelasticProcess); 649 theInelasticProcess->RegisterMe( the << 650 pmanager->AddDiscreteProcess( theInelastic << 651 } 655 } 652 656 653 else if (particleName == "kaon-") 657 else if (particleName == "kaon-") 654 { 658 { 655 // Elastic scattering << 659 pmanager->AddDiscreteProcess(theElasticProcess); 656 G4HadronElasticProcess* theElasticPr << 660 G4KaonMinusInelasticProcess* theInelasticProcess = 657 theElasticProcess->AddDataSet( theGGHNEl ) << 661 new G4KaonMinusInelasticProcess("inelastic"); 658 theElasticProcess->RegisterMe( elast << 662 G4LEKaonMinusInelastic* theLEInelasticModel = 659 pmanager->AddDiscreteProcess( theElasticPr << 663 new G4LEKaonMinusInelastic; 660 // Inelastic scattering << 664 theInelasticProcess->RegisterMe(theLEInelasticModel); 661 G4HadronInelasticProcess* theInelasticProc << 665 G4HEKaonMinusInelastic* theHEInelasticModel = 662 new G4HadronInelasticProcess( "inelastic << 666 new G4HEKaonMinusInelastic; 663 theInelasticProcess->AddDataSet( the << 667 theInelasticProcess->RegisterMe(theHEInelasticModel); 664 theInelasticProcess->RegisterMe( theFTFMod << 668 pmanager->AddDiscreteProcess(theInelasticProcess); 665 theInelasticProcess->RegisterMe( the << 669 pmanager->AddRestProcess(new G4KaonMinusAbsorptionAtRest, ordDefault); 666 pmanager->AddDiscreteProcess( theInelastic << 667 pmanager->AddRestProcess(new G4HadronicAbs << 668 } 670 } 669 671 670 else if (particleName == "proton") 672 else if (particleName == "proton") 671 { 673 { 672 // Elastic scattering << 674 pmanager->AddDiscreteProcess(theElasticProcess); 673 G4HadronElasticProcess* theElasticPr << 675 G4ProtonInelasticProcess* theInelasticProcess = 674 theElasticProcess->AddDataSet( new G << 676 new G4ProtonInelasticProcess("inelastic"); 675 theElasticProcess->RegisterMe( elast << 677 G4LEProtonInelastic* theLEInelasticModel = new G4LEProtonInelastic; 676 pmanager->AddDiscreteProcess( theElasticPr << 678 theInelasticProcess->RegisterMe(theLEInelasticModel); 677 // Inelastic scattering << 679 G4HEProtonInelastic* theHEInelasticModel = new G4HEProtonInelastic; 678 G4HadronInelasticProcess* theInelasticProc << 680 theInelasticProcess->RegisterMe(theHEInelasticModel); 679 new G4HadronInelasticProcess( "inelastic << 681 pmanager->AddDiscreteProcess(theInelasticProcess); 680 theInelasticProcess->AddDataSet( new G4BGG << 681 theInelasticProcess->RegisterMe( theFTFMod << 682 theInelasticProcess->RegisterMe( the << 683 pmanager->AddDiscreteProcess( theInelastic << 684 } 682 } >> 683 685 else if (particleName == "anti_proton") 684 else if (particleName == "anti_proton") 686 { 685 { 687 // Elastic scattering << 686 pmanager->AddDiscreteProcess(theElasticProcess); 688 const G4double elastic_elimitAntiNuc << 687 G4AntiProtonInelasticProcess* theInelasticProcess = 689 G4AntiNuclElastic* elastic_anuc = ne << 688 new G4AntiProtonInelasticProcess("inelastic"); 690 elastic_anuc->SetMinEnergy( elastic_ << 689 G4LEAntiProtonInelastic* theLEInelasticModel = 691 G4CrossSectionElastic* elastic_anucx << 690 new G4LEAntiProtonInelastic; 692 G4HadronElastic* elastic_lhep2 = new << 691 theInelasticProcess->RegisterMe(theLEInelasticModel); 693 elastic_lhep2->SetMaxEnergy( elastic << 692 G4HEAntiProtonInelastic* theHEInelasticModel = 694 G4HadronElasticProcess* theElasticPr << 693 new G4HEAntiProtonInelastic; 695 theElasticProcess->AddDataSet( elast << 694 theInelasticProcess->RegisterMe(theHEInelasticModel); 696 theElasticProcess->RegisterMe( elast << 695 pmanager->AddDiscreteProcess(theInelasticProcess); 697 theElasticProcess->RegisterMe( elast << 698 pmanager->AddDiscreteProcess( theElasticPr << 699 // Inelastic scattering << 700 G4HadronInelasticProcess* theInelasticProc << 701 new G4HadronInelasticProcess( "inelastic << 702 theInelasticProcess->AddDataSet( theAntiNu << 703 theInelasticProcess->RegisterMe( theFTFMod << 704 pmanager->AddDiscreteProcess( theInelastic << 705 // Absorption << 706 pmanager->AddRestProcess(new G4HadronicAbs << 707 } 696 } >> 697 708 else if (particleName == "neutron") { 698 else if (particleName == "neutron") { 709 // elastic scattering 699 // elastic scattering 710 G4HadronElasticProcess* theElasticProcess = << 700 G4HadronElasticProcess* theNeutronElasticProcess = 711 theElasticProcess->AddDataSet(new G4Ne << 701 new G4HadronElasticProcess; 712 G4HadronElastic* elastic_neutronChipsM << 702 G4LElastic* theElasticModel1 = new G4LElastic; 713 elastic_neutronChipsModel->SetMinEnergy( 19. << 703 G4NeutronHPElastic * theElasticNeutron = new G4NeutronHPElastic; 714 theElasticProcess->RegisterMe( elastic << 704 theNeutronElasticProcess->RegisterMe(theElasticModel1); 715 G4ParticleHPElastic * theElasticNeutronHP = << 705 theElasticModel1->SetMinEnergy(19*MeV); 716 theElasticNeutronHP->SetMinEnergy( the << 706 theNeutronElasticProcess->RegisterMe(theElasticNeutron); 717 theElasticNeutronHP->SetMaxEnergy( the << 707 G4NeutronHPElasticData * theNeutronData = new G4NeutronHPElasticData; 718 theElasticProcess->RegisterMe( theElasticNeu << 708 theNeutronElasticProcess->AddDataSet(theNeutronData); 719 theElasticProcess->AddDataSet( new G4Particl << 709 pmanager->AddDiscreteProcess(theNeutronElasticProcess); 720 pmanager->AddDiscreteProcess( theElasticProc << 710 // inelastic scattering 721 // inelastic scattering << 711 G4NeutronInelasticProcess* theInelasticProcess = 722 G4HadronInelasticProcess* theInelasticProces << 712 new G4NeutronInelasticProcess("inelastic"); 723 new G4HadronInelasticProcess( "inelastic", << 713 G4LENeutronInelastic* theInelasticModel = new G4LENeutronInelastic; 724 theInelasticProcess->AddDataSet( new G4Neutr << 714 theInelasticModel->SetMinEnergy(19*MeV); 725 theInelasticProcess->RegisterMe( theFTFModel << 715 theInelasticProcess->RegisterMe(theInelasticModel); 726 theInelasticProcess->RegisterMe( theBE << 716 G4NeutronHPInelastic * theLENeutronInelasticModel = 727 G4ParticleHPInelastic * theNeutronInelasticH << 717 new G4NeutronHPInelastic; 728 theNeutronInelasticHPModel->SetMinEner << 718 theInelasticProcess->RegisterMe(theLENeutronInelasticModel); 729 theNeutronInelasticHPModel->SetMaxEner << 719 G4NeutronHPInelasticData * theNeutronData1 = 730 theInelasticProcess->RegisterMe( theNeutronI << 720 new G4NeutronHPInelasticData; 731 theInelasticProcess->AddDataSet( new G4Parti << 721 theInelasticProcess->AddDataSet(theNeutronData1); 732 pmanager->AddDiscreteProcess(theInelasticPro 722 pmanager->AddDiscreteProcess(theInelasticProcess); 733 // capture 723 // capture 734 G4NeutronCaptureProcess* theCaptureProcess = << 724 G4HadronCaptureProcess* theCaptureProcess = 735 new G4NeutronCaptureProcess; << 725 new G4HadronCaptureProcess; 736 G4ParticleHPCapture * theLENeutronCaptureMod << 726 G4LCapture* theCaptureModel = new G4LCapture; 737 theLENeutronCaptureModel->SetMinEnergy(theHP << 727 theCaptureModel->SetMinEnergy(19*MeV); 738 theLENeutronCaptureModel->SetMaxEnergy(theHP << 728 theCaptureProcess->RegisterMe(theCaptureModel); >> 729 G4NeutronHPCapture * theLENeutronCaptureModel = new G4NeutronHPCapture; 739 theCaptureProcess->RegisterMe(theLENeutronCa 730 theCaptureProcess->RegisterMe(theLENeutronCaptureModel); 740 theCaptureProcess->AddDataSet( new G4Particl << 731 G4NeutronHPCaptureData * theNeutronData3 = new G4NeutronHPCaptureData; >> 732 theCaptureProcess->AddDataSet(theNeutronData3); 741 pmanager->AddDiscreteProcess(theCaptureProce 733 pmanager->AddDiscreteProcess(theCaptureProcess); >> 734 // G4ProcessManager* pmanager = G4Neutron::Neutron->GetProcessManager(); >> 735 // pmanager->AddProcess(new G4UserSpecialCuts(),-1,-1,1); 742 } 736 } 743 else if (particleName == "anti_neutron") 737 else if (particleName == "anti_neutron") 744 { 738 { 745 // Elastic scattering << 739 pmanager->AddDiscreteProcess(theElasticProcess); 746 G4HadronElasticProcess* theElasticPr << 740 G4AntiNeutronInelasticProcess* theInelasticProcess = 747 theElasticProcess->AddDataSet( theGGHNEl ) << 741 new G4AntiNeutronInelasticProcess("inelastic"); 748 theElasticProcess->RegisterMe( elast << 742 G4LEAntiNeutronInelastic* theLEInelasticModel = 749 pmanager->AddDiscreteProcess( theElasticPr << 743 new G4LEAntiNeutronInelastic; 750 // Inelastic scattering (include ann << 744 theInelasticProcess->RegisterMe(theLEInelasticModel); 751 G4HadronInelasticProcess* theInelasticProc << 745 G4HEAntiNeutronInelastic* theHEInelasticModel = 752 new G4HadronInelasticProcess( "inelastic << 746 new G4HEAntiNeutronInelastic; 753 theInelasticProcess->AddDataSet( theAntiNu << 747 theInelasticProcess->RegisterMe(theHEInelasticModel); 754 theInelasticProcess->RegisterMe( theFTFMod << 748 pmanager->AddDiscreteProcess(theInelasticProcess); 755 pmanager->AddDiscreteProcess( theInelastic << 756 } 749 } >> 750 757 else if (particleName == "deuteron") 751 else if (particleName == "deuteron") 758 { 752 { 759 // Elastic scattering << 753 pmanager->AddDiscreteProcess(theElasticProcess); 760 G4HadronElasticProcess* theElasticPr << 754 G4DeuteronInelasticProcess* theInelasticProcess = 761 theElasticProcess->AddDataSet( theGGNNEl ) << 755 new G4DeuteronInelasticProcess("inelastic"); 762 theElasticProcess->RegisterMe( elast << 756 G4LEDeuteronInelastic* theLEInelasticModel = 763 pmanager->AddDiscreteProcess( theElasticPr << 757 new G4LEDeuteronInelastic; 764 // Inelastic scattering << 758 theInelasticProcess->RegisterMe(theLEInelasticModel); 765 G4HadronInelasticProcess* theInelasticProc << 759 pmanager->AddDiscreteProcess(theInelasticProcess); 766 new G4HadronInelasticProcess( "inelastic << 767 theInelasticProcess->AddDataSet( theGGNucl << 768 theInelasticProcess->RegisterMe( theFTFMod << 769 theInelasticProcess->RegisterMe( the << 770 pmanager->AddDiscreteProcess( theInelastic << 771 } 760 } >> 761 772 else if (particleName == "triton") 762 else if (particleName == "triton") 773 { 763 { 774 // Elastic scattering << 764 pmanager->AddDiscreteProcess(theElasticProcess); 775 G4HadronElasticProcess* theElasticPr << 765 G4TritonInelasticProcess* theInelasticProcess = 776 theElasticProcess->AddDataSet( theGGNNEl ) << 766 new G4TritonInelasticProcess("inelastic"); 777 theElasticProcess->RegisterMe( elast << 767 G4LETritonInelastic* theLEInelasticModel = 778 pmanager->AddDiscreteProcess( theElasticPr << 768 new G4LETritonInelastic; 779 // Inelastic scattering << 769 theInelasticProcess->RegisterMe(theLEInelasticModel); 780 G4HadronInelasticProcess* theInelasticProc << 770 pmanager->AddDiscreteProcess(theInelasticProcess); 781 new G4HadronInelasticProcess( "inelastic << 782 theInelasticProcess->AddDataSet( theGGNucl << 783 theInelasticProcess->RegisterMe( theFTFMod << 784 theInelasticProcess->RegisterMe( the << 785 pmanager->AddDiscreteProcess( theInelastic << 786 } 771 } >> 772 787 else if (particleName == "alpha") 773 else if (particleName == "alpha") 788 { 774 { 789 // Elastic scattering << 775 pmanager->AddDiscreteProcess(theElasticProcess); 790 G4HadronElasticProcess* theElasticPr << 776 G4AlphaInelasticProcess* theInelasticProcess = 791 theElasticProcess->AddDataSet( theGGNNEl ) << 777 new G4AlphaInelasticProcess("inelastic"); 792 theElasticProcess->RegisterMe( elast << 778 G4LEAlphaInelastic* theLEInelasticModel = 793 pmanager->AddDiscreteProcess( theElasticPr << 779 new G4LEAlphaInelastic; 794 // Inelastic scattering << 780 theInelasticProcess->RegisterMe(theLEInelasticModel); 795 G4HadronInelasticProcess* theInelasticProc << 781 pmanager->AddDiscreteProcess(theInelasticProcess); 796 new G4HadronInelasticProcess( "inelastic << 797 theInelasticProcess->AddDataSet( the << 798 theInelasticProcess->RegisterMe( theFTFMod << 799 theInelasticProcess->RegisterMe( the << 800 pmanager->AddDiscreteProcess( theInelastic << 801 } 782 } >> 783 802 } 784 } 803 } 785 } 804 786 >> 787 805 // Decays //////////////////////////////////// 788 // Decays /////////////////////////////////////////////////////////////////// >> 789 #include "G4Decay.hh" >> 790 #include "G4RadioactiveDecay.hh" >> 791 #include "G4IonTable.hh" >> 792 #include "G4Ions.hh" >> 793 806 void DMXPhysicsList::ConstructGeneral() { 794 void DMXPhysicsList::ConstructGeneral() { 807 795 808 // Add Decay Process 796 // Add Decay Process 809 G4Decay* theDecayProcess = new G4Decay(); 797 G4Decay* theDecayProcess = new G4Decay(); 810 auto particleIterator=GetParticleIterator(); << 798 theParticleIterator->reset(); 811 particleIterator->reset(); << 799 while( (*theParticleIterator)() ) 812 while( (*particleIterator)() ) << 813 { 800 { 814 G4ParticleDefinition* particle = particl << 801 G4ParticleDefinition* particle = theParticleIterator->value(); 815 G4ProcessManager* pmanager = particle->G 802 G4ProcessManager* pmanager = particle->GetProcessManager(); 816 803 817 if (theDecayProcess->IsApplicable(*parti 804 if (theDecayProcess->IsApplicable(*particle) && !particle->IsShortLived()) 818 { 805 { 819 pmanager ->AddProcess(theDecayProcess); 806 pmanager ->AddProcess(theDecayProcess); 820 // set ordering for PostStepDoIt and AtRes 807 // set ordering for PostStepDoIt and AtRestDoIt 821 pmanager ->SetProcessOrdering(theDecayProc 808 pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep); 822 pmanager ->SetProcessOrdering(theDecayProc 809 pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest); 823 } 810 } 824 } 811 } 825 812 826 // Declare radioactive decay to the GenericI 813 // Declare radioactive decay to the GenericIon in the IonTable. 827 G4LossTableManager* man = G4LossTableManager << 814 const G4IonTable *theIonTable = 828 G4VAtomDeexcitation* ad = man->AtomDeexcitat << 815 G4ParticleTable::GetParticleTable()->GetIonTable(); 829 if(!ad) { << 816 G4RadioactiveDecay *theRadioactiveDecay = new G4RadioactiveDecay(); 830 G4EmParameters::Instance()->SetAugerCascad << 831 ad = new G4UAtomicDeexcitation(); << 832 man->SetAtomDeexcitation(ad); << 833 ad->InitialiseAtomicDeexcitation(); << 834 } << 835 817 836 G4PhysicsListHelper::GetPhysicsListHelper()- << 818 for (G4int i=0; i<theIonTable->Entries(); i++) 837 RegisterProcess(new G4RadioactiveDecay(), << 819 { >> 820 G4String particleName = theIonTable->GetParticle(i)->GetParticleName(); >> 821 G4String particleType = theIonTable->GetParticle(i)->GetParticleType(); >> 822 >> 823 if (particleName == "GenericIon") >> 824 { >> 825 G4ProcessManager* pmanager = >> 826 theIonTable->GetParticle(i)->GetProcessManager(); >> 827 pmanager->SetVerboseLevel(VerboseLevel); >> 828 pmanager ->AddProcess(theRadioactiveDecay); >> 829 pmanager ->SetProcessOrdering(theRadioactiveDecay, idxPostStep); >> 830 pmanager ->SetProcessOrdering(theRadioactiveDecay, idxAtRest); >> 831 } >> 832 } 838 } 833 } 839 834 840 // Cuts ////////////////////////////////////// 835 // Cuts ///////////////////////////////////////////////////////////////////// 841 void DMXPhysicsList::SetCuts() 836 void DMXPhysicsList::SetCuts() 842 { 837 { 843 838 844 if (verboseLevel >1) 839 if (verboseLevel >1) 845 G4cout << "DMXPhysicsList::SetCuts:"; 840 G4cout << "DMXPhysicsList::SetCuts:"; 846 841 847 if (verboseLevel>0){ 842 if (verboseLevel>0){ 848 G4cout << "DMXPhysicsList::SetCuts:"; 843 G4cout << "DMXPhysicsList::SetCuts:"; 849 G4cout << "CutLength : " 844 G4cout << "CutLength : " 850 << G4BestUnit(defaultCutValue,"Length") < 845 << G4BestUnit(defaultCutValue,"Length") << G4endl; 851 } 846 } 852 847 853 //special for low energy physics 848 //special for low energy physics 854 G4double lowlimit=250*eV; 849 G4double lowlimit=250*eV; 855 G4ProductionCutsTable::GetProductionCutsTabl 850 G4ProductionCutsTable::GetProductionCutsTable()->SetEnergyRange(lowlimit,100.*GeV); 856 851 857 // set cut values for gamma at first and for 852 // set cut values for gamma at first and for e- second and next for e+, 858 // because some processes for e+/e- need cut 853 // because some processes for e+/e- need cut values for gamma 859 SetCutValue(cutForGamma, "gamma"); 854 SetCutValue(cutForGamma, "gamma"); 860 SetCutValue(cutForElectron, "e-"); 855 SetCutValue(cutForElectron, "e-"); 861 SetCutValue(cutForPositron, "e+"); 856 SetCutValue(cutForPositron, "e+"); 862 857 863 if (verboseLevel>0) DumpCutValuesTable(); 858 if (verboseLevel>0) DumpCutValuesTable(); 864 } 859 } 865 860 866 861