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