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 // 28 // 29 // For information related to this code c 29 // For information related to this code contact: Alex Howard 30 // e-mail: alexander.howard@cern.ch 30 // e-mail: alexander.howard@cern.ch 31 // ------------------------------------------- 31 // -------------------------------------------------------------- 32 // Comments 32 // Comments 33 // 33 // 34 // Underground Advanced 34 // Underground Advanced 35 // 35 // 36 // This physics list is taken from the undergr 36 // This physics list is taken from the underground_physics example with small 37 // modifications. It is an example of a "flat 37 // modifications. It is an example of a "flat" physics list with no dependence 38 // on builders. The physics covered would be 38 // on builders. The physics covered would be suitable for a low background 39 // experiment including the neutron_hp package 39 // experiment including the neutron_hp package 40 // 40 // 41 // 41 // 42 // 42 // 43 // PhysicsList program 43 // PhysicsList program 44 // 44 // 45 // Modified: 45 // Modified: 46 // 46 // 47 // 14-02-03 Fix bugs in msc and hIon instancia 47 // 14-02-03 Fix bugs in msc and hIon instanciation + cut per region 48 // 16-08-10 Remove inclusion of obsolete class 48 // 16-08-10 Remove inclusion of obsolete class of G4ParticleWithCuts 49 // 20-10-10 Migrate LowEnergy process to Liver 49 // 20-10-10 Migrate LowEnergy process to Livermore models, LP 50 // 28-03-13 Replace LEP/HEP with FTFP+BERT (A. 50 // 28-03-13 Replace LEP/HEP with FTFP+BERT (A.R.) 51 // 15-01-20 Updated cross sections (A.R.) 51 // 15-01-20 Updated cross sections (A.R.) 52 // ------------------------------------------- 52 // -------------------------------------------------------------- 53 53 54 #include <iomanip> 54 #include <iomanip> 55 55 56 #include "globals.hh" 56 #include "globals.hh" 57 #include <CLHEP/Units/SystemOfUnits.h> 57 #include <CLHEP/Units/SystemOfUnits.h> 58 #include "G4ios.hh" 58 #include "G4ios.hh" 59 #include "G4ProcessManager.hh" 59 #include "G4ProcessManager.hh" 60 #include "G4ProcessVector.hh" 60 #include "G4ProcessVector.hh" 61 61 62 #include "G4ParticleTypes.hh" 62 #include "G4ParticleTypes.hh" 63 #include "G4ParticleTable.hh" 63 #include "G4ParticleTable.hh" 64 #include "G4ProductionCutsTable.hh" 64 #include "G4ProductionCutsTable.hh" 65 65 66 #include "G4UserLimits.hh" 66 #include "G4UserLimits.hh" 67 #include "G4WarnPLStatus.hh" 67 #include "G4WarnPLStatus.hh" 68 68 69 // Builder for all stopping processes 69 // Builder for all stopping processes 70 #include "G4StoppingPhysics.hh" 70 #include "G4StoppingPhysics.hh" 71 71 72 #include "G4HadronicParameters.hh" 72 #include "G4HadronicParameters.hh" 73 #include "G4ShortLivedConstructor.hh" << 73 74 #include "LBE.hh" 74 #include "LBE.hh" 75 75 76 // Constructor /////////////////////////////// 76 // Constructor ///////////////////////////////////////////////////////////// 77 LBE::LBE(G4int ver) 77 LBE::LBE(G4int ver) 78 { 78 { 79 if(ver > 0) { << 79 80 G4cout << "You are using the simulation en << 80 G4cout << "You are using the simulation engine: LBE"<<G4endl; 81 G4cout <<G4endl; << 81 G4cout <<G4endl<<G4endl; 82 } << 83 defaultCutValue = 1.0*CLHEP::micrometer; 82 defaultCutValue = 1.0*CLHEP::micrometer; // 84 cutForGamma = defaultCutValue; 83 cutForGamma = defaultCutValue; >> 84 // cutForElectron = 1.0*CLHEP::nanometer; 85 cutForElectron = 1.0*CLHEP::micrometer; 85 cutForElectron = 1.0*CLHEP::micrometer; 86 cutForPositron = defaultCutValue; 86 cutForPositron = defaultCutValue; 87 //not used: 87 //not used: 88 // cutForProton = defaultCutValue; 88 // cutForProton = defaultCutValue; 89 // cutForAlpha = 1.0*CLHEP::nanomete 89 // cutForAlpha = 1.0*CLHEP::nanometer; 90 // cutForGenericIon = 1.0*CLHEP::nanomete 90 // cutForGenericIon = 1.0*CLHEP::nanometer; 91 91 92 stoppingPhysics = new G4StoppingPhysics; 92 stoppingPhysics = new G4StoppingPhysics; 93 93 94 VerboseLevel = ver; 94 VerboseLevel = ver; 95 OpVerbLevel = 0; 95 OpVerbLevel = 0; 96 96 97 SetVerboseLevel(VerboseLevel); 97 SetVerboseLevel(VerboseLevel); 98 } 98 } 99 99 100 100 101 // Destructor //////////////////////////////// 101 // Destructor ////////////////////////////////////////////////////////////// 102 LBE::~LBE() 102 LBE::~LBE() 103 { 103 { 104 delete stoppingPhysics; 104 delete stoppingPhysics; 105 } 105 } 106 106 107 107 108 // Construct Particles /////////////////////// 108 // Construct Particles ///////////////////////////////////////////////////// 109 void LBE::ConstructParticle() 109 void LBE::ConstructParticle() 110 { 110 { 111 111 112 // In this method, static member functions s 112 // In this method, static member functions should be called 113 // for all particles which you want to use. 113 // for all particles which you want to use. 114 // This ensures that objects of these partic 114 // This ensures that objects of these particle types will be 115 // created in the program. 115 // created in the program. 116 116 117 ConstructMyBosons(); 117 ConstructMyBosons(); 118 ConstructMyLeptons(); 118 ConstructMyLeptons(); 119 ConstructMyMesons(); 119 ConstructMyMesons(); 120 ConstructMyBaryons(); 120 ConstructMyBaryons(); 121 ConstructMyIons(); 121 ConstructMyIons(); 122 ConstructMyShortLiveds(); 122 ConstructMyShortLiveds(); 123 stoppingPhysics->ConstructParticle(); // Any 123 stoppingPhysics->ConstructParticle(); // Anything not included above 124 } 124 } 125 125 126 126 127 // construct Bosons:////////////////////////// 127 // construct Bosons:///////////////////////////////////////////////////// 128 void LBE::ConstructMyBosons() 128 void LBE::ConstructMyBosons() 129 { 129 { 130 // pseudo-particles 130 // pseudo-particles 131 G4Geantino::GeantinoDefinition(); 131 G4Geantino::GeantinoDefinition(); 132 G4ChargedGeantino::ChargedGeantinoDefinition 132 G4ChargedGeantino::ChargedGeantinoDefinition(); 133 133 134 // gamma 134 // gamma 135 G4Gamma::GammaDefinition(); 135 G4Gamma::GammaDefinition(); 136 136 137 //OpticalPhotons 137 //OpticalPhotons 138 G4OpticalPhoton::OpticalPhotonDefinition(); 138 G4OpticalPhoton::OpticalPhotonDefinition(); 139 } 139 } 140 140 141 141 142 // construct Leptons:///////////////////////// 142 // construct Leptons:///////////////////////////////////////////////////// 143 void LBE::ConstructMyLeptons() 143 void LBE::ConstructMyLeptons() 144 { 144 { 145 // leptons 145 // leptons 146 G4Electron::ElectronDefinition(); 146 G4Electron::ElectronDefinition(); 147 G4Positron::PositronDefinition(); 147 G4Positron::PositronDefinition(); 148 G4MuonPlus::MuonPlusDefinition(); 148 G4MuonPlus::MuonPlusDefinition(); 149 G4MuonMinus::MuonMinusDefinition(); 149 G4MuonMinus::MuonMinusDefinition(); 150 150 151 G4NeutrinoE::NeutrinoEDefinition(); 151 G4NeutrinoE::NeutrinoEDefinition(); 152 G4AntiNeutrinoE::AntiNeutrinoEDefinition(); 152 G4AntiNeutrinoE::AntiNeutrinoEDefinition(); 153 G4NeutrinoMu::NeutrinoMuDefinition(); 153 G4NeutrinoMu::NeutrinoMuDefinition(); 154 G4AntiNeutrinoMu::AntiNeutrinoMuDefinition() 154 G4AntiNeutrinoMu::AntiNeutrinoMuDefinition(); 155 } 155 } 156 156 157 #include "G4MesonConstructor.hh" 157 #include "G4MesonConstructor.hh" 158 #include "G4BaryonConstructor.hh" 158 #include "G4BaryonConstructor.hh" 159 #include "G4IonConstructor.hh" 159 #include "G4IonConstructor.hh" 160 160 161 161 162 // construct Mesons:////////////////////////// 162 // construct Mesons:///////////////////////////////////////////////////// 163 void LBE::ConstructMyMesons() 163 void LBE::ConstructMyMesons() 164 { 164 { 165 // mesons 165 // mesons 166 G4MesonConstructor mConstructor; 166 G4MesonConstructor mConstructor; 167 mConstructor.ConstructParticle(); 167 mConstructor.ConstructParticle(); 168 168 169 } 169 } 170 170 171 171 172 // construct Baryons:///////////////////////// 172 // construct Baryons:///////////////////////////////////////////////////// 173 void LBE::ConstructMyBaryons() 173 void LBE::ConstructMyBaryons() 174 { 174 { 175 // baryons 175 // baryons 176 G4BaryonConstructor bConstructor; 176 G4BaryonConstructor bConstructor; 177 bConstructor.ConstructParticle(); 177 bConstructor.ConstructParticle(); 178 178 179 } 179 } 180 180 181 181 182 // construct Ions://////////////////////////// 182 // construct Ions:///////////////////////////////////////////////////// 183 void LBE::ConstructMyIons() 183 void LBE::ConstructMyIons() 184 { 184 { 185 // ions 185 // ions 186 G4IonConstructor iConstructor; 186 G4IonConstructor iConstructor; 187 iConstructor.ConstructParticle(); 187 iConstructor.ConstructParticle(); 188 188 189 } 189 } 190 190 191 // construct Shortliveds:///////////////////// 191 // construct Shortliveds:///////////////////////////////////////////////////// 192 void LBE::ConstructMyShortLiveds() 192 void LBE::ConstructMyShortLiveds() 193 { 193 { 194 // ShortLiveds 194 // ShortLiveds 195 G4ShortLivedConstructor pShortLivedConstruct << 195 ; 196 pShortLivedConstructor.ConstructParticle(); << 197 } 196 } 198 197 199 198 200 199 201 200 202 // Construct Processes /////////////////////// 201 // Construct Processes ////////////////////////////////////////////////////// 203 void LBE::ConstructProcess() 202 void LBE::ConstructProcess() 204 { 203 { 205 AddTransportation(); 204 AddTransportation(); 206 ConstructEM(); 205 ConstructEM(); 207 ConstructOp(); 206 ConstructOp(); 208 ConstructHad(); 207 ConstructHad(); 209 ConstructGeneral(); 208 ConstructGeneral(); 210 } 209 } 211 210 212 211 213 // Transportation //////////////////////////// 212 // Transportation /////////////////////////////////////////////////////////// 214 #include "G4MaxTimeCuts.hh" 213 #include "G4MaxTimeCuts.hh" 215 #include "G4MinEkineCuts.hh" 214 #include "G4MinEkineCuts.hh" 216 215 217 void LBE::AddTransportation() { 216 void LBE::AddTransportation() { 218 217 219 G4VUserPhysicsList::AddTransportation(); 218 G4VUserPhysicsList::AddTransportation(); 220 219 221 auto myParticleIterator=G4ParticleTable::Get 220 auto myParticleIterator=G4ParticleTable::GetParticleTable()->GetIterator(); 222 myParticleIterator->reset(); 221 myParticleIterator->reset(); 223 while( (*(myParticleIterator))() ){ 222 while( (*(myParticleIterator))() ){ 224 G4ParticleDefinition* particle = myParticl 223 G4ParticleDefinition* particle = myParticleIterator->value(); 225 G4ProcessManager* pmanager = particle->Get 224 G4ProcessManager* pmanager = particle->GetProcessManager(); 226 G4String particleName = particle->GetParti 225 G4String particleName = particle->GetParticleName(); 227 // time cuts for ONLY neutrons: 226 // time cuts for ONLY neutrons: 228 if(particleName == "neutron") 227 if(particleName == "neutron") 229 pmanager->AddDiscreteProcess(new G4MaxTime 228 pmanager->AddDiscreteProcess(new G4MaxTimeCuts()); 230 // Energy cuts to kill charged (embedded i 229 // Energy cuts to kill charged (embedded in method) particles: 231 pmanager->AddDiscreteProcess(new G4MinEkin 230 pmanager->AddDiscreteProcess(new G4MinEkineCuts()); 232 } 231 } 233 } 232 } 234 233 235 234 236 // Electromagnetic Processes ///////////////// 235 // Electromagnetic Processes //////////////////////////////////////////////// 237 // all charged particles 236 // all charged particles 238 237 239 #include "G4eMultipleScattering.hh" 238 #include "G4eMultipleScattering.hh" 240 #include "G4MuMultipleScattering.hh" 239 #include "G4MuMultipleScattering.hh" 241 #include "G4hMultipleScattering.hh" 240 #include "G4hMultipleScattering.hh" 242 241 243 // gamma. Use Livermore models 242 // gamma. Use Livermore models 244 #include "G4PhotoElectricEffect.hh" 243 #include "G4PhotoElectricEffect.hh" 245 #include "G4LivermorePhotoElectricModel.hh" 244 #include "G4LivermorePhotoElectricModel.hh" 246 #include "G4ComptonScattering.hh" 245 #include "G4ComptonScattering.hh" 247 #include "G4LivermoreComptonModel.hh" 246 #include "G4LivermoreComptonModel.hh" 248 #include "G4GammaConversion.hh" 247 #include "G4GammaConversion.hh" 249 #include "G4LivermoreGammaConversionModel.hh" 248 #include "G4LivermoreGammaConversionModel.hh" 250 #include "G4RayleighScattering.hh" 249 #include "G4RayleighScattering.hh" 251 #include "G4LivermoreRayleighModel.hh" 250 #include "G4LivermoreRayleighModel.hh" 252 251 253 252 254 // e- 253 // e- 255 #include "G4eMultipleScattering.hh" 254 #include "G4eMultipleScattering.hh" 256 #include "G4UniversalFluctuation.hh" 255 #include "G4UniversalFluctuation.hh" 257 #include "G4UrbanMscModel.hh" 256 #include "G4UrbanMscModel.hh" 258 257 259 #include "G4eIonisation.hh" 258 #include "G4eIonisation.hh" 260 #include "G4LivermoreIonisationModel.hh" 259 #include "G4LivermoreIonisationModel.hh" 261 260 262 #include "G4eBremsstrahlung.hh" 261 #include "G4eBremsstrahlung.hh" 263 #include "G4LivermoreBremsstrahlungModel.hh" 262 #include "G4LivermoreBremsstrahlungModel.hh" 264 263 265 // e+ 264 // e+ 266 #include "G4eplusAnnihilation.hh" 265 #include "G4eplusAnnihilation.hh" 267 266 268 267 269 // alpha and GenericIon and deuterons, triton, 268 // alpha and GenericIon and deuterons, triton, He3: 270 #include "G4ionIonisation.hh" 269 #include "G4ionIonisation.hh" 271 #include "G4hIonisation.hh" 270 #include "G4hIonisation.hh" 272 #include "G4hBremsstrahlung.hh" 271 #include "G4hBremsstrahlung.hh" 273 // 272 // 274 #include "G4IonParametrisedLossModel.hh" 273 #include "G4IonParametrisedLossModel.hh" 275 #include "G4NuclearStopping.hh" 274 #include "G4NuclearStopping.hh" 276 #include "G4EnergyLossTables.hh" 275 #include "G4EnergyLossTables.hh" 277 276 278 //muon: 277 //muon: 279 #include "G4MuIonisation.hh" 278 #include "G4MuIonisation.hh" 280 #include "G4MuBremsstrahlung.hh" 279 #include "G4MuBremsstrahlung.hh" 281 #include "G4MuPairProduction.hh" 280 #include "G4MuPairProduction.hh" 282 #include "G4MuonMinusCapture.hh" 281 #include "G4MuonMinusCapture.hh" 283 282 284 //OTHERS: 283 //OTHERS: 285 //#include "G4hIonisation.hh" // standard hadr 284 //#include "G4hIonisation.hh" // standard hadron ionisation 286 285 287 void LBE::ConstructEM() { 286 void LBE::ConstructEM() { 288 287 289 // models & processes: 288 // models & processes: 290 // Use Livermore models up to 20 MeV, and sta 289 // Use Livermore models up to 20 MeV, and standard 291 // models for higher energy 290 // models for higher energy 292 G4double LivermoreHighEnergyLimit = 20*CLHEP: 291 G4double LivermoreHighEnergyLimit = 20*CLHEP::MeV; 293 // 292 // 294 auto myParticleIterator=G4ParticleTable::Get 293 auto myParticleIterator=G4ParticleTable::GetParticleTable()->GetIterator(); 295 myParticleIterator->reset(); 294 myParticleIterator->reset(); 296 while( (*(myParticleIterator))() ){ 295 while( (*(myParticleIterator))() ){ 297 G4ParticleDefinition* particle = myParticl 296 G4ParticleDefinition* particle = myParticleIterator->value(); 298 G4ProcessManager* pmanager = particle->Get 297 G4ProcessManager* pmanager = particle->GetProcessManager(); 299 G4String particleName = particle->GetParti 298 G4String particleName = particle->GetParticleName(); 300 G4String particleType = particle->GetParti 299 G4String particleType = particle->GetParticleType(); 301 G4double charge = particle->GetPDGCharge() 300 G4double charge = particle->GetPDGCharge(); 302 301 303 if (particleName == "gamma") 302 if (particleName == "gamma") 304 { 303 { 305 G4PhotoElectricEffect* thePhotoElectricE 304 G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect(); 306 G4LivermorePhotoElectricModel* theLiverm 305 G4LivermorePhotoElectricModel* theLivermorePhotoElectricModel = 307 new G4LivermorePhotoElectricModel(); 306 new G4LivermorePhotoElectricModel(); 308 theLivermorePhotoElectricModel->SetHighE 307 theLivermorePhotoElectricModel->SetHighEnergyLimit(LivermoreHighEnergyLimit); 309 thePhotoElectricEffect->AddEmModel(0, th 308 thePhotoElectricEffect->AddEmModel(0, theLivermorePhotoElectricModel); 310 pmanager->AddDiscreteProcess(thePhotoEle 309 pmanager->AddDiscreteProcess(thePhotoElectricEffect); 311 310 312 G4ComptonScattering* theComptonScatterin 311 G4ComptonScattering* theComptonScattering = new G4ComptonScattering(); 313 G4LivermoreComptonModel* theLivermoreCom 312 G4LivermoreComptonModel* theLivermoreComptonModel = 314 new G4LivermoreComptonModel(); 313 new G4LivermoreComptonModel(); 315 theLivermoreComptonModel->SetHighEnergyL 314 theLivermoreComptonModel->SetHighEnergyLimit(LivermoreHighEnergyLimit); 316 theComptonScattering->AddEmModel(0, theL 315 theComptonScattering->AddEmModel(0, theLivermoreComptonModel); 317 pmanager->AddDiscreteProcess(theComptonS 316 pmanager->AddDiscreteProcess(theComptonScattering); 318 317 319 G4GammaConversion* theGammaConversion = 318 G4GammaConversion* theGammaConversion = new G4GammaConversion(); 320 G4LivermoreGammaConversionModel* theLive 319 G4LivermoreGammaConversionModel* theLivermoreGammaConversionModel = 321 new G4LivermoreGammaConversionModel(); 320 new G4LivermoreGammaConversionModel(); 322 theLivermoreGammaConversionModel->SetHig 321 theLivermoreGammaConversionModel->SetHighEnergyLimit(LivermoreHighEnergyLimit); 323 theGammaConversion->AddEmModel(0, theLiv 322 theGammaConversion->AddEmModel(0, theLivermoreGammaConversionModel); 324 pmanager->AddDiscreteProcess(theGammaCon 323 pmanager->AddDiscreteProcess(theGammaConversion); 325 324 326 G4RayleighScattering* theRayleigh = new 325 G4RayleighScattering* theRayleigh = new G4RayleighScattering(); 327 G4LivermoreRayleighModel* theRayleighMod 326 G4LivermoreRayleighModel* theRayleighModel = new G4LivermoreRayleighModel(); 328 theRayleighModel->SetHighEnergyLimit(Liv 327 theRayleighModel->SetHighEnergyLimit(LivermoreHighEnergyLimit); 329 theRayleigh->AddEmModel(0, theRayleighMo 328 theRayleigh->AddEmModel(0, theRayleighModel); 330 pmanager->AddDiscreteProcess(theRayleigh 329 pmanager->AddDiscreteProcess(theRayleigh); 331 330 332 } 331 } 333 else if (particleName == "e-") 332 else if (particleName == "e-") 334 { 333 { 335 //electron 334 //electron 336 // process ordering: AddProcess(name, a 335 // process ordering: AddProcess(name, at rest, along step, post step) 337 // -1 = not implemented, then ordering 336 // -1 = not implemented, then ordering 338 G4eMultipleScattering* msc = new G4eMu 337 G4eMultipleScattering* msc = new G4eMultipleScattering(); 339 //msc->AddEmModel(0, new G4UrbanMscMod 338 //msc->AddEmModel(0, new G4UrbanMscModel()); 340 msc->SetStepLimitType(fUseDistanceToBo 339 msc->SetStepLimitType(fUseDistanceToBoundary); 341 pmanager->AddProcess(msc, 340 pmanager->AddProcess(msc, -1, 1, 1); 342 341 343 // Ionisation 342 // Ionisation 344 G4eIonisation* eIoni = new G4eIonisatio 343 G4eIonisation* eIoni = new G4eIonisation(); 345 G4LivermoreIonisationModel* theIoniLive 344 G4LivermoreIonisationModel* theIoniLivermore = new 346 G4LivermoreIonisationModel(); 345 G4LivermoreIonisationModel(); 347 theIoniLivermore->SetHighEnergyLimit(1* 346 theIoniLivermore->SetHighEnergyLimit(1*CLHEP::MeV); 348 eIoni->AddEmModel(0, theIoniLivermore, 347 eIoni->AddEmModel(0, theIoniLivermore, new G4UniversalFluctuation() ); 349 eIoni->SetStepFunction(0.2, 100*CLHEP:: 348 eIoni->SetStepFunction(0.2, 100*CLHEP::um); // 350 pmanager->AddProcess(eIoni, 349 pmanager->AddProcess(eIoni, -1, 2, 2); 351 350 352 // Bremsstrahlung 351 // Bremsstrahlung 353 G4eBremsstrahlung* eBrem = new G4eBrems 352 G4eBremsstrahlung* eBrem = new G4eBremsstrahlung(); 354 G4LivermoreBremsstrahlungModel* theBrem 353 G4LivermoreBremsstrahlungModel* theBremLivermore = new 355 G4LivermoreBremsstrahlungModel(); 354 G4LivermoreBremsstrahlungModel(); 356 theBremLivermore->SetHighEnergyLimit(Li 355 theBremLivermore->SetHighEnergyLimit(LivermoreHighEnergyLimit); 357 eBrem->AddEmModel(0, theBremLivermore); 356 eBrem->AddEmModel(0, theBremLivermore); 358 pmanager->AddProcess(eBrem, -1,-3, 3); 357 pmanager->AddProcess(eBrem, -1,-3, 3); 359 } 358 } 360 else if (particleName == "e+") 359 else if (particleName == "e+") 361 { 360 { 362 //positron 361 //positron 363 G4eMultipleScattering* msc = new G4eMult 362 G4eMultipleScattering* msc = new G4eMultipleScattering(); 364 //msc->AddEmModel(0, new G4UrbanMscModel 363 //msc->AddEmModel(0, new G4UrbanMscModel()); 365 msc->SetStepLimitType(fUseDistanceToBoun 364 msc->SetStepLimitType(fUseDistanceToBoundary); 366 pmanager->AddProcess(msc, 365 pmanager->AddProcess(msc, -1, 1, 1); 367 G4eIonisation* eIoni = new G4eIonisation 366 G4eIonisation* eIoni = new G4eIonisation(); 368 eIoni->SetStepFunction(0.2, 100*CLHEP::u 367 eIoni->SetStepFunction(0.2, 100*CLHEP::um); 369 pmanager->AddProcess(eIoni, 368 pmanager->AddProcess(eIoni, -1, 2, 2); 370 pmanager->AddProcess(new G4eBremsstrahlu 369 pmanager->AddProcess(new G4eBremsstrahlung, -1,-3, 3); 371 pmanager->AddProcess(new G4eplusAnnihila 370 pmanager->AddProcess(new G4eplusAnnihilation,0,-1, 4); 372 } 371 } 373 else if( particleName == "mu+" || 372 else if( particleName == "mu+" || 374 particleName == "mu-" ) 373 particleName == "mu-" ) 375 { 374 { 376 //muon 375 //muon 377 G4MuMultipleScattering* aMultipleScatt 376 G4MuMultipleScattering* aMultipleScattering = new G4MuMultipleScattering(); 378 pmanager->AddProcess(aMultipleScattering, 377 pmanager->AddProcess(aMultipleScattering, -1, 1, 1); 379 pmanager->AddProcess(new G4MuIonisation(), 378 pmanager->AddProcess(new G4MuIonisation(), -1, 2, 2); 380 pmanager->AddProcess(new G4MuBremsstrahlung( 379 pmanager->AddProcess(new G4MuBremsstrahlung(), -1,-1, 3); 381 pmanager->AddProcess(new G4MuPairProduction( 380 pmanager->AddProcess(new G4MuPairProduction(), -1,-1, 4); 382 if( particleName == "mu-" ) 381 if( particleName == "mu-" ) 383 pmanager->AddProcess(new G4MuonMinusCaptur 382 pmanager->AddProcess(new G4MuonMinusCapture(), 0,-1,-1); 384 } 383 } 385 else if (particleName == "GenericIon") 384 else if (particleName == "GenericIon") 386 { 385 { 387 pmanager->AddProcess(new G4hMultipleScat 386 pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); 388 G4ionIonisation* ionIoni = new G4ionIoni 387 G4ionIonisation* ionIoni = new G4ionIonisation(); 389 ionIoni->SetEmModel(new G4IonParametrise 388 ionIoni->SetEmModel(new G4IonParametrisedLossModel()); 390 ionIoni->SetStepFunction(0.1, 10*CLHEP:: 389 ionIoni->SetStepFunction(0.1, 10*CLHEP::um); 391 pmanager->AddProcess(ionIoni, 390 pmanager->AddProcess(ionIoni, -1, 2, 2); 392 pmanager->AddProcess(new G4NuclearStoppi 391 pmanager->AddProcess(new G4NuclearStopping(), -1, 3,-1); 393 } 392 } 394 else if (particleName == "alpha" || partic 393 else if (particleName == "alpha" || particleName == "He3") 395 { 394 { 396 //MSC, ion-Ionisation, Nuclear Stopping 395 //MSC, ion-Ionisation, Nuclear Stopping 397 pmanager->AddProcess(new G4hMultipleScat 396 pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); 398 397 399 G4ionIonisation* ionIoni = new G4ionIoni 398 G4ionIonisation* ionIoni = new G4ionIonisation(); 400 ionIoni->SetStepFunction(0.1, 20*CLHEP:: 399 ionIoni->SetStepFunction(0.1, 20*CLHEP::um); 401 pmanager->AddProcess(ionIoni, 400 pmanager->AddProcess(ionIoni, -1, 2, 2); 402 pmanager->AddProcess(new G4NuclearStoppi 401 pmanager->AddProcess(new G4NuclearStopping(), -1, 3,-1); 403 } 402 } 404 else if (particleName == "proton" || 403 else if (particleName == "proton" || 405 particleName == "deuteron" || 404 particleName == "deuteron" || 406 particleName == "triton" || 405 particleName == "triton" || 407 particleName == "pi+" || 406 particleName == "pi+" || 408 particleName == "pi-" || 407 particleName == "pi-" || 409 particleName == "kaon+" || 408 particleName == "kaon+" || 410 particleName == "kaon-") 409 particleName == "kaon-") 411 { 410 { 412 //MSC, h-ionisation, bremsstrahlung 411 //MSC, h-ionisation, bremsstrahlung 413 pmanager->AddProcess(new G4hMultipleSca 412 pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); 414 G4hIonisation* hIoni = new G4hIonisatio 413 G4hIonisation* hIoni = new G4hIonisation(); 415 hIoni->SetStepFunction(0.2, 50*CLHEP::u 414 hIoni->SetStepFunction(0.2, 50*CLHEP::um); 416 pmanager->AddProcess(hIoni, 415 pmanager->AddProcess(hIoni, -1, 2, 2); 417 pmanager->AddProcess(new G4hBremsstrahl 416 pmanager->AddProcess(new G4hBremsstrahlung, -1,-3, 3); 418 } 417 } 419 else if ((!particle->IsShortLived()) && 418 else if ((!particle->IsShortLived()) && 420 (charge != 0.0) && 419 (charge != 0.0) && 421 (particle->GetParticleName() != "charge 420 (particle->GetParticleName() != "chargedgeantino")) 422 { 421 { 423 //all others charged particles except geanti 422 //all others charged particles except geantino 424 pmanager->AddProcess(new G4hMultipleSc 423 pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); 425 pmanager->AddProcess(new G4hIonisation 424 pmanager->AddProcess(new G4hIonisation, -1, 2, 2); 426 } 425 } 427 426 428 } 427 } 429 } 428 } 430 429 431 430 432 // Optical Processes ///////////////////////// 431 // Optical Processes //////////////////////////////////////////////////////// 433 #include "G4Scintillation.hh" 432 #include "G4Scintillation.hh" 434 #include "G4OpAbsorption.hh" 433 #include "G4OpAbsorption.hh" 435 //#include "G4OpRayleigh.hh" 434 //#include "G4OpRayleigh.hh" 436 #include "G4OpBoundaryProcess.hh" 435 #include "G4OpBoundaryProcess.hh" 437 436 438 void LBE::ConstructOp() 437 void LBE::ConstructOp() 439 { 438 { 440 // default scintillation process 439 // default scintillation process 441 //Coverity report: check that the process is 440 //Coverity report: check that the process is actually used, if not must delete 442 G4bool theScintProcessDefNeverUsed = true; 441 G4bool theScintProcessDefNeverUsed = true; 443 G4Scintillation* theScintProcessDef = new G4 442 G4Scintillation* theScintProcessDef = new G4Scintillation("Scintillation"); 444 // theScintProcessDef->DumpPhysicsTable(); 443 // theScintProcessDef->DumpPhysicsTable(); 445 theScintProcessDef->SetTrackSecondariesFirst 444 theScintProcessDef->SetTrackSecondariesFirst(true); >> 445 theScintProcessDef->SetScintillationYieldFactor(1.0); // >> 446 theScintProcessDef->SetScintillationExcitationRatio(0.0); // 446 theScintProcessDef->SetVerboseLevel(OpVerbLe 447 theScintProcessDef->SetVerboseLevel(OpVerbLevel); 447 448 448 // scintillation process for alpha: 449 // scintillation process for alpha: 449 G4bool theScintProcessAlphaNeverUsed = true; 450 G4bool theScintProcessAlphaNeverUsed = true; 450 G4Scintillation* theScintProcessAlpha = new 451 G4Scintillation* theScintProcessAlpha = new G4Scintillation("Scintillation"); 451 // theScintProcessNuc->DumpPhysicsTable(); 452 // theScintProcessNuc->DumpPhysicsTable(); 452 theScintProcessAlpha->SetTrackSecondariesFir 453 theScintProcessAlpha->SetTrackSecondariesFirst(true); >> 454 theScintProcessAlpha->SetScintillationYieldFactor(1.1); >> 455 theScintProcessAlpha->SetScintillationExcitationRatio(1.0); 453 theScintProcessAlpha->SetVerboseLevel(OpVerb 456 theScintProcessAlpha->SetVerboseLevel(OpVerbLevel); 454 457 455 // scintillation process for heavy nuclei 458 // scintillation process for heavy nuclei 456 G4bool theScintProcessNucNeverUsed = true; 459 G4bool theScintProcessNucNeverUsed = true; 457 G4Scintillation* theScintProcessNuc = new G4 460 G4Scintillation* theScintProcessNuc = new G4Scintillation("Scintillation"); 458 // theScintProcessNuc->DumpPhysicsTable(); 461 // theScintProcessNuc->DumpPhysicsTable(); 459 theScintProcessNuc->SetTrackSecondariesFirst 462 theScintProcessNuc->SetTrackSecondariesFirst(true); >> 463 theScintProcessNuc->SetScintillationYieldFactor(0.2); >> 464 theScintProcessNuc->SetScintillationExcitationRatio(1.0); 460 theScintProcessNuc->SetVerboseLevel(OpVerbLe 465 theScintProcessNuc->SetVerboseLevel(OpVerbLevel); 461 466 462 // optical processes 467 // optical processes 463 G4bool theAbsorptionProcessNeverUsed = true; 468 G4bool theAbsorptionProcessNeverUsed = true; 464 G4OpAbsorption* theAbsorptionProcess = new G 469 G4OpAbsorption* theAbsorptionProcess = new G4OpAbsorption(); 465 // G4OpRayleigh* theRayleighScatteringProce 470 // G4OpRayleigh* theRayleighScatteringProcess = new G4OpRayleigh(); 466 G4bool theBoundaryProcessNeverUsed = true; 471 G4bool theBoundaryProcessNeverUsed = true; 467 G4OpBoundaryProcess* theBoundaryProcess = ne 472 G4OpBoundaryProcess* theBoundaryProcess = new G4OpBoundaryProcess(); 468 // theAbsorptionProcess->DumpPhysicsTable() 473 // theAbsorptionProcess->DumpPhysicsTable(); 469 // theRayleighScatteringProcess->DumpPhysic 474 // theRayleighScatteringProcess->DumpPhysicsTable(); 470 theAbsorptionProcess->SetVerboseLevel(OpVerb 475 theAbsorptionProcess->SetVerboseLevel(OpVerbLevel); 471 // theRayleighScatteringProcess->SetVerboseL 476 // theRayleighScatteringProcess->SetVerboseLevel(OpVerbLevel); 472 theBoundaryProcess->SetVerboseLevel(OpVerbLe 477 theBoundaryProcess->SetVerboseLevel(OpVerbLevel); 473 478 474 auto myParticleIterator=G4ParticleTable::Get 479 auto myParticleIterator=G4ParticleTable::GetParticleTable()->GetIterator(); 475 myParticleIterator->reset(); 480 myParticleIterator->reset(); 476 while( (*(myParticleIterator))() ) 481 while( (*(myParticleIterator))() ) 477 { 482 { 478 G4ParticleDefinition* particle = myParti 483 G4ParticleDefinition* particle = myParticleIterator->value(); 479 G4ProcessManager* pmanager = particle->G 484 G4ProcessManager* pmanager = particle->GetProcessManager(); 480 G4String particleName = particle->GetPar 485 G4String particleName = particle->GetParticleName(); 481 if (theScintProcessDef->IsApplicable(*pa 486 if (theScintProcessDef->IsApplicable(*particle)) { 482 // if(particle->GetPDGMass() > 5.0*CLHE 487 // if(particle->GetPDGMass() > 5.0*CLHEP::GeV) 483 if(particle->GetParticleName() == "GenericIo 488 if(particle->GetParticleName() == "GenericIon") { 484 pmanager->AddProcess(theScintProcessNuc); 489 pmanager->AddProcess(theScintProcessNuc); // AtRestDiscrete 485 pmanager->SetProcessOrderingToLast(theScin 490 pmanager->SetProcessOrderingToLast(theScintProcessNuc,idxAtRest); 486 pmanager->SetProcessOrderingToLast(theScin 491 pmanager->SetProcessOrderingToLast(theScintProcessNuc,idxPostStep); 487 theScintProcessNucNeverUsed = false; 492 theScintProcessNucNeverUsed = false; 488 } 493 } 489 else if(particle->GetParticleName() == "alph 494 else if(particle->GetParticleName() == "alpha") { 490 pmanager->AddProcess(theScintProcessAlpha) 495 pmanager->AddProcess(theScintProcessAlpha); 491 pmanager->SetProcessOrderingToLast(theScin 496 pmanager->SetProcessOrderingToLast(theScintProcessAlpha,idxAtRest); 492 pmanager->SetProcessOrderingToLast(theScin 497 pmanager->SetProcessOrderingToLast(theScintProcessAlpha,idxPostStep); 493 theScintProcessAlphaNeverUsed = false; 498 theScintProcessAlphaNeverUsed = false; 494 } 499 } 495 else { 500 else { 496 pmanager->AddProcess(theScintProcessDef); 501 pmanager->AddProcess(theScintProcessDef); 497 pmanager->SetProcessOrderingToLast(theScin 502 pmanager->SetProcessOrderingToLast(theScintProcessDef,idxAtRest); 498 pmanager->SetProcessOrderingToLast(theScin 503 pmanager->SetProcessOrderingToLast(theScintProcessDef,idxPostStep); 499 theScintProcessDefNeverUsed = false; 504 theScintProcessDefNeverUsed = false; 500 } 505 } 501 } 506 } 502 507 503 if (particleName == "opticalphoton") { 508 if (particleName == "opticalphoton") { 504 pmanager->AddDiscreteProcess(theAbsorptionPr 509 pmanager->AddDiscreteProcess(theAbsorptionProcess); 505 theAbsorptionProcessNeverUsed = false; 510 theAbsorptionProcessNeverUsed = false; 506 // pmanager->AddDiscreteProcess(theRayleigh 511 // pmanager->AddDiscreteProcess(theRayleighScatteringProcess); 507 theBoundaryProcessNeverUsed = false; 512 theBoundaryProcessNeverUsed = false; 508 pmanager->AddDiscreteProcess(theBoundaryProc 513 pmanager->AddDiscreteProcess(theBoundaryProcess); 509 } 514 } 510 } 515 } 511 if ( theScintProcessDefNeverUsed ) delete 516 if ( theScintProcessDefNeverUsed ) delete theScintProcessDef; 512 if ( theScintProcessAlphaNeverUsed ) delet 517 if ( theScintProcessAlphaNeverUsed ) delete theScintProcessAlpha; 513 if ( theScintProcessNucNeverUsed ) delete 518 if ( theScintProcessNucNeverUsed ) delete theScintProcessNuc; 514 if ( theBoundaryProcessNeverUsed ) delete 519 if ( theBoundaryProcessNeverUsed ) delete theBoundaryProcess; 515 if ( theAbsorptionProcessNeverUsed ) delet 520 if ( theAbsorptionProcessNeverUsed ) delete theAbsorptionProcess; 516 } 521 } 517 522 518 523 519 // Hadronic processes //////////////////////// 524 // Hadronic processes //////////////////////////////////////////////////////// 520 525 521 // Elastic processes: 526 // Elastic processes: 522 #include "G4HadronElasticProcess.hh" 527 #include "G4HadronElasticProcess.hh" 523 #include "G4NeutronCaptureProcess.hh" << 528 #include "G4HadronCaptureProcess.hh" 524 #include "G4HadronElastic.hh" 529 #include "G4HadronElastic.hh" 525 #include "G4ChipsElasticModel.hh" 530 #include "G4ChipsElasticModel.hh" 526 #include "G4ElasticHadrNucleusHE.hh" 531 #include "G4ElasticHadrNucleusHE.hh" 527 #include "G4AntiNuclElastic.hh" 532 #include "G4AntiNuclElastic.hh" 528 #include "G4BGGPionElasticXS.hh" 533 #include "G4BGGPionElasticXS.hh" 529 #include "G4CrossSectionDataSetRegistry.hh" 534 #include "G4CrossSectionDataSetRegistry.hh" 530 #include "G4ChipsProtonElasticXS.hh" 535 #include "G4ChipsProtonElasticXS.hh" 531 #include "G4ChipsNeutronElasticXS.hh" 536 #include "G4ChipsNeutronElasticXS.hh" 532 #include "G4ComponentAntiNuclNuclearXS.hh" 537 #include "G4ComponentAntiNuclNuclearXS.hh" 533 #include "G4ChipsKaonMinusElasticXS.hh" 538 #include "G4ChipsKaonMinusElasticXS.hh" 534 #include "G4ChipsKaonPlusElasticXS.hh" 539 #include "G4ChipsKaonPlusElasticXS.hh" 535 #include "G4ChipsKaonZeroElasticXS.hh" 540 #include "G4ChipsKaonZeroElasticXS.hh" 536 #include "G4BGGNucleonElasticXS.hh" 541 #include "G4BGGNucleonElasticXS.hh" 537 #include "G4CrossSectionElastic.hh" 542 #include "G4CrossSectionElastic.hh" 538 543 539 // Inelastic processes: 544 // Inelastic processes: 540 #include "G4HadronInelasticProcess.hh" << 545 #include "G4PionPlusInelasticProcess.hh" >> 546 #include "G4PionMinusInelasticProcess.hh" >> 547 #include "G4KaonPlusInelasticProcess.hh" >> 548 #include "G4KaonZeroSInelasticProcess.hh" >> 549 #include "G4KaonZeroLInelasticProcess.hh" >> 550 #include "G4KaonMinusInelasticProcess.hh" >> 551 #include "G4ProtonInelasticProcess.hh" >> 552 #include "G4AntiProtonInelasticProcess.hh" >> 553 #include "G4NeutronInelasticProcess.hh" >> 554 #include "G4AntiNeutronInelasticProcess.hh" >> 555 #include "G4DeuteronInelasticProcess.hh" >> 556 #include "G4TritonInelasticProcess.hh" >> 557 #include "G4AlphaInelasticProcess.hh" 541 558 542 // FTFP + BERT model 559 // FTFP + BERT model 543 #include "G4TheoFSGenerator.hh" 560 #include "G4TheoFSGenerator.hh" 544 #include "G4ExcitationHandler.hh" 561 #include "G4ExcitationHandler.hh" 545 #include "G4PreCompoundModel.hh" 562 #include "G4PreCompoundModel.hh" 546 #include "G4GeneratorPrecompoundInterface.hh" 563 #include "G4GeneratorPrecompoundInterface.hh" 547 #include "G4FTFModel.hh" 564 #include "G4FTFModel.hh" 548 #include "G4LundStringFragmentation.hh" 565 #include "G4LundStringFragmentation.hh" 549 #include "G4ExcitedStringDecay.hh" 566 #include "G4ExcitedStringDecay.hh" 550 #include "G4CascadeInterface.hh" 567 #include "G4CascadeInterface.hh" 551 #include "G4CrossSectionInelastic.hh" 568 #include "G4CrossSectionInelastic.hh" 552 #include "G4BGGPionInelasticXS.hh" 569 #include "G4BGGPionInelasticXS.hh" 553 #include "G4ChipsKaonMinusInelasticXS.hh" 570 #include "G4ChipsKaonMinusInelasticXS.hh" 554 #include "G4ChipsKaonPlusInelasticXS.hh" 571 #include "G4ChipsKaonPlusInelasticXS.hh" 555 #include "G4ChipsKaonZeroInelasticXS.hh" 572 #include "G4ChipsKaonZeroInelasticXS.hh" 556 #include "G4CrossSectionDataSetRegistry.hh" 573 #include "G4CrossSectionDataSetRegistry.hh" 557 #include "G4BGGNucleonInelasticXS.hh" 574 #include "G4BGGNucleonInelasticXS.hh" 558 #include "G4ComponentAntiNuclNuclearXS.hh" 575 #include "G4ComponentAntiNuclNuclearXS.hh" 559 #include "G4ComponentGGNuclNuclXsc.hh" 576 #include "G4ComponentGGNuclNuclXsc.hh" 560 577 561 // Neutron high-precision models: <20 MeV 578 // Neutron high-precision models: <20 MeV 562 #include "G4ParticleHPElastic.hh" 579 #include "G4ParticleHPElastic.hh" 563 #include "G4ParticleHPElasticData.hh" 580 #include "G4ParticleHPElasticData.hh" 564 #include "G4ParticleHPCapture.hh" 581 #include "G4ParticleHPCapture.hh" 565 #include "G4ParticleHPCaptureData.hh" 582 #include "G4ParticleHPCaptureData.hh" 566 #include "G4ParticleHPInelastic.hh" 583 #include "G4ParticleHPInelastic.hh" 567 #include "G4ParticleHPInelasticData.hh" 584 #include "G4ParticleHPInelasticData.hh" 568 #include "G4NeutronCaptureXS.hh" 585 #include "G4NeutronCaptureXS.hh" 569 #include "G4NeutronRadCapture.hh" 586 #include "G4NeutronRadCapture.hh" 570 587 571 // Binary light ion cascade for alpha, deutero 588 // Binary light ion cascade for alpha, deuteron and triton 572 #include "G4BinaryLightIonReaction.hh" 589 #include "G4BinaryLightIonReaction.hh" 573 590 574 // ConstructHad() 591 // ConstructHad() 575 // Makes discrete physics processes for the ha 592 // Makes discrete physics processes for the hadrons, at present limited 576 // to those particles with GHEISHA interaction 593 // to those particles with GHEISHA interactions (INTRC > 0). 577 // The processes are: Elastic scattering and I 594 // The processes are: Elastic scattering and Inelastic scattering. 578 // F.W.Jones 09-JUL-1998 595 // F.W.Jones 09-JUL-1998 579 void LBE::ConstructHad() 596 void LBE::ConstructHad() 580 { 597 { 581 // Elastic scattering 598 // Elastic scattering 582 G4HadronElastic* elastic_lhep0 = new G4Hadro 599 G4HadronElastic* elastic_lhep0 = new G4HadronElastic(); 583 G4ChipsElasticModel* elastic_chip = new G4Ch 600 G4ChipsElasticModel* elastic_chip = new G4ChipsElasticModel(); 584 G4ElasticHadrNucleusHE* elastic_he = new G4E 601 G4ElasticHadrNucleusHE* elastic_he = new G4ElasticHadrNucleusHE(); 585 602 586 const G4double elastic_elimitAntiNuc = 100.0 603 const G4double elastic_elimitAntiNuc = 100.0*CLHEP::MeV; 587 G4AntiNuclElastic* elastic_anuc = new G4Anti 604 G4AntiNuclElastic* elastic_anuc = new G4AntiNuclElastic(); 588 elastic_anuc->SetMinEnergy( elastic_elimitAn 605 elastic_anuc->SetMinEnergy( elastic_elimitAntiNuc ); 589 G4CrossSectionElastic* elastic_anucxs = new 606 G4CrossSectionElastic* elastic_anucxs = new G4CrossSectionElastic( elastic_anuc->GetComponentCrossSection() ); 590 G4HadronElastic* elastic_lhep2 = new G4Hadro 607 G4HadronElastic* elastic_lhep2 = new G4HadronElastic(); 591 elastic_lhep2->SetMaxEnergy( elastic_elimitA 608 elastic_lhep2->SetMaxEnergy( elastic_elimitAntiNuc ); 592 609 593 // Inelastic scattering 610 // Inelastic scattering 594 const G4double theFTFMin0 = 0.0*CLHEP::Ge 611 const G4double theFTFMin0 = 0.0*CLHEP::GeV; 595 const G4double theFTFMin1 = 4.0*CLHEP::Ge 612 const G4double theFTFMin1 = 4.0*CLHEP::GeV; 596 const G4double theFTFMax = G4HadronicParamet 613 const G4double theFTFMax = G4HadronicParameters::Instance()->GetMaxEnergy(); 597 const G4double theBERTMin0 = 0.0*CLHEP::Ge 614 const G4double theBERTMin0 = 0.0*CLHEP::GeV; 598 const G4double theBERTMin1 = 19.0*CLHEP::Me 615 const G4double theBERTMin1 = 19.0*CLHEP::MeV; 599 const G4double theBERTMax = 5.0*CLHEP::Ge 616 const G4double theBERTMax = 5.0*CLHEP::GeV; 600 const G4double theHPMin = 0.0*CLHEP::Ge 617 const G4double theHPMin = 0.0*CLHEP::GeV; 601 const G4double theHPMax = 20.0*CLHEP::Me 618 const G4double theHPMax = 20.0*CLHEP::MeV; 602 const G4double theIonBCMin = 0.0*CLHEP::Ge 619 const G4double theIonBCMin = 0.0*CLHEP::GeV; 603 const G4double theIonBCMax = 5.0*CLHEP::Ge 620 const G4double theIonBCMax = 5.0*CLHEP::GeV; 604 621 605 622 606 G4FTFModel * theStringModel = new G4FTFModel 623 G4FTFModel * theStringModel = new G4FTFModel; 607 G4ExcitedStringDecay * theStringDecay = new 624 G4ExcitedStringDecay * theStringDecay = new G4ExcitedStringDecay( new G4LundStringFragmentation ); 608 theStringModel->SetFragmentationModel( theSt 625 theStringModel->SetFragmentationModel( theStringDecay ); 609 G4PreCompoundModel * thePreEquilib = new G4P 626 G4PreCompoundModel * thePreEquilib = new G4PreCompoundModel( new G4ExcitationHandler ); 610 G4GeneratorPrecompoundInterface * theCascade 627 G4GeneratorPrecompoundInterface * theCascade = new G4GeneratorPrecompoundInterface( thePreEquilib ); 611 628 612 G4TheoFSGenerator * theFTFModel0 = new G4The 629 G4TheoFSGenerator * theFTFModel0 = new G4TheoFSGenerator( "FTFP" ); 613 theFTFModel0->SetHighEnergyGenerator( theStr 630 theFTFModel0->SetHighEnergyGenerator( theStringModel ); 614 theFTFModel0->SetTransport( theCascade ); 631 theFTFModel0->SetTransport( theCascade ); 615 theFTFModel0->SetMinEnergy( theFTFMin0 ); 632 theFTFModel0->SetMinEnergy( theFTFMin0 ); 616 theFTFModel0->SetMaxEnergy( theFTFMax ); 633 theFTFModel0->SetMaxEnergy( theFTFMax ); 617 634 618 G4TheoFSGenerator * theFTFModel1 = new G4The 635 G4TheoFSGenerator * theFTFModel1 = new G4TheoFSGenerator( "FTFP" ); 619 theFTFModel1->SetHighEnergyGenerator( theStr 636 theFTFModel1->SetHighEnergyGenerator( theStringModel ); 620 theFTFModel1->SetTransport( theCascade ); 637 theFTFModel1->SetTransport( theCascade ); 621 theFTFModel1->SetMinEnergy( theFTFMin1 ); 638 theFTFModel1->SetMinEnergy( theFTFMin1 ); 622 theFTFModel1->SetMaxEnergy( theFTFMax ); 639 theFTFModel1->SetMaxEnergy( theFTFMax ); 623 640 624 G4CascadeInterface * theBERTModel0 = new G4C 641 G4CascadeInterface * theBERTModel0 = new G4CascadeInterface; 625 theBERTModel0->SetMinEnergy( theBERTMin0 ); 642 theBERTModel0->SetMinEnergy( theBERTMin0 ); 626 theBERTModel0->SetMaxEnergy( theBERTMax ); 643 theBERTModel0->SetMaxEnergy( theBERTMax ); 627 644 628 G4CascadeInterface * theBERTModel1 = new G4C 645 G4CascadeInterface * theBERTModel1 = new G4CascadeInterface; 629 theBERTModel1->SetMinEnergy( theBERTMin1 ); 646 theBERTModel1->SetMinEnergy( theBERTMin1 ); 630 theBERTModel1->SetMaxEnergy( theBERTMax ); 647 theBERTModel1->SetMaxEnergy( theBERTMax ); 631 648 632 // Binary Cascade 649 // Binary Cascade 633 G4BinaryLightIonReaction * theIonBC = new G4 650 G4BinaryLightIonReaction * theIonBC = new G4BinaryLightIonReaction( thePreEquilib ); 634 theIonBC->SetMinEnergy( theIonBCMin ); 651 theIonBC->SetMinEnergy( theIonBCMin ); 635 theIonBC->SetMaxEnergy( theIonBCMax ); 652 theIonBC->SetMaxEnergy( theIonBCMax ); 636 653 637 G4VCrossSectionDataSet * theAntiNucleonData 654 G4VCrossSectionDataSet * theAntiNucleonData = new G4CrossSectionInelastic( new G4ComponentAntiNuclNuclearXS ); 638 G4ComponentGGNuclNuclXsc * ggNuclNuclXsec = 655 G4ComponentGGNuclNuclXsc * ggNuclNuclXsec = new G4ComponentGGNuclNuclXsc(); 639 G4VCrossSectionDataSet * theGGNuclNuclData = 656 G4VCrossSectionDataSet * theGGNuclNuclData = new G4CrossSectionInelastic(ggNuclNuclXsec); 640 657 641 auto myParticleIterator=G4ParticleTable::Get 658 auto myParticleIterator=G4ParticleTable::GetParticleTable()->GetIterator(); 642 myParticleIterator->reset(); 659 myParticleIterator->reset(); 643 while ((*(myParticleIterator))()) 660 while ((*(myParticleIterator))()) 644 { 661 { 645 G4ParticleDefinition* particle = myParti 662 G4ParticleDefinition* particle = myParticleIterator->value(); 646 G4ProcessManager* pmanager = particle->G 663 G4ProcessManager* pmanager = particle->GetProcessManager(); 647 G4String particleName = particle->GetPar 664 G4String particleName = particle->GetParticleName(); 648 665 649 if (particleName == "pi+") 666 if (particleName == "pi+") 650 { 667 { 651 // Elastic scattering 668 // Elastic scattering 652 G4HadronElasticProcess* theElasticPr 669 G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess; 653 theElasticProcess->AddDataSet( new G 670 theElasticProcess->AddDataSet( new G4BGGPionElasticXS( particle ) ); 654 theElasticProcess->RegisterMe( elast 671 theElasticProcess->RegisterMe( elastic_he ); 655 pmanager->AddDiscreteProcess( theElasticPr 672 pmanager->AddDiscreteProcess( theElasticProcess ); 656 // Inelastic scattering 673 // Inelastic scattering 657 G4HadronInelasticProcess* theInelast << 674 G4PionPlusInelasticProcess* theInelasticProcess = new G4PionPlusInelasticProcess("inelastic"); 658 theInelasticProcess->AddDataSet( new 675 theInelasticProcess->AddDataSet( new G4BGGPionInelasticXS( G4PionPlus::Definition() ) ); 659 theInelasticProcess->RegisterMe( theFTFMod 676 theInelasticProcess->RegisterMe( theFTFModel1 ); 660 theInelasticProcess->RegisterMe( the 677 theInelasticProcess->RegisterMe( theBERTModel0 ); 661 pmanager->AddDiscreteProcess( theInelastic 678 pmanager->AddDiscreteProcess( theInelasticProcess ); 662 } 679 } 663 680 664 else if (particleName == "pi-") 681 else if (particleName == "pi-") 665 { 682 { 666 // Elastic scattering 683 // Elastic scattering 667 G4HadronElasticProcess* theElasticPr 684 G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess; 668 theElasticProcess->AddDataSet( new G 685 theElasticProcess->AddDataSet( new G4BGGPionElasticXS( particle ) ); 669 theElasticProcess->RegisterMe( elast 686 theElasticProcess->RegisterMe( elastic_he ); 670 pmanager->AddDiscreteProcess( theElasticPr 687 pmanager->AddDiscreteProcess( theElasticProcess ); 671 // Inelastic scattering 688 // Inelastic scattering 672 G4HadronInelasticProcess* theInelast << 689 G4PionMinusInelasticProcess* theInelasticProcess = new G4PionMinusInelasticProcess("inelastic"); 673 theInelasticProcess->AddDataSet( new 690 theInelasticProcess->AddDataSet( new G4BGGPionInelasticXS( G4PionMinus::Definition() ) ); 674 theInelasticProcess->RegisterMe( theFTFMod 691 theInelasticProcess->RegisterMe( theFTFModel1 ); 675 theInelasticProcess->RegisterMe( the 692 theInelasticProcess->RegisterMe( theBERTModel0 ); 676 pmanager->AddDiscreteProcess( theInelastic 693 pmanager->AddDiscreteProcess( theInelasticProcess ); 677 } 694 } 678 695 679 else if (particleName == "kaon+") 696 else if (particleName == "kaon+") 680 { 697 { 681 // Elastic scattering 698 // Elastic scattering 682 G4HadronElasticProcess* theElasticPr 699 G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess; 683 theElasticProcess->RegisterMe( elast 700 theElasticProcess->RegisterMe( elastic_lhep0 ); 684 theElasticProcess->AddDataSet( G4Cro 701 theElasticProcess->AddDataSet( G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsKaonPlusElasticXS::Default_Name())); 685 pmanager->AddDiscreteProcess( theElasticPr 702 pmanager->AddDiscreteProcess( theElasticProcess ); 686 // Inelastic scattering 703 // Inelastic scattering 687 G4HadronInelasticProcess* theInelast << 704 G4KaonPlusInelasticProcess* theInelasticProcess = new G4KaonPlusInelasticProcess("inelastic"); 688 << 689 theInelasticProcess->AddDataSet( G4C 705 theInelasticProcess->AddDataSet( G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsKaonPlusInelasticXS::Default_Name())); 690 theInelasticProcess->RegisterMe( theFTFMod 706 theInelasticProcess->RegisterMe( theFTFModel1 ); 691 theInelasticProcess->RegisterMe( the 707 theInelasticProcess->RegisterMe( theBERTModel0 ); 692 pmanager->AddDiscreteProcess( theInelastic 708 pmanager->AddDiscreteProcess( theInelasticProcess ); 693 } 709 } 694 710 695 else if (particleName == "kaon0S") 711 else if (particleName == "kaon0S") 696 { 712 { 697 // Elastic scattering 713 // Elastic scattering 698 G4HadronElasticProcess* theElasticPr 714 G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess; 699 theElasticProcess->RegisterMe( elast 715 theElasticProcess->RegisterMe( elastic_lhep0 ); 700 theElasticProcess->AddDataSet( G4Cro 716 theElasticProcess->AddDataSet( G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsKaonZeroElasticXS::Default_Name())); 701 pmanager->AddDiscreteProcess( theElasticPr 717 pmanager->AddDiscreteProcess( theElasticProcess ); 702 // Inelastic scattering 718 // Inelastic scattering 703 G4HadronInelasticProcess* theInelasticProc << 719 G4KaonZeroSInelasticProcess* theInelasticProcess = new G4KaonZeroSInelasticProcess("inelastic"); 704 theInelasticProcess->AddDataSet( G4C 720 theInelasticProcess->AddDataSet( G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsKaonZeroInelasticXS::Default_Name())); 705 theInelasticProcess->RegisterMe( theFTFMod 721 theInelasticProcess->RegisterMe( theFTFModel1 ); 706 theInelasticProcess->RegisterMe( the 722 theInelasticProcess->RegisterMe( theBERTModel0 ); 707 pmanager->AddDiscreteProcess( theInelastic 723 pmanager->AddDiscreteProcess( theInelasticProcess ); 708 } 724 } 709 725 710 else if (particleName == "kaon0L") 726 else if (particleName == "kaon0L") 711 { 727 { 712 // Elastic scattering 728 // Elastic scattering 713 G4HadronElasticProcess* theElasticPr 729 G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess; 714 theElasticProcess->RegisterMe( elast 730 theElasticProcess->RegisterMe( elastic_lhep0 ); 715 theElasticProcess->AddDataSet( G4Cro 731 theElasticProcess->AddDataSet( G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsKaonZeroElasticXS::Default_Name())); 716 pmanager->AddDiscreteProcess( theElasticPr 732 pmanager->AddDiscreteProcess( theElasticProcess ); 717 // Inelastic scattering 733 // Inelastic scattering 718 //G4KaonZeroLInelasticProcess* theIn << 734 G4KaonZeroLInelasticProcess* theInelasticProcess = new G4KaonZeroLInelasticProcess("inelastic"); 719 G4HadronInelasticProcess* theInelasticProc << 720 theInelasticProcess->AddDataSet( G4C 735 theInelasticProcess->AddDataSet( G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsKaonZeroInelasticXS::Default_Name())); 721 theInelasticProcess->RegisterMe( theFTFMod 736 theInelasticProcess->RegisterMe( theFTFModel1 ); 722 theInelasticProcess->RegisterMe( the 737 theInelasticProcess->RegisterMe( theBERTModel0 ); 723 pmanager->AddDiscreteProcess( theInelastic 738 pmanager->AddDiscreteProcess( theInelasticProcess ); 724 } 739 } 725 740 726 else if (particleName == "kaon-") 741 else if (particleName == "kaon-") 727 { 742 { 728 // Elastic scattering 743 // Elastic scattering 729 G4HadronElasticProcess* theElasticPr 744 G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess; 730 theElasticProcess->RegisterMe( elast 745 theElasticProcess->RegisterMe( elastic_lhep0 ); 731 theElasticProcess->AddDataSet( G4Cro 746 theElasticProcess->AddDataSet( G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsKaonMinusElasticXS::Default_Name())); 732 pmanager->AddDiscreteProcess( theElasticPr 747 pmanager->AddDiscreteProcess( theElasticProcess ); 733 // Inelastic scattering 748 // Inelastic scattering 734 G4HadronInelasticProcess* theInelasticProc << 749 G4KaonMinusInelasticProcess* theInelasticProcess = new G4KaonMinusInelasticProcess("inelastic"); 735 theInelasticProcess->AddDataSet( G4C 750 theInelasticProcess->AddDataSet( G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsKaonMinusInelasticXS::Default_Name())); 736 theInelasticProcess->RegisterMe( theFTFMod 751 theInelasticProcess->RegisterMe( theFTFModel1 ); 737 theInelasticProcess->RegisterMe( the 752 theInelasticProcess->RegisterMe( theBERTModel0 ); 738 pmanager->AddDiscreteProcess( theInelastic 753 pmanager->AddDiscreteProcess( theInelasticProcess ); 739 } 754 } 740 755 741 else if (particleName == "proton") 756 else if (particleName == "proton") 742 { 757 { 743 // Elastic scattering 758 // Elastic scattering 744 G4HadronElasticProcess* theElasticPr 759 G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess; 745 theElasticProcess->AddDataSet(G4Cros 760 theElasticProcess->AddDataSet(G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsProtonElasticXS::Default_Name())); 746 theElasticProcess->AddDataSet( new G 761 theElasticProcess->AddDataSet( new G4BGGNucleonElasticXS( G4Proton::Proton() ) ); 747 theElasticProcess->RegisterMe( elast 762 theElasticProcess->RegisterMe( elastic_chip ); 748 pmanager->AddDiscreteProcess( theElasticPr 763 pmanager->AddDiscreteProcess( theElasticProcess ); 749 // Inelastic scattering 764 // Inelastic scattering 750 G4HadronInelasticProcess* theInelasticProc << 765 G4ProtonInelasticProcess* theInelasticProcess = new G4ProtonInelasticProcess("inelastic"); 751 theInelasticProcess->AddDataSet( new 766 theInelasticProcess->AddDataSet( new G4BGGNucleonInelasticXS( G4Proton::Proton() ) ); 752 theInelasticProcess->RegisterMe( theFTFMod 767 theInelasticProcess->RegisterMe( theFTFModel1 ); 753 theInelasticProcess->RegisterMe( the 768 theInelasticProcess->RegisterMe( theBERTModel0 ); 754 pmanager->AddDiscreteProcess( theInelastic 769 pmanager->AddDiscreteProcess( theInelasticProcess ); 755 } 770 } 756 771 757 else if (particleName == "anti_proton") 772 else if (particleName == "anti_proton") 758 { 773 { 759 // Elastic scattering 774 // Elastic scattering 760 G4HadronElasticProcess* theElasticPr 775 G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess; 761 theElasticProcess->AddDataSet( elast 776 theElasticProcess->AddDataSet( elastic_anucxs ); 762 theElasticProcess->RegisterMe( elast 777 theElasticProcess->RegisterMe( elastic_lhep2 ); 763 theElasticProcess->RegisterMe( elast 778 theElasticProcess->RegisterMe( elastic_anuc ); 764 pmanager->AddDiscreteProcess( theElasticPr 779 pmanager->AddDiscreteProcess( theElasticProcess ); 765 // Inelastic scattering 780 // Inelastic scattering 766 G4HadronInelasticProcess* theInelasticProc << 781 G4AntiProtonInelasticProcess* theInelasticProcess = new G4AntiProtonInelasticProcess("inelastic"); 767 theInelasticProcess->AddDataSet( the 782 theInelasticProcess->AddDataSet( theAntiNucleonData ); 768 theInelasticProcess->RegisterMe( theFTFMod 783 theInelasticProcess->RegisterMe( theFTFModel0 ); 769 pmanager->AddDiscreteProcess( theInelastic 784 pmanager->AddDiscreteProcess( theInelasticProcess ); 770 } 785 } 771 786 772 else if (particleName == "neutron") { 787 else if (particleName == "neutron") { 773 // elastic scattering 788 // elastic scattering 774 G4HadronElasticProcess* theElasticProcess = 789 G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess; 775 theElasticProcess->AddDataSet(G4CrossS 790 theElasticProcess->AddDataSet(G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsNeutronElasticXS::Default_Name())); 776 G4HadronElastic* elastic_neutronChipsM 791 G4HadronElastic* elastic_neutronChipsModel = new G4ChipsElasticModel(); 777 elastic_neutronChipsModel->SetMinEnergy( 19. 792 elastic_neutronChipsModel->SetMinEnergy( 19.0*CLHEP::MeV ); 778 theElasticProcess->RegisterMe( elastic 793 theElasticProcess->RegisterMe( elastic_neutronChipsModel ); 779 G4ParticleHPElastic * theElasticNeutronHP = 794 G4ParticleHPElastic * theElasticNeutronHP = new G4ParticleHPElastic; 780 theElasticNeutronHP->SetMinEnergy( the 795 theElasticNeutronHP->SetMinEnergy( theHPMin ); 781 theElasticNeutronHP->SetMaxEnergy( the 796 theElasticNeutronHP->SetMaxEnergy( theHPMax ); 782 theElasticProcess->RegisterMe( theElasticNeu 797 theElasticProcess->RegisterMe( theElasticNeutronHP ); 783 theElasticProcess->AddDataSet( new G4Particl 798 theElasticProcess->AddDataSet( new G4ParticleHPElasticData ); 784 pmanager->AddDiscreteProcess( theElasticProc 799 pmanager->AddDiscreteProcess( theElasticProcess ); 785 // inelastic scattering 800 // inelastic scattering 786 G4HadronInelasticProcess* theInelasticProces << 801 G4NeutronInelasticProcess* theInelasticProcess = new G4NeutronInelasticProcess("inelastic"); 787 theInelasticProcess->AddDataSet( new G 802 theInelasticProcess->AddDataSet( new G4BGGNucleonInelasticXS( G4Neutron::Neutron() ) ); 788 theInelasticProcess->RegisterMe( theFTFModel 803 theInelasticProcess->RegisterMe( theFTFModel1 ); 789 theInelasticProcess->RegisterMe( theBE 804 theInelasticProcess->RegisterMe( theBERTModel1 ); 790 G4ParticleHPInelastic * theNeutronInelasticH 805 G4ParticleHPInelastic * theNeutronInelasticHPModel = new G4ParticleHPInelastic; 791 theNeutronInelasticHPModel->SetMinEner 806 theNeutronInelasticHPModel->SetMinEnergy( theHPMin ); 792 theNeutronInelasticHPModel->SetMaxEner 807 theNeutronInelasticHPModel->SetMaxEnergy( theHPMax ); 793 theInelasticProcess->RegisterMe( theNeutronI 808 theInelasticProcess->RegisterMe( theNeutronInelasticHPModel ); 794 theInelasticProcess->AddDataSet( new G4Parti 809 theInelasticProcess->AddDataSet( new G4ParticleHPInelasticData ); 795 pmanager->AddDiscreteProcess(theInelasticPro 810 pmanager->AddDiscreteProcess(theInelasticProcess); 796 // capture 811 // capture 797 G4NeutronCaptureProcess* theCaptureProcess = << 812 G4HadronCaptureProcess* theCaptureProcess = new G4HadronCaptureProcess; 798 G4ParticleHPCapture * theNeutronCaptureHPMod 813 G4ParticleHPCapture * theNeutronCaptureHPModel = new G4ParticleHPCapture; 799 theNeutronCaptureHPModel->SetMinEnergy 814 theNeutronCaptureHPModel->SetMinEnergy( theHPMin ); 800 theNeutronCaptureHPModel->SetMaxEnergy 815 theNeutronCaptureHPModel->SetMaxEnergy( theHPMax ); 801 G4NeutronRadCapture* theNeutronRadCapture = 816 G4NeutronRadCapture* theNeutronRadCapture = new G4NeutronRadCapture(); 802 theNeutronRadCapture->SetMinEnergy(theHPMax* 817 theNeutronRadCapture->SetMinEnergy(theHPMax*0.99); 803 theCaptureProcess->RegisterMe( theNeutronCap 818 theCaptureProcess->RegisterMe( theNeutronCaptureHPModel ); 804 theCaptureProcess->RegisterMe( theNeutronRad 819 theCaptureProcess->RegisterMe( theNeutronRadCapture); 805 theCaptureProcess->AddDataSet( new G4Particl 820 theCaptureProcess->AddDataSet( new G4ParticleHPCaptureData ); 806 theCaptureProcess->AddDataSet((G4NeutronCapt 821 theCaptureProcess->AddDataSet((G4NeutronCaptureXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronCaptureXS::Default_Name())); 807 pmanager->AddDiscreteProcess(theCaptureProce 822 pmanager->AddDiscreteProcess(theCaptureProcess); 808 } 823 } 809 else if (particleName == "anti_neutron") 824 else if (particleName == "anti_neutron") 810 { 825 { 811 // Elastic scattering 826 // Elastic scattering 812 G4HadronElasticProcess* theElasticPr 827 G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess; 813 theElasticProcess->AddDataSet( elast 828 theElasticProcess->AddDataSet( elastic_anucxs ); 814 theElasticProcess->RegisterMe( elast 829 theElasticProcess->RegisterMe( elastic_lhep2 ); 815 theElasticProcess->RegisterMe( elast 830 theElasticProcess->RegisterMe( elastic_anuc ); 816 pmanager->AddDiscreteProcess( theElasticPr 831 pmanager->AddDiscreteProcess( theElasticProcess ); 817 // Inelastic scattering 832 // Inelastic scattering 818 G4HadronInelasticProcess* theInelasticProc << 833 G4AntiNeutronInelasticProcess* theInelasticProcess = new G4AntiNeutronInelasticProcess("inelastic"); 819 theInelasticProcess->AddDataSet( the 834 theInelasticProcess->AddDataSet( theAntiNucleonData ); 820 theInelasticProcess->RegisterMe( theFTFMod 835 theInelasticProcess->RegisterMe( theFTFModel0 ); 821 pmanager->AddDiscreteProcess( theInelastic 836 pmanager->AddDiscreteProcess( theInelasticProcess ); 822 } 837 } 823 838 824 else if (particleName == "deuteron") 839 else if (particleName == "deuteron") 825 { 840 { 826 // Elastic scattering 841 // Elastic scattering 827 G4HadronElasticProcess* theElasticPr 842 G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess; 828 theElasticProcess->RegisterMe( elast 843 theElasticProcess->RegisterMe( elastic_lhep0 ); 829 theElasticProcess->AddDataSet( theGG 844 theElasticProcess->AddDataSet( theGGNuclNuclData ); 830 pmanager->AddDiscreteProcess( theElasticPr 845 pmanager->AddDiscreteProcess( theElasticProcess ); 831 // Inelastic scattering 846 // Inelastic scattering 832 G4HadronInelasticProcess* theInelasticProc << 847 G4DeuteronInelasticProcess* theInelasticProcess = new G4DeuteronInelasticProcess("inelastic"); 833 theInelasticProcess->AddDataSet( the 848 theInelasticProcess->AddDataSet( theGGNuclNuclData ); 834 theInelasticProcess->RegisterMe( theFTFMod 849 theInelasticProcess->RegisterMe( theFTFModel1 ); 835 theInelasticProcess->RegisterMe( theIonBC 850 theInelasticProcess->RegisterMe( theIonBC ); 836 pmanager->AddDiscreteProcess( theInelastic 851 pmanager->AddDiscreteProcess( theInelasticProcess ); 837 } 852 } 838 853 839 else if (particleName == "triton") 854 else if (particleName == "triton") 840 { 855 { 841 // Elastic scattering 856 // Elastic scattering 842 G4HadronElasticProcess* theElasticPr 857 G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess; 843 theElasticProcess->RegisterMe( elast 858 theElasticProcess->RegisterMe( elastic_lhep0 ); 844 theElasticProcess->AddDataSet( theGG 859 theElasticProcess->AddDataSet( theGGNuclNuclData ); 845 pmanager->AddDiscreteProcess( theElasticPr 860 pmanager->AddDiscreteProcess( theElasticProcess ); 846 // Inelastic scattering 861 // Inelastic scattering 847 G4HadronInelasticProcess* theInelasticProc << 862 G4TritonInelasticProcess* theInelasticProcess = new G4TritonInelasticProcess("inelastic"); 848 theInelasticProcess->AddDataSet( the 863 theInelasticProcess->AddDataSet( theGGNuclNuclData ); 849 theInelasticProcess->RegisterMe( theFTFMod 864 theInelasticProcess->RegisterMe( theFTFModel1 ); 850 theInelasticProcess->RegisterMe( theIonBC 865 theInelasticProcess->RegisterMe( theIonBC ); 851 pmanager->AddDiscreteProcess( theInelastic 866 pmanager->AddDiscreteProcess( theInelasticProcess ); 852 } 867 } 853 868 854 else if (particleName == "alpha") 869 else if (particleName == "alpha") 855 { 870 { 856 // Elastic scattering 871 // Elastic scattering 857 G4HadronElasticProcess* theElasticPr 872 G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess; 858 theElasticProcess->RegisterMe( elast 873 theElasticProcess->RegisterMe( elastic_lhep0 ); 859 theElasticProcess->AddDataSet( theGG 874 theElasticProcess->AddDataSet( theGGNuclNuclData ); 860 pmanager->AddDiscreteProcess( theElasticPr 875 pmanager->AddDiscreteProcess( theElasticProcess ); 861 // Inelastic scattering 876 // Inelastic scattering 862 G4HadronInelasticProcess* theInelasticProc << 877 G4AlphaInelasticProcess* theInelasticProcess = new G4AlphaInelasticProcess("inelastic"); 863 theInelasticProcess->AddDataSet( the 878 theInelasticProcess->AddDataSet( theGGNuclNuclData ); 864 theInelasticProcess->RegisterMe( theFTFMod 879 theInelasticProcess->RegisterMe( theFTFModel1 ); 865 theInelasticProcess->RegisterMe( theIonBC 880 theInelasticProcess->RegisterMe( theIonBC ); 866 pmanager->AddDiscreteProcess( theInelastic 881 pmanager->AddDiscreteProcess( theInelasticProcess ); 867 } 882 } 868 } // while ((*(myParticleIterator))()) 883 } // while ((*(myParticleIterator))()) 869 884 870 // Add stopping processes with builder 885 // Add stopping processes with builder 871 stoppingPhysics->ConstructProcess(); 886 stoppingPhysics->ConstructProcess(); 872 } 887 } 873 888 874 889 875 // Decays //////////////////////////////////// 890 // Decays /////////////////////////////////////////////////////////////////// 876 #include "G4Decay.hh" 891 #include "G4Decay.hh" 877 #include "G4RadioactiveDecay.hh" << 892 #include "G4RadioactiveDecayBase.hh" 878 #include "G4IonTable.hh" 893 #include "G4IonTable.hh" 879 #include "G4Ions.hh" 894 #include "G4Ions.hh" 880 895 881 #include "G4LossTableManager.hh" 896 #include "G4LossTableManager.hh" 882 #include "G4UAtomicDeexcitation.hh" 897 #include "G4UAtomicDeexcitation.hh" 883 #include "G4NuclearLevelData.hh" 898 #include "G4NuclearLevelData.hh" 884 #include "G4NuclideTable.hh" 899 #include "G4NuclideTable.hh" 885 900 886 void LBE::ConstructGeneral() { 901 void LBE::ConstructGeneral() { 887 902 888 // Add Decay Process 903 // Add Decay Process 889 G4Decay* theDecayProcess = new G4Decay(); 904 G4Decay* theDecayProcess = new G4Decay(); 890 G4bool theDecayProcessNeverUsed = true; //Ch 905 G4bool theDecayProcessNeverUsed = true; //Check if theDecayProcess will be used 891 auto myParticleIterator=G4ParticleTable::Get 906 auto myParticleIterator=G4ParticleTable::GetParticleTable()->GetIterator(); 892 myParticleIterator->reset(); 907 myParticleIterator->reset(); 893 while( (*(myParticleIterator))() ) 908 while( (*(myParticleIterator))() ) 894 { 909 { 895 G4ParticleDefinition* particle = myParti 910 G4ParticleDefinition* particle = myParticleIterator->value(); 896 G4ProcessManager* pmanager = particle->G 911 G4ProcessManager* pmanager = particle->GetProcessManager(); 897 912 898 if (theDecayProcess->IsApplicable(*parti 913 if (theDecayProcess->IsApplicable(*particle) && !particle->IsShortLived()) 899 { 914 { 900 theDecayProcessNeverUsed = false; 915 theDecayProcessNeverUsed = false; 901 pmanager ->AddProcess(theDecayProcess); 916 pmanager ->AddProcess(theDecayProcess); 902 // set ordering for PostStepDoIt and AtRes 917 // set ordering for PostStepDoIt and AtRestDoIt 903 pmanager ->SetProcessOrdering(theDecayProc 918 pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep); 904 pmanager ->SetProcessOrdering(theDecayProc 919 pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest); 905 } 920 } 906 } 921 } 907 922 908 // Declare radioactive decay to the GenericI 923 // Declare radioactive decay to the GenericIon in the IonTable. 909 const G4IonTable *theIonTable = 924 const G4IonTable *theIonTable = 910 G4ParticleTable::GetParticleTable()->GetIo 925 G4ParticleTable::GetParticleTable()->GetIonTable(); 911 G4RadioactiveDecay* theRadioactiveDecay = ne << 926 G4RadioactiveDecayBase* theRadioactiveDecay = new G4RadioactiveDecayBase(); 912 927 913 //Fix for activation of RadioactiveDecay, ba 928 //Fix for activation of RadioactiveDecay, based on G4RadioactiveDecayPhysics 914 G4EmParameters* param = G4EmParameters::Inst 929 G4EmParameters* param = G4EmParameters::Instance(); 915 param->SetAugerCascade(true); 930 param->SetAugerCascade(true); 916 param->AddPhysics("world","G4RadioactiveDeca 931 param->AddPhysics("world","G4RadioactiveDecay"); 917 932 918 G4DeexPrecoParameters* deex = G4NuclearLevel 933 G4DeexPrecoParameters* deex = G4NuclearLevelData::GetInstance()->GetParameters(); 919 deex->SetStoreAllLevels(true); 934 deex->SetStoreAllLevels(true); 920 deex->SetMaxLifeTime(G4NuclideTable::GetInst 935 deex->SetMaxLifeTime(G4NuclideTable::GetInstance()->GetThresholdOfHalfLife() 921 /std::log(2.)); 936 /std::log(2.)); 922 937 923 G4LossTableManager* man = G4LossTableManager 938 G4LossTableManager* man = G4LossTableManager::Instance(); 924 G4VAtomDeexcitation* ad = man->AtomDeexcitat 939 G4VAtomDeexcitation* ad = man->AtomDeexcitation(); 925 if(!ad) { 940 if(!ad) { 926 ad = new G4UAtomicDeexcitation(); 941 ad = new G4UAtomicDeexcitation(); 927 man->SetAtomDeexcitation(ad); 942 man->SetAtomDeexcitation(ad); 928 ad->InitialiseAtomicDeexcitation(); 943 ad->InitialiseAtomicDeexcitation(); 929 } 944 } 930 945 931 for (G4int i=0; i<theIonTable->Entries(); i+ 946 for (G4int i=0; i<theIonTable->Entries(); i++) 932 { 947 { 933 G4String particleName = theIonTable->Get 948 G4String particleName = theIonTable->GetParticle(i)->GetParticleName(); 934 G4String particleType = theIonTable->Get 949 G4String particleType = theIonTable->GetParticle(i)->GetParticleType(); 935 950 936 if (particleName == "GenericIon") 951 if (particleName == "GenericIon") 937 { 952 { 938 G4ProcessManager* pmanager = 953 G4ProcessManager* pmanager = 939 theIonTable->GetParticle(i)->GetProcessM 954 theIonTable->GetParticle(i)->GetProcessManager(); 940 pmanager->SetVerboseLevel(VerboseLevel); 955 pmanager->SetVerboseLevel(VerboseLevel); 941 pmanager ->AddProcess(theRadioactiveDecay) 956 pmanager ->AddProcess(theRadioactiveDecay); 942 pmanager ->SetProcessOrdering(theRadioacti 957 pmanager ->SetProcessOrdering(theRadioactiveDecay, idxPostStep); 943 pmanager ->SetProcessOrdering(theRadioacti 958 pmanager ->SetProcessOrdering(theRadioactiveDecay, idxAtRest); 944 } 959 } 945 } 960 } 946 //If we actually never used the process, d 961 //If we actually never used the process, delete it 947 //From Coverity report 962 //From Coverity report 948 if ( theDecayProcessNeverUsed ) delete the 963 if ( theDecayProcessNeverUsed ) delete theDecayProcess; 949 } 964 } 950 965 951 // Cuts ////////////////////////////////////// 966 // Cuts ///////////////////////////////////////////////////////////////////// 952 void LBE::SetCuts() 967 void LBE::SetCuts() 953 { 968 { 954 969 955 if (verboseLevel >1) 970 if (verboseLevel >1) 956 G4cout << "LBE::SetCuts:"; 971 G4cout << "LBE::SetCuts:"; 957 972 958 if (verboseLevel>0){ 973 if (verboseLevel>0){ 959 G4cout << "LBE::SetCuts:"; 974 G4cout << "LBE::SetCuts:"; 960 G4cout << "CutLength : " 975 G4cout << "CutLength : " 961 << G4BestUnit(defaultCutValue,"Length") < 976 << G4BestUnit(defaultCutValue,"Length") << G4endl; 962 } 977 } 963 978 964 //special for low energy physics 979 //special for low energy physics 965 G4double lowlimit=250*CLHEP::eV; 980 G4double lowlimit=250*CLHEP::eV; 966 G4ProductionCutsTable * aPCTable = G4Product 981 G4ProductionCutsTable * aPCTable = G4ProductionCutsTable::GetProductionCutsTable(); 967 aPCTable->SetEnergyRange(lowlimit,100*CLHEP: 982 aPCTable->SetEnergyRange(lowlimit,100*CLHEP::GeV); 968 983 969 // set cut values for gamma at first and for 984 // set cut values for gamma at first and for e- second and next for e+, 970 // because some processes for e+/e- need cut 985 // because some processes for e+/e- need cut values for gamma 971 SetCutValue(cutForGamma, "gamma"); 986 SetCutValue(cutForGamma, "gamma"); 972 SetCutValue(cutForElectron, "e-"); 987 SetCutValue(cutForElectron, "e-"); 973 SetCutValue(cutForPositron, "e+"); 988 SetCutValue(cutForPositron, "e+"); 974 989 975 // SetCutValue(cutForProton, "proton"); 990 // SetCutValue(cutForProton, "proton"); 976 // SetCutValue(cutForProton, "anti_proton") 991 // SetCutValue(cutForProton, "anti_proton"); 977 // SetCutValue(cutForAlpha, "alpha"); 992 // SetCutValue(cutForAlpha, "alpha"); 978 // SetCutValue(cutForGenericIon, "GenericI 993 // SetCutValue(cutForGenericIon, "GenericIon"); 979 994 980 // SetCutValueForOthers(defaultCutValue); 995 // SetCutValueForOthers(defaultCutValue); 981 996 982 if (verboseLevel>0) DumpCutValuesTable(); 997 if (verboseLevel>0) DumpCutValuesTable(); 983 } 998 } 984 999 985 1000