Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LBE.cc
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27// --------------------------------------------------------------
28//
29// For information related to this code contact: Alex Howard
30// e-mail: alexander.howard@cern.ch
31// --------------------------------------------------------------
32// Comments
33//
34// Underground Advanced
35//
36// This physics list is taken from the underground_physics example with small
37// modifications. It is an example of a "flat" physics list with no dependence
38// on builders. The physics covered would be suitable for a low background
39// experiment including the neutron_hp package
40//
41//
42//
43// PhysicsList program
44//
45// Modified:
46//
47// 14-02-03 Fix bugs in msc and hIon instanciation + cut per region
48// 16-08-10 Remove inclusion of obsolete class of G4ParticleWithCuts
49// 20-10-10 Migrate LowEnergy process to Livermore models, LP
50// 28-03-13 Replace LEP/HEP with FTFP+BERT (A.R.)
51// 15-01-20 Updated cross sections (A.R.)
52// --------------------------------------------------------------
53
54#include <iomanip>
55
56#include "globals.hh"
58#include "G4ios.hh"
59#include "G4ProcessManager.hh"
60#include "G4ProcessVector.hh"
61
62#include "G4ParticleTypes.hh"
63#include "G4ParticleTable.hh"
65
66#include "G4UserLimits.hh"
67#include "G4WarnPLStatus.hh"
68
69// Builder for all stopping processes
70#include "G4StoppingPhysics.hh"
71
74#include "LBE.hh"
75
76// Constructor /////////////////////////////////////////////////////////////
78{
79 if(ver > 0) {
80 G4cout << "You are using the simulation engine: LBE"<<G4endl;
81 G4cout <<G4endl;
82 }
83 defaultCutValue = 1.0*CLHEP::micrometer; //
84 cutForGamma = defaultCutValue;
85 cutForElectron = 1.0*CLHEP::micrometer;
86 cutForPositron = defaultCutValue;
87 //not used:
88 // cutForProton = defaultCutValue;
89 // cutForAlpha = 1.0*CLHEP::nanometer;
90 // cutForGenericIon = 1.0*CLHEP::nanometer;
91
92 stoppingPhysics = new G4StoppingPhysics;
93
94 VerboseLevel = ver;
95 OpVerbLevel = 0;
96
97 SetVerboseLevel(VerboseLevel);
98}
99
100
101// Destructor //////////////////////////////////////////////////////////////
103{
104 delete stoppingPhysics;
105}
106
107
108// Construct Particles /////////////////////////////////////////////////////
110{
111
112 // In this method, static member functions should be called
113 // for all particles which you want to use.
114 // This ensures that objects of these particle types will be
115 // created in the program.
116
117 ConstructMyBosons();
118 ConstructMyLeptons();
119 ConstructMyMesons();
120 ConstructMyBaryons();
121 ConstructMyIons();
122 ConstructMyShortLiveds();
123 stoppingPhysics->ConstructParticle(); // Anything not included above
124}
125
126
127// construct Bosons://///////////////////////////////////////////////////
128 void LBE::ConstructMyBosons()
129{
130 // pseudo-particles
133
134 // gamma
136
137 //OpticalPhotons
139}
140
141
142// construct Leptons://///////////////////////////////////////////////////
143 void LBE::ConstructMyLeptons()
144{
145 // leptons
150
155}
156
157#include "G4MesonConstructor.hh"
158#include "G4BaryonConstructor.hh"
159#include "G4IonConstructor.hh"
160
161
162// construct Mesons://///////////////////////////////////////////////////
163 void LBE::ConstructMyMesons()
164{
165 // mesons
166 G4MesonConstructor mConstructor;
167 mConstructor.ConstructParticle();
168
169}
170
171
172// construct Baryons://///////////////////////////////////////////////////
173 void LBE::ConstructMyBaryons()
174{
175 // baryons
176 G4BaryonConstructor bConstructor;
177 bConstructor.ConstructParticle();
178
179}
180
181
182// construct Ions://///////////////////////////////////////////////////
183 void LBE::ConstructMyIons()
184{
185 // ions
186 G4IonConstructor iConstructor;
187 iConstructor.ConstructParticle();
188
189}
190
191// construct Shortliveds://///////////////////////////////////////////////////
192 void LBE::ConstructMyShortLiveds()
193{
194 // ShortLiveds
195 G4ShortLivedConstructor pShortLivedConstructor;
196 pShortLivedConstructor.ConstructParticle();
197}
198
199
200
201
202// Construct Processes //////////////////////////////////////////////////////
204{
206 ConstructEM();
207 ConstructOp();
208 ConstructHad();
210}
211
212
213// Transportation ///////////////////////////////////////////////////////////
214#include "G4MaxTimeCuts.hh"
215#include "G4MinEkineCuts.hh"
216
218
220
221 auto myParticleIterator=G4ParticleTable::GetParticleTable()->GetIterator();
222 myParticleIterator->reset();
223 while( (*(myParticleIterator))() ){
224 G4ParticleDefinition* particle = myParticleIterator->value();
225 G4ProcessManager* pmanager = particle->GetProcessManager();
226 G4String particleName = particle->GetParticleName();
227 // time cuts for ONLY neutrons:
228 if(particleName == "neutron")
229 pmanager->AddDiscreteProcess(new G4MaxTimeCuts());
230 // Energy cuts to kill charged (embedded in method) particles:
231 pmanager->AddDiscreteProcess(new G4MinEkineCuts());
232 }
233}
234
235
236// Electromagnetic Processes ////////////////////////////////////////////////
237// all charged particles
238
242
243// gamma. Use Livermore models
246#include "G4ComptonScattering.hh"
248#include "G4GammaConversion.hh"
250#include "G4RayleighScattering.hh"
252
253
254// e-
257#include "G4UrbanMscModel.hh"
258
259#include "G4eIonisation.hh"
261
262#include "G4eBremsstrahlung.hh"
264
265// e+
266#include "G4eplusAnnihilation.hh"
267
268
269// alpha and GenericIon and deuterons, triton, He3:
270#include "G4ionIonisation.hh"
271#include "G4hIonisation.hh"
272#include "G4hBremsstrahlung.hh"
273//
275#include "G4NuclearStopping.hh"
276#include "G4EnergyLossTables.hh"
277
278//muon:
279#include "G4MuIonisation.hh"
280#include "G4MuBremsstrahlung.hh"
281#include "G4MuPairProduction.hh"
282#include "G4MuonMinusCapture.hh"
283
284//OTHERS:
285//#include "G4hIonisation.hh" // standard hadron ionisation
286
288
289 // models & processes:
290 // Use Livermore models up to 20 MeV, and standard
291 // models for higher energy
292 G4double LivermoreHighEnergyLimit = 20*CLHEP::MeV;
293 //
294 auto myParticleIterator=G4ParticleTable::GetParticleTable()->GetIterator();
295 myParticleIterator->reset();
296 while( (*(myParticleIterator))() ){
297 G4ParticleDefinition* particle = myParticleIterator->value();
298 G4ProcessManager* pmanager = particle->GetProcessManager();
299 G4String particleName = particle->GetParticleName();
300 G4String particleType = particle->GetParticleType();
301 G4double charge = particle->GetPDGCharge();
302
303 if (particleName == "gamma")
304 {
305 G4PhotoElectricEffect* thePhotoElectricEffect = new G4PhotoElectricEffect();
306 G4LivermorePhotoElectricModel* theLivermorePhotoElectricModel =
308 theLivermorePhotoElectricModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
309 thePhotoElectricEffect->AddEmModel(0, theLivermorePhotoElectricModel);
310 pmanager->AddDiscreteProcess(thePhotoElectricEffect);
311
312 G4ComptonScattering* theComptonScattering = new G4ComptonScattering();
313 G4LivermoreComptonModel* theLivermoreComptonModel =
315 theLivermoreComptonModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
316 theComptonScattering->AddEmModel(0, theLivermoreComptonModel);
317 pmanager->AddDiscreteProcess(theComptonScattering);
318
319 G4GammaConversion* theGammaConversion = new G4GammaConversion();
320 G4LivermoreGammaConversionModel* theLivermoreGammaConversionModel =
322 theLivermoreGammaConversionModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
323 theGammaConversion->AddEmModel(0, theLivermoreGammaConversionModel);
324 pmanager->AddDiscreteProcess(theGammaConversion);
325
326 G4RayleighScattering* theRayleigh = new G4RayleighScattering();
327 G4LivermoreRayleighModel* theRayleighModel = new G4LivermoreRayleighModel();
328 theRayleighModel->SetHighEnergyLimit(LivermoreHighEnergyLimit);
329 theRayleigh->AddEmModel(0, theRayleighModel);
330 pmanager->AddDiscreteProcess(theRayleigh);
331
332 }
333 else if (particleName == "e-")
334 {
335 //electron
336 // process ordering: AddProcess(name, at rest, along step, post step)
337 // -1 = not implemented, then ordering
339 //msc->AddEmModel(0, new G4UrbanMscModel());
341 pmanager->AddProcess(msc, -1, 1, 1);
342
343 // Ionisation
344 G4eIonisation* eIoni = new G4eIonisation();
345 G4LivermoreIonisationModel* theIoniLivermore = new
347 theIoniLivermore->SetHighEnergyLimit(1*CLHEP::MeV);
348 eIoni->AddEmModel(0, theIoniLivermore, new G4UniversalFluctuation() );
349 eIoni->SetStepFunction(0.2, 100*CLHEP::um); //
350 pmanager->AddProcess(eIoni, -1, 2, 2);
351
352 // Bremsstrahlung
354 G4LivermoreBremsstrahlungModel* theBremLivermore = new
356 theBremLivermore->SetHighEnergyLimit(LivermoreHighEnergyLimit);
357 eBrem->AddEmModel(0, theBremLivermore);
358 pmanager->AddProcess(eBrem, -1,-3, 3);
359 }
360 else if (particleName == "e+")
361 {
362 //positron
364 //msc->AddEmModel(0, new G4UrbanMscModel());
366 pmanager->AddProcess(msc, -1, 1, 1);
367 G4eIonisation* eIoni = new G4eIonisation();
368 eIoni->SetStepFunction(0.2, 100*CLHEP::um);
369 pmanager->AddProcess(eIoni, -1, 2, 2);
370 pmanager->AddProcess(new G4eBremsstrahlung, -1,-3, 3);
371 pmanager->AddProcess(new G4eplusAnnihilation,0,-1, 4);
372 }
373 else if( particleName == "mu+" ||
374 particleName == "mu-" )
375 {
376 //muon
377 G4MuMultipleScattering* aMultipleScattering = new G4MuMultipleScattering();
378 pmanager->AddProcess(aMultipleScattering, -1, 1, 1);
379 pmanager->AddProcess(new G4MuIonisation(), -1, 2, 2);
380 pmanager->AddProcess(new G4MuBremsstrahlung(), -1,-1, 3);
381 pmanager->AddProcess(new G4MuPairProduction(), -1,-1, 4);
382 if( particleName == "mu-" )
383 pmanager->AddProcess(new G4MuonMinusCapture(), 0,-1,-1);
384 }
385 else if (particleName == "GenericIon")
386 {
387 pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
388 G4ionIonisation* ionIoni = new G4ionIonisation();
390 ionIoni->SetStepFunction(0.1, 10*CLHEP::um);
391 pmanager->AddProcess(ionIoni, -1, 2, 2);
392 pmanager->AddProcess(new G4NuclearStopping(), -1, 3,-1);
393 }
394 else if (particleName == "alpha" || particleName == "He3")
395 {
396 //MSC, ion-Ionisation, Nuclear Stopping
397 pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
398
399 G4ionIonisation* ionIoni = new G4ionIonisation();
400 ionIoni->SetStepFunction(0.1, 20*CLHEP::um);
401 pmanager->AddProcess(ionIoni, -1, 2, 2);
402 pmanager->AddProcess(new G4NuclearStopping(), -1, 3,-1);
403 }
404 else if (particleName == "proton" ||
405 particleName == "deuteron" ||
406 particleName == "triton" ||
407 particleName == "pi+" ||
408 particleName == "pi-" ||
409 particleName == "kaon+" ||
410 particleName == "kaon-")
411 {
412 //MSC, h-ionisation, bremsstrahlung
413 pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
414 G4hIonisation* hIoni = new G4hIonisation();
415 hIoni->SetStepFunction(0.2, 50*CLHEP::um);
416 pmanager->AddProcess(hIoni, -1, 2, 2);
417 pmanager->AddProcess(new G4hBremsstrahlung, -1,-3, 3);
418 }
419 else if ((!particle->IsShortLived()) &&
420 (charge != 0.0) &&
421 (particle->GetParticleName() != "chargedgeantino"))
422 {
423 //all others charged particles except geantino
424 pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
425 pmanager->AddProcess(new G4hIonisation, -1, 2, 2);
426 }
427
428 }
429}
430
431
432// Optical Processes ////////////////////////////////////////////////////////
433#include "G4Scintillation.hh"
434#include "G4OpAbsorption.hh"
435//#include "G4OpRayleigh.hh"
436#include "G4OpBoundaryProcess.hh"
437
439{
440 // default scintillation process
441 //Coverity report: check that the process is actually used, if not must delete
442 G4bool theScintProcessDefNeverUsed = true;
443 G4Scintillation* theScintProcessDef = new G4Scintillation("Scintillation");
444 // theScintProcessDef->DumpPhysicsTable();
445 theScintProcessDef->SetTrackSecondariesFirst(true);
446 theScintProcessDef->SetVerboseLevel(OpVerbLevel);
447
448 // scintillation process for alpha:
449 G4bool theScintProcessAlphaNeverUsed = true;
450 G4Scintillation* theScintProcessAlpha = new G4Scintillation("Scintillation");
451 // theScintProcessNuc->DumpPhysicsTable();
452 theScintProcessAlpha->SetTrackSecondariesFirst(true);
453 theScintProcessAlpha->SetVerboseLevel(OpVerbLevel);
454
455 // scintillation process for heavy nuclei
456 G4bool theScintProcessNucNeverUsed = true;
457 G4Scintillation* theScintProcessNuc = new G4Scintillation("Scintillation");
458 // theScintProcessNuc->DumpPhysicsTable();
459 theScintProcessNuc->SetTrackSecondariesFirst(true);
460 theScintProcessNuc->SetVerboseLevel(OpVerbLevel);
461
462 // optical processes
463 G4bool theAbsorptionProcessNeverUsed = true;
464 G4OpAbsorption* theAbsorptionProcess = new G4OpAbsorption();
465 // G4OpRayleigh* theRayleighScatteringProcess = new G4OpRayleigh();
466 G4bool theBoundaryProcessNeverUsed = true;
467 G4OpBoundaryProcess* theBoundaryProcess = new G4OpBoundaryProcess();
468 // theAbsorptionProcess->DumpPhysicsTable();
469 // theRayleighScatteringProcess->DumpPhysicsTable();
470 theAbsorptionProcess->SetVerboseLevel(OpVerbLevel);
471 // theRayleighScatteringProcess->SetVerboseLevel(OpVerbLevel);
472 theBoundaryProcess->SetVerboseLevel(OpVerbLevel);
473
474 auto myParticleIterator=G4ParticleTable::GetParticleTable()->GetIterator();
475 myParticleIterator->reset();
476 while( (*(myParticleIterator))() )
477 {
478 G4ParticleDefinition* particle = myParticleIterator->value();
479 G4ProcessManager* pmanager = particle->GetProcessManager();
480 G4String particleName = particle->GetParticleName();
481 if (theScintProcessDef->IsApplicable(*particle)) {
482 // if(particle->GetPDGMass() > 5.0*CLHEP::GeV)
483 if(particle->GetParticleName() == "GenericIon") {
484 pmanager->AddProcess(theScintProcessNuc); // AtRestDiscrete
485 pmanager->SetProcessOrderingToLast(theScintProcessNuc,idxAtRest);
486 pmanager->SetProcessOrderingToLast(theScintProcessNuc,idxPostStep);
487 theScintProcessNucNeverUsed = false;
488 }
489 else if(particle->GetParticleName() == "alpha") {
490 pmanager->AddProcess(theScintProcessAlpha);
491 pmanager->SetProcessOrderingToLast(theScintProcessAlpha,idxAtRest);
492 pmanager->SetProcessOrderingToLast(theScintProcessAlpha,idxPostStep);
493 theScintProcessAlphaNeverUsed = false;
494 }
495 else {
496 pmanager->AddProcess(theScintProcessDef);
497 pmanager->SetProcessOrderingToLast(theScintProcessDef,idxAtRest);
498 pmanager->SetProcessOrderingToLast(theScintProcessDef,idxPostStep);
499 theScintProcessDefNeverUsed = false;
500 }
501 }
502
503 if (particleName == "opticalphoton") {
504 pmanager->AddDiscreteProcess(theAbsorptionProcess);
505 theAbsorptionProcessNeverUsed = false;
506 // pmanager->AddDiscreteProcess(theRayleighScatteringProcess);
507 theBoundaryProcessNeverUsed = false;
508 pmanager->AddDiscreteProcess(theBoundaryProcess);
509 }
510 }
511 if ( theScintProcessDefNeverUsed ) delete theScintProcessDef;
512 if ( theScintProcessAlphaNeverUsed ) delete theScintProcessAlpha;
513 if ( theScintProcessNucNeverUsed ) delete theScintProcessNuc;
514 if ( theBoundaryProcessNeverUsed ) delete theBoundaryProcess;
515 if ( theAbsorptionProcessNeverUsed ) delete theAbsorptionProcess;
516}
517
518
519// Hadronic processes ////////////////////////////////////////////////////////
520
521// Elastic processes:
524#include "G4HadronElastic.hh"
525#include "G4ChipsElasticModel.hh"
527#include "G4AntiNuclElastic.hh"
528#include "G4BGGPionElasticXS.hh"
538
539// Inelastic processes:
541
542// FTFP + BERT model
543#include "G4TheoFSGenerator.hh"
544#include "G4ExcitationHandler.hh"
545#include "G4PreCompoundModel.hh"
547#include "G4FTFModel.hh"
550#include "G4CascadeInterface.hh"
560
561// Neutron high-precision models: <20 MeV
562#include "G4ParticleHPElastic.hh"
564#include "G4ParticleHPCapture.hh"
568#include "G4NeutronCaptureXS.hh"
569#include "G4NeutronRadCapture.hh"
570
571// Binary light ion cascade for alpha, deuteron and triton
573
574// ConstructHad()
575// Makes discrete physics processes for the hadrons, at present limited
576// to those particles with GHEISHA interactions (INTRC > 0).
577// The processes are: Elastic scattering and Inelastic scattering.
578// F.W.Jones 09-JUL-1998
580{
581 // Elastic scattering
582 G4HadronElastic* elastic_lhep0 = new G4HadronElastic();
583 G4ChipsElasticModel* elastic_chip = new G4ChipsElasticModel();
585
586 const G4double elastic_elimitAntiNuc = 100.0*CLHEP::MeV;
587 G4AntiNuclElastic* elastic_anuc = new G4AntiNuclElastic();
588 elastic_anuc->SetMinEnergy( elastic_elimitAntiNuc );
589 G4CrossSectionElastic* elastic_anucxs = new G4CrossSectionElastic( elastic_anuc->GetComponentCrossSection() );
590 G4HadronElastic* elastic_lhep2 = new G4HadronElastic();
591 elastic_lhep2->SetMaxEnergy( elastic_elimitAntiNuc );
592
593 // Inelastic scattering
594 const G4double theFTFMin0 = 0.0*CLHEP::GeV;
595 const G4double theFTFMin1 = 4.0*CLHEP::GeV;
597 const G4double theBERTMin0 = 0.0*CLHEP::GeV;
598 const G4double theBERTMin1 = 19.0*CLHEP::MeV;
599 const G4double theBERTMax = 5.0*CLHEP::GeV;
600 const G4double theHPMin = 0.0*CLHEP::GeV;
601 const G4double theHPMax = 20.0*CLHEP::MeV;
602 const G4double theIonBCMin = 0.0*CLHEP::GeV;
603 const G4double theIonBCMax = 5.0*CLHEP::GeV;
604
605
606 G4FTFModel * theStringModel = new G4FTFModel;
608 theStringModel->SetFragmentationModel( theStringDecay );
609 G4PreCompoundModel * thePreEquilib = new G4PreCompoundModel( new G4ExcitationHandler );
610 G4GeneratorPrecompoundInterface * theCascade = new G4GeneratorPrecompoundInterface( thePreEquilib );
611
612 G4TheoFSGenerator * theFTFModel0 = new G4TheoFSGenerator( "FTFP" );
613 theFTFModel0->SetHighEnergyGenerator( theStringModel );
614 theFTFModel0->SetTransport( theCascade );
615 theFTFModel0->SetMinEnergy( theFTFMin0 );
616 theFTFModel0->SetMaxEnergy( theFTFMax );
617
618 G4TheoFSGenerator * theFTFModel1 = new G4TheoFSGenerator( "FTFP" );
619 theFTFModel1->SetHighEnergyGenerator( theStringModel );
620 theFTFModel1->SetTransport( theCascade );
621 theFTFModel1->SetMinEnergy( theFTFMin1 );
622 theFTFModel1->SetMaxEnergy( theFTFMax );
623
624 G4CascadeInterface * theBERTModel0 = new G4CascadeInterface;
625 theBERTModel0->SetMinEnergy( theBERTMin0 );
626 theBERTModel0->SetMaxEnergy( theBERTMax );
627
628 G4CascadeInterface * theBERTModel1 = new G4CascadeInterface;
629 theBERTModel1->SetMinEnergy( theBERTMin1 );
630 theBERTModel1->SetMaxEnergy( theBERTMax );
631
632 // Binary Cascade
633 G4BinaryLightIonReaction * theIonBC = new G4BinaryLightIonReaction( thePreEquilib );
634 theIonBC->SetMinEnergy( theIonBCMin );
635 theIonBC->SetMaxEnergy( theIonBCMax );
636
638 G4ComponentGGNuclNuclXsc * ggNuclNuclXsec = new G4ComponentGGNuclNuclXsc();
639 G4VCrossSectionDataSet * theGGNuclNuclData = new G4CrossSectionInelastic(ggNuclNuclXsec);
640
641 auto myParticleIterator=G4ParticleTable::GetParticleTable()->GetIterator();
642 myParticleIterator->reset();
643 while ((*(myParticleIterator))())
644 {
645 G4ParticleDefinition* particle = myParticleIterator->value();
646 G4ProcessManager* pmanager = particle->GetProcessManager();
647 G4String particleName = particle->GetParticleName();
648
649 if (particleName == "pi+")
650 {
651 // Elastic scattering
652 G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess;
653 theElasticProcess->AddDataSet( new G4BGGPionElasticXS( particle ) );
654 theElasticProcess->RegisterMe( elastic_he );
655 pmanager->AddDiscreteProcess( theElasticProcess );
656 // Inelastic scattering
657 G4HadronInelasticProcess* theInelasticProcess = new G4HadronInelasticProcess( "inelastic", G4PionPlus::Definition() );
658 theInelasticProcess->AddDataSet( new G4BGGPionInelasticXS( G4PionPlus::Definition() ) );
659 theInelasticProcess->RegisterMe( theFTFModel1 );
660 theInelasticProcess->RegisterMe( theBERTModel0 );
661 pmanager->AddDiscreteProcess( theInelasticProcess );
662 }
663
664 else if (particleName == "pi-")
665 {
666 // Elastic scattering
667 G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess;
668 theElasticProcess->AddDataSet( new G4BGGPionElasticXS( particle ) );
669 theElasticProcess->RegisterMe( elastic_he );
670 pmanager->AddDiscreteProcess( theElasticProcess );
671 // Inelastic scattering
672 G4HadronInelasticProcess* theInelasticProcess = new G4HadronInelasticProcess( "inelastic", G4PionMinus::Definition() );
673 theInelasticProcess->AddDataSet( new G4BGGPionInelasticXS( G4PionMinus::Definition() ) );
674 theInelasticProcess->RegisterMe( theFTFModel1 );
675 theInelasticProcess->RegisterMe( theBERTModel0 );
676 pmanager->AddDiscreteProcess( theInelasticProcess );
677 }
678
679 else if (particleName == "kaon+")
680 {
681 // Elastic scattering
682 G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess;
683 theElasticProcess->RegisterMe( elastic_lhep0 );
684 theElasticProcess->AddDataSet( G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsKaonPlusElasticXS::Default_Name()));
685 pmanager->AddDiscreteProcess( theElasticProcess );
686 // Inelastic scattering
687 G4HadronInelasticProcess* theInelasticProcess = new G4HadronInelasticProcess( "inelastic", G4KaonPlus::Definition() );
688
689 theInelasticProcess->AddDataSet( G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsKaonPlusInelasticXS::Default_Name()));
690 theInelasticProcess->RegisterMe( theFTFModel1 );
691 theInelasticProcess->RegisterMe( theBERTModel0 );
692 pmanager->AddDiscreteProcess( theInelasticProcess );
693 }
694
695 else if (particleName == "kaon0S")
696 {
697 // Elastic scattering
698 G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess;
699 theElasticProcess->RegisterMe( elastic_lhep0 );
700 theElasticProcess->AddDataSet( G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsKaonZeroElasticXS::Default_Name()));
701 pmanager->AddDiscreteProcess( theElasticProcess );
702 // Inelastic scattering
703 G4HadronInelasticProcess* theInelasticProcess = new G4HadronInelasticProcess( "inelastic", G4KaonZeroShort::Definition() );
704 theInelasticProcess->AddDataSet( G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsKaonZeroInelasticXS::Default_Name()));
705 theInelasticProcess->RegisterMe( theFTFModel1 );
706 theInelasticProcess->RegisterMe( theBERTModel0 );
707 pmanager->AddDiscreteProcess( theInelasticProcess );
708 }
709
710 else if (particleName == "kaon0L")
711 {
712 // Elastic scattering
713 G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess;
714 theElasticProcess->RegisterMe( elastic_lhep0 );
715 theElasticProcess->AddDataSet( G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsKaonZeroElasticXS::Default_Name()));
716 pmanager->AddDiscreteProcess( theElasticProcess );
717 // Inelastic scattering
718 //G4KaonZeroLInelasticProcess* theInelasticProcess = new G4KaonZeroLInelasticProcess("inelastic");
719 G4HadronInelasticProcess* theInelasticProcess = new G4HadronInelasticProcess( "inelastic", G4KaonZeroLong::Definition() );
720 theInelasticProcess->AddDataSet( G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsKaonZeroInelasticXS::Default_Name()));
721 theInelasticProcess->RegisterMe( theFTFModel1 );
722 theInelasticProcess->RegisterMe( theBERTModel0 );
723 pmanager->AddDiscreteProcess( theInelasticProcess );
724 }
725
726 else if (particleName == "kaon-")
727 {
728 // Elastic scattering
729 G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess;
730 theElasticProcess->RegisterMe( elastic_lhep0 );
732 pmanager->AddDiscreteProcess( theElasticProcess );
733 // Inelastic scattering
734 G4HadronInelasticProcess* theInelasticProcess = new G4HadronInelasticProcess( "inelastic", G4KaonMinus::Definition() );
735 theInelasticProcess->AddDataSet( G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsKaonMinusInelasticXS::Default_Name()));
736 theInelasticProcess->RegisterMe( theFTFModel1 );
737 theInelasticProcess->RegisterMe( theBERTModel0 );
738 pmanager->AddDiscreteProcess( theInelasticProcess );
739 }
740
741 else if (particleName == "proton")
742 {
743 // Elastic scattering
744 G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess;
745 theElasticProcess->AddDataSet(G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsProtonElasticXS::Default_Name()));
746 theElasticProcess->AddDataSet( new G4BGGNucleonElasticXS( G4Proton::Proton() ) );
747 theElasticProcess->RegisterMe( elastic_chip );
748 pmanager->AddDiscreteProcess( theElasticProcess );
749 // Inelastic scattering
750 G4HadronInelasticProcess* theInelasticProcess = new G4HadronInelasticProcess( "inelastic", G4Proton::Definition() );
751 theInelasticProcess->AddDataSet( new G4BGGNucleonInelasticXS( G4Proton::Proton() ) );
752 theInelasticProcess->RegisterMe( theFTFModel1 );
753 theInelasticProcess->RegisterMe( theBERTModel0 );
754 pmanager->AddDiscreteProcess( theInelasticProcess );
755 }
756
757 else if (particleName == "anti_proton")
758 {
759 // Elastic scattering
760 G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess;
761 theElasticProcess->AddDataSet( elastic_anucxs );
762 theElasticProcess->RegisterMe( elastic_lhep2 );
763 theElasticProcess->RegisterMe( elastic_anuc );
764 pmanager->AddDiscreteProcess( theElasticProcess );
765 // Inelastic scattering
766 G4HadronInelasticProcess* theInelasticProcess = new G4HadronInelasticProcess( "inelastic", G4AntiProton::Definition() );
767 theInelasticProcess->AddDataSet( theAntiNucleonData );
768 theInelasticProcess->RegisterMe( theFTFModel0 );
769 pmanager->AddDiscreteProcess( theInelasticProcess );
770 }
771
772 else if (particleName == "neutron") {
773 // elastic scattering
774 G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess;
776 G4HadronElastic* elastic_neutronChipsModel = new G4ChipsElasticModel();
777 elastic_neutronChipsModel->SetMinEnergy( 19.0*CLHEP::MeV );
778 theElasticProcess->RegisterMe( elastic_neutronChipsModel );
779 G4ParticleHPElastic * theElasticNeutronHP = new G4ParticleHPElastic;
780 theElasticNeutronHP->SetMinEnergy( theHPMin );
781 theElasticNeutronHP->SetMaxEnergy( theHPMax );
782 theElasticProcess->RegisterMe( theElasticNeutronHP );
783 theElasticProcess->AddDataSet( new G4ParticleHPElasticData );
784 pmanager->AddDiscreteProcess( theElasticProcess );
785 // inelastic scattering
786 G4HadronInelasticProcess* theInelasticProcess = new G4HadronInelasticProcess( "inelastic", G4Neutron::Definition() );
787 theInelasticProcess->AddDataSet( new G4BGGNucleonInelasticXS( G4Neutron::Neutron() ) );
788 theInelasticProcess->RegisterMe( theFTFModel1 );
789 theInelasticProcess->RegisterMe( theBERTModel1 );
790 G4ParticleHPInelastic * theNeutronInelasticHPModel = new G4ParticleHPInelastic;
791 theNeutronInelasticHPModel->SetMinEnergy( theHPMin );
792 theNeutronInelasticHPModel->SetMaxEnergy( theHPMax );
793 theInelasticProcess->RegisterMe( theNeutronInelasticHPModel );
794 theInelasticProcess->AddDataSet( new G4ParticleHPInelasticData );
795 pmanager->AddDiscreteProcess(theInelasticProcess);
796 // capture
797 G4NeutronCaptureProcess* theCaptureProcess = new G4NeutronCaptureProcess;
798 G4ParticleHPCapture * theNeutronCaptureHPModel = new G4ParticleHPCapture;
799 theNeutronCaptureHPModel->SetMinEnergy( theHPMin );
800 theNeutronCaptureHPModel->SetMaxEnergy( theHPMax );
801 G4NeutronRadCapture* theNeutronRadCapture = new G4NeutronRadCapture();
802 theNeutronRadCapture->SetMinEnergy(theHPMax*0.99);
803 theCaptureProcess->RegisterMe( theNeutronCaptureHPModel );
804 theCaptureProcess->RegisterMe( theNeutronRadCapture);
805 theCaptureProcess->AddDataSet( new G4ParticleHPCaptureData );
807 pmanager->AddDiscreteProcess(theCaptureProcess);
808 }
809 else if (particleName == "anti_neutron")
810 {
811 // Elastic scattering
812 G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess;
813 theElasticProcess->AddDataSet( elastic_anucxs );
814 theElasticProcess->RegisterMe( elastic_lhep2 );
815 theElasticProcess->RegisterMe( elastic_anuc );
816 pmanager->AddDiscreteProcess( theElasticProcess );
817 // Inelastic scattering
818 G4HadronInelasticProcess* theInelasticProcess = new G4HadronInelasticProcess( "inelastic", G4AntiNeutron::Definition() );
819 theInelasticProcess->AddDataSet( theAntiNucleonData );
820 theInelasticProcess->RegisterMe( theFTFModel0 );
821 pmanager->AddDiscreteProcess( theInelasticProcess );
822 }
823
824 else if (particleName == "deuteron")
825 {
826 // Elastic scattering
827 G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess;
828 theElasticProcess->RegisterMe( elastic_lhep0 );
829 theElasticProcess->AddDataSet( theGGNuclNuclData );
830 pmanager->AddDiscreteProcess( theElasticProcess );
831 // Inelastic scattering
832 G4HadronInelasticProcess* theInelasticProcess = new G4HadronInelasticProcess( "inelastic", G4Deuteron::Definition() );
833 theInelasticProcess->AddDataSet( theGGNuclNuclData );
834 theInelasticProcess->RegisterMe( theFTFModel1 );
835 theInelasticProcess->RegisterMe( theIonBC );
836 pmanager->AddDiscreteProcess( theInelasticProcess );
837 }
838
839 else if (particleName == "triton")
840 {
841 // Elastic scattering
842 G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess;
843 theElasticProcess->RegisterMe( elastic_lhep0 );
844 theElasticProcess->AddDataSet( theGGNuclNuclData );
845 pmanager->AddDiscreteProcess( theElasticProcess );
846 // Inelastic scattering
847 G4HadronInelasticProcess* theInelasticProcess = new G4HadronInelasticProcess( "inelastic", G4Triton::Definition() );
848 theInelasticProcess->AddDataSet( theGGNuclNuclData );
849 theInelasticProcess->RegisterMe( theFTFModel1 );
850 theInelasticProcess->RegisterMe( theIonBC );
851 pmanager->AddDiscreteProcess( theInelasticProcess );
852 }
853
854 else if (particleName == "alpha")
855 {
856 // Elastic scattering
857 G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess;
858 theElasticProcess->RegisterMe( elastic_lhep0 );
859 theElasticProcess->AddDataSet( theGGNuclNuclData );
860 pmanager->AddDiscreteProcess( theElasticProcess );
861 // Inelastic scattering
862 G4HadronInelasticProcess* theInelasticProcess = new G4HadronInelasticProcess( "inelastic", G4Alpha::Definition() );
863 theInelasticProcess->AddDataSet( theGGNuclNuclData );
864 theInelasticProcess->RegisterMe( theFTFModel1 );
865 theInelasticProcess->RegisterMe( theIonBC );
866 pmanager->AddDiscreteProcess( theInelasticProcess );
867 }
868 } // while ((*(myParticleIterator))())
869
870 // Add stopping processes with builder
871 stoppingPhysics->ConstructProcess();
872}
873
874
875// Decays ///////////////////////////////////////////////////////////////////
876#include "G4Decay.hh"
877#include "G4RadioactiveDecay.hh"
878#include "G4IonTable.hh"
879#include "G4Ions.hh"
880
881#include "G4LossTableManager.hh"
883#include "G4NuclearLevelData.hh"
884#include "G4NuclideTable.hh"
885
887
888 // Add Decay Process
889 G4Decay* theDecayProcess = new G4Decay();
890 G4bool theDecayProcessNeverUsed = true; //Check if theDecayProcess will be used
891 auto myParticleIterator=G4ParticleTable::GetParticleTable()->GetIterator();
892 myParticleIterator->reset();
893 while( (*(myParticleIterator))() )
894 {
895 G4ParticleDefinition* particle = myParticleIterator->value();
896 G4ProcessManager* pmanager = particle->GetProcessManager();
897
898 if (theDecayProcess->IsApplicable(*particle) && !particle->IsShortLived())
899 {
900 theDecayProcessNeverUsed = false;
901 pmanager ->AddProcess(theDecayProcess);
902 // set ordering for PostStepDoIt and AtRestDoIt
903 pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
904 pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
905 }
906 }
907
908 // Declare radioactive decay to the GenericIon in the IonTable.
909 const G4IonTable *theIonTable =
911 G4RadioactiveDecay* theRadioactiveDecay = new G4RadioactiveDecay();
912
913 //Fix for activation of RadioactiveDecay, based on G4RadioactiveDecayPhysics
915 param->SetAugerCascade(true);
916 param->AddPhysics("world","G4RadioactiveDecay");
917
919 deex->SetStoreAllLevels(true);
920 deex->SetMaxLifeTime(G4NuclideTable::GetInstance()->GetThresholdOfHalfLife()
921 /std::log(2.));
922
925 if(!ad) {
926 ad = new G4UAtomicDeexcitation();
927 man->SetAtomDeexcitation(ad);
929 }
930
931 for (G4int i=0; i<theIonTable->Entries(); i++)
932 {
933 G4String particleName = theIonTable->GetParticle(i)->GetParticleName();
934 G4String particleType = theIonTable->GetParticle(i)->GetParticleType();
935
936 if (particleName == "GenericIon")
937 {
938 G4ProcessManager* pmanager =
939 theIonTable->GetParticle(i)->GetProcessManager();
940 pmanager->SetVerboseLevel(VerboseLevel);
941 pmanager ->AddProcess(theRadioactiveDecay);
942 pmanager ->SetProcessOrdering(theRadioactiveDecay, idxPostStep);
943 pmanager ->SetProcessOrdering(theRadioactiveDecay, idxAtRest);
944 }
945 }
946 //If we actually never used the process, delete it
947 //From Coverity report
948 if ( theDecayProcessNeverUsed ) delete theDecayProcess;
949}
950
951// Cuts /////////////////////////////////////////////////////////////////////
953{
954
955 if (verboseLevel >1)
956 G4cout << "LBE::SetCuts:";
957
958 if (verboseLevel>0){
959 G4cout << "LBE::SetCuts:";
960 G4cout << "CutLength : "
961 << G4BestUnit(defaultCutValue,"Length") << G4endl;
962 }
963
964 //special for low energy physics
965 G4double lowlimit=250*CLHEP::eV;
967 aPCTable->SetEnergyRange(lowlimit,100*CLHEP::GeV);
968
969 // set cut values for gamma at first and for e- second and next for e+,
970 // because some processes for e+/e- need cut values for gamma
971 SetCutValue(cutForGamma, "gamma");
972 SetCutValue(cutForElectron, "e-");
973 SetCutValue(cutForPositron, "e+");
974
975 // SetCutValue(cutForProton, "proton");
976 // SetCutValue(cutForProton, "anti_proton");
977 // SetCutValue(cutForAlpha, "alpha");
978 // SetCutValue(cutForGenericIon, "GenericIon");
979
980 // SetCutValueForOthers(defaultCutValue);
981
983}
984
@ fUseDistanceToBoundary
@ idxPostStep
@ idxAtRest
#define G4BestUnit(a, b)
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
static G4Alpha * Definition()
Definition: G4Alpha.cc:48
static G4AntiNeutrinoE * AntiNeutrinoEDefinition()
static G4AntiNeutrinoMu * AntiNeutrinoMuDefinition()
static G4AntiNeutron * Definition()
G4ComponentAntiNuclNuclearXS * GetComponentCrossSection()
static G4AntiProton * Definition()
Definition: G4AntiProton.cc:50
static void ConstructParticle()
static G4ChargedGeantino * ChargedGeantinoDefinition()
static const char * Default_Name()
static const char * Default_Name()
static const char * Default_Name()
static const char * Default_Name()
static G4CrossSectionDataSetRegistry * Instance()
virtual G4bool IsApplicable(const G4ParticleDefinition &) override
Definition: G4Decay.cc:88
static G4Deuteron * Definition()
Definition: G4Deuteron.cc:49
static G4Electron * ElectronDefinition()
Definition: G4Electron.cc:88
static G4EmParameters * Instance()
void SetAugerCascade(G4bool val)
void AddPhysics(const G4String &region, const G4String &type)
static G4Gamma * GammaDefinition()
Definition: G4Gamma.cc:80
static G4Geantino * GeantinoDefinition()
Definition: G4Geantino.cc:81
void SetMinEnergy(G4double anEnergy)
void SetMaxEnergy(const G4double anEnergy)
static G4HadronicParameters * Instance()
G4double GetMaxEnergy() const
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
void RegisterMe(G4HadronicInteraction *a)
static void ConstructParticle()
G4ParticleDefinition * GetParticle(G4int index) const
Definition: G4IonTable.cc:1905
G4int Entries() const
Definition: G4IonTable.cc:1962
static G4KaonMinus * Definition()
Definition: G4KaonMinus.cc:53
static G4KaonPlus * Definition()
Definition: G4KaonPlus.cc:53
static G4KaonZeroLong * Definition()
static G4KaonZeroShort * Definition()
void SetAtomDeexcitation(G4VAtomDeexcitation *)
static G4LossTableManager * Instance()
G4VAtomDeexcitation * AtomDeexcitation()
static void ConstructParticle()
static G4MuonMinus * MuonMinusDefinition()
Definition: G4MuonMinus.cc:94
static G4MuonPlus * MuonPlusDefinition()
Definition: G4MuonPlus.cc:93
static G4NeutrinoE * NeutrinoEDefinition()
Definition: G4NeutrinoE.cc:79
static G4NeutrinoMu * NeutrinoMuDefinition()
Definition: G4NeutrinoMu.cc:79
static const char * Default_Name()
static G4Neutron * Neutron()
Definition: G4Neutron.cc:103
static G4Neutron * Definition()
Definition: G4Neutron.cc:53
G4DeexPrecoParameters * GetParameters()
static G4NuclearLevelData * GetInstance()
static G4NuclideTable * GetInstance()
void SetVerboseLevel(G4int)
static G4OpticalPhoton * OpticalPhotonDefinition()
G4ProcessManager * GetProcessManager() const
const G4String & GetParticleType() const
G4double GetPDGCharge() const
const G4String & GetParticleName() const
void reset(G4bool ifSkipIon=true)
G4IonTable * GetIonTable() const
G4PTblDicIterator * GetIterator() const
static G4ParticleTable * GetParticleTable()
static G4PionMinus * Definition()
Definition: G4PionMinus.cc:51
static G4PionPlus * Definition()
Definition: G4PionPlus.cc:51
static G4Positron * PositronDefinition()
Definition: G4Positron.cc:88
void SetProcessOrdering(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt, G4int ordDoIt=ordDefault)
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
void SetVerboseLevel(G4int value)
G4int AddProcess(G4VProcess *aProcess, G4int ordAtRestDoIt=ordInActive, G4int ordAlongSteptDoIt=ordInActive, G4int ordPostStepDoIt=ordInActive)
void SetProcessOrderingToLast(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt)
void SetEnergyRange(G4double lowedge, G4double highedge)
static G4ProductionCutsTable * GetProductionCutsTable()
static G4Proton * Definition()
Definition: G4Proton.cc:48
static G4Proton * Proton()
Definition: G4Proton.cc:92
void SetTrackSecondariesFirst(const G4bool state)
void SetVerboseLevel(G4int)
G4bool IsApplicable(const G4ParticleDefinition &aParticleType) override
virtual void ConstructParticle() override
virtual void ConstructProcess() override
void SetTransport(G4VIntraNuclearTransportModel *const value)
void SetHighEnergyGenerator(G4VHighEnergyGenerator *const value)
static G4Triton * Definition()
Definition: G4Triton.cc:49
void SetHighEnergyLimit(G4double)
Definition: G4VEmModel.hh:746
void AddEmModel(G4int, G4VEmModel *, const G4Region *region=nullptr)
void AddEmModel(G4int, G4VEmModel *, G4VEmFluctuationModel *fluc=nullptr, const G4Region *region=nullptr)
void SetStepFunction(G4double v1, G4double v2)
void SetEmModel(G4VEmModel *, G4int index=0)
void SetVerboseLevel(G4int value)
void SetStepLimitType(G4MscStepLimitType val)
void SetFragmentationModel(G4VStringFragmentation *aModel)
void SetCutValue(G4double aCut, const G4String &pname)
void DumpCutValuesTable(G4int flag=1)
virtual void ConstructEM()
Definition: LBE.cc:287
virtual void ConstructParticle()
Definition: LBE.cc:109
virtual void AddTransportation()
Definition: LBE.cc:217
virtual void ConstructProcess()
Definition: LBE.cc:203
virtual void ConstructOp()
Definition: LBE.cc:438
LBE(G4int ver=1)
Definition: LBE.cc:77
virtual ~LBE()
Definition: LBE.cc:102
virtual void SetCuts()
Definition: LBE.cc:952
virtual void ConstructHad()
Definition: LBE.cc:579
virtual void ConstructGeneral()
Definition: LBE.cc:886