BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Modular physics list based on Geant4 constructors. More...
#include <BDSModularPhysicsList.hh>
Public Member Functions | |
BDSModularPhysicsList (const G4String &physicsList) | |
virtual void | ConstructParticle () |
virtual void | ConstructProcess () |
void | Print () |
Print out which physics lists are activated. | |
G4bool | UsingIons () const |
Private Types | |
typedef void(BDSModularPhysicsList::* | Constructor) () |
Typedef for function pointers to simplify syntax. | |
Private Member Functions | |
void | ConstructAllLeptons () |
void | ConstructAllShortLived () |
Construct resonances and quarks - sometimes required explicitly. | |
void | ConstructAllMesons () |
Construct mesons. | |
void | ConstructAllBaryons () |
Construct baryons. | |
void | ConstructAllIons () |
Construct ions. | |
void | ParsePhysicsList (const G4String &physListName) |
Interpret the string of physics lists given from the user through the parser. | |
void | ConfigurePhysics () |
void | ConfigureOptical () |
void | CheckIncompatiblePhysics (const G4String &singlePhysicsIn) const |
void | AllParticles () |
void | AnnihiToMuMu () |
Physics constructor loader. | |
void | ChargeExchange () |
Physics constructor loader. | |
void | Cherenkov () |
Physics constructor loader. | |
void | CutsAndLimits () |
Physics constructor loader. | |
void | Decay () |
Physics constructor loader. | |
void | DecayRadioactive () |
Physics constructor loader. | |
void | Em () |
Physics constructor loader. | |
void | EmExtra () |
Physics constructor loader. | |
void | EmLivermore () |
Physics constructor loader. | |
void | EmLivermorePolarised () |
Physics constructor loader. | |
void | EmLowEP () |
Physics constructor loader. | |
void | EmPenelope () |
Physics constructor loader. | |
void | EmSS () |
Physics constructor loader. | |
void | EmWVI () |
Physics constructor loader. | |
void | Em1 () |
Physics constructor loader. | |
void | Em2 () |
Physics constructor loader. | |
void | Em3 () |
Physics constructor loader. | |
void | Em4 () |
Physics constructor loader. | |
void | FTFPBERT () |
Physics constructor loader. | |
void | FTFPBERTHP () |
Physics constructor loader. | |
void | GammaToMuMu () |
Physics constructor loader. | |
void | HadronicElastic () |
Physics constructor loader. | |
void | HadronicElasticD () |
Physics constructor loader. | |
void | HadronicElasticH () |
Physics constructor loader. | |
void | HadronicElasticHP () |
Physics constructor loader. | |
void | HadronicElasticLEND () |
Physics constructor loader. | |
void | HadronicElasticXS () |
Physics constructor loader. | |
void | Ion () |
Physics constructor loader. | |
void | IonBinary () |
Physics constructor loader. | |
void | IonElastic () |
Physics constructor loader. | |
void | IonElasticQMD () |
Physics constructor loader. | |
void | IonEMDissociation () |
Physics constructor loader. | |
void | IonINCLXX () |
Physics constructor loader. | |
void | LaserWire () |
Physics constructor loader. | |
void | Muon () |
Physics constructor loader. | |
void | MuonInelastic () |
Physics constructor loader. | |
void | NeutronTrackingCut () |
Physics constructor loader. | |
void | Optical () |
Physics constructor loader. | |
void | QGSPBERT () |
Physics constructor loader. | |
void | QGSPBERTHP () |
Physics constructor loader. | |
void | QGSPBIC () |
Physics constructor loader. | |
void | QGSPBICHP () |
Physics constructor loader. | |
void | Shielding () |
Physics constructor loader. | |
void | Stopping () |
Physics constructor loader. | |
void | SynchRad () |
Physics constructor loader. | |
void | EmGS () |
Physics constructor loader. | |
void | DecaySpin () |
Physics constructor loader. | |
void | IonPHP () |
Physics constructor loader. | |
void | DecayMuonicAtom () |
Physics constructor loader. | |
void | Channelling () |
Physics constructor loader. | |
void | DNA () |
Physics constructor loader. | |
void | Radioactivation () |
Physics constructor loader. | |
void | ShieldingLEND () |
Physics constructor loader. | |
Private Attributes | |
G4String | temporaryName |
Temporary string used to pass name to constructor functions. | |
std::map< std::string, Constructor > | physicsConstructors |
A map of physics list names to their constructors. | |
std::vector< G4String > | physicsLists |
std::map< G4String, G4bool > | physicsActivated |
std::map< G4String, std::vector< G4String > > | incompatible |
Map of incompatible physics lists by our name for each individual list. | |
std::map< G4String, G4String > | aliasToOriginal |
Map of possible aliases for a given physics list. | |
G4OpticalPhysics * | opticalPhysics |
std::vector< G4VPhysicsConstructor * > | constructors |
BDSGlobalConstants * | globals |
Keep a local reference to global constants to avoid getting it all the time. | |
G4bool | emWillBeUsed |
Flag as to whether em will be used - avoids duplicate processes being registered. | |
G4bool | usingIons |
Flag telling whether ions are being used either in physics list or in beam particle. | |
Modular physics list based on Geant4 constructors.
Dynamically construct phyiscs process constructors based on key words in parser physics list option. Being modular, these can be built up and added to individually to give the required set of physics processes. Note: the transportation process is constructed by default with classes that derive from G4VModularPhysicsList.
Note, Geant4 will call the ConstructParticle method before ConstructProcess, so we're guaranteed that decay physics for example will apply to all particles.
Definition at line 54 of file BDSModularPhysicsList.hh.
|
private |
Typedef for function pointers to simplify syntax.
Definition at line 108 of file BDSModularPhysicsList.hh.
|
explicit |
Definition at line 156 of file BDSModularPhysicsList.cc.
|
virtual |
Definition at line 320 of file BDSModularPhysicsList.cc.
|
private |
Unique physics constructor that doesn't add physics processes but only forces the immediate construction of all particles. See implementation for constructors called.
Definition at line 483 of file BDSModularPhysicsList.cc.
References ConstructAllBaryons(), ConstructAllIons(), ConstructAllLeptons(), ConstructAllMesons(), and ConstructAllShortLived().
Referenced by Shielding().
|
private |
Physics constructor loader.
Definition at line 492 of file BDSModularPhysicsList.cc.
References physicsActivated.
|
private |
Physics constructor loader.
Definition at line 1103 of file BDSModularPhysicsList.cc.
References physicsActivated.
|
private |
Physics constructor loader.
Definition at line 501 of file BDSModularPhysicsList.cc.
References ConstructAllIons(), and physicsActivated.
|
private |
Check whether the supplied physics name conflicts with any already activated and print out a warning and exit if so.
Definition at line 464 of file BDSModularPhysicsList.cc.
References incompatible, and physicsActivated.
Referenced by ParsePhysicsList().
|
private |
Physics constructor loader.
Definition at line 511 of file BDSModularPhysicsList.cc.
References Em(), BDSGlobalConstants::Instance(), and physicsActivated.
|
private |
Delegate function for the specific optical physics processes controllable from the parser.
< Scintillation process index
< Absorption process index
< Rayleigh scattering process index
< Mie scattering process index
< Boundary process index
< Wave Length Shifting process index
Definition at line 435 of file BDSModularPhysicsList.cc.
References globals.
Referenced by ConfigurePhysics().
|
private |
Set particular options for various physics lists from the parser. This is currently only done for the optical physics list.
Definition at line 429 of file BDSModularPhysicsList.cc.
References ConfigureOptical().
|
private |
Construct baryons.
Definition at line 417 of file BDSModularPhysicsList.cc.
Referenced by AllParticles(), EmExtra(), Ion(), IonBinary(), IonElastic(), IonElasticQMD(), IonEMDissociation(), IonINCLXX(), and IonPHP().
|
private |
Construct ions.
Definition at line 422 of file BDSModularPhysicsList.cc.
References usingIons.
Referenced by AllParticles(), ChargeExchange(), DecayMuonicAtom(), EmExtra(), Ion(), IonBinary(), IonElastic(), IonElasticQMD(), IonEMDissociation(), IonINCLXX(), IonPHP(), and Stopping().
|
private |
Neutrinos are not constructed by default in many (most) physics lists yet this results in crashes when they're produced but not defined by physics processes, so purposively define for ones where it's a problem.
Definition at line 402 of file BDSModularPhysicsList.cc.
Referenced by AllParticles(), DecayMuonicAtom(), Em(), Em1(), Em2(), Em3(), Em4(), EmExtra(), EmGS(), EmLivermore(), EmLivermorePolarised(), EmLowEP(), EmPenelope(), EmSS(), EmWVI(), FTFPBERT(), FTFPBERTHP(), HadronicElastic(), HadronicElasticD(), HadronicElasticH(), HadronicElasticHP(), HadronicElasticLEND(), HadronicElasticXS(), Ion(), IonBinary(), IonElastic(), IonElasticQMD(), IonEMDissociation(), IonINCLXX(), IonPHP(), QGSPBERT(), QGSPBERTHP(), QGSPBIC(), QGSPBICHP(), and SynchRad().
|
private |
Construct mesons.
Definition at line 412 of file BDSModularPhysicsList.cc.
Referenced by AllParticles(), EmExtra(), Ion(), IonBinary(), IonElastic(), IonElasticQMD(), IonEMDissociation(), IonINCLXX(), and IonPHP().
|
private |
Construct resonances and quarks - sometimes required explicitly.
Definition at line 407 of file BDSModularPhysicsList.cc.
Referenced by AllParticles(), EmExtra(), Ion(), IonBinary(), IonElastic(), IonElasticQMD(), IonEMDissociation(), IonINCLXX(), IonPHP(), and Stopping().
|
virtual |
Call base class method to construct all particles from constructors, but also set the particle definition and rigidity in globals.
Definition at line 323 of file BDSModularPhysicsList.cc.
References BDS::ConstructMinimumParticleSet().
|
virtual |
Call base class method to construct all processes from constructors, but also set cuts and print physics table.
Definition at line 329 of file BDSModularPhysicsList.cc.
|
private |
Physics constructor loader.
Definition at line 523 of file BDSModularPhysicsList.cc.
References BDSGlobalConstants::Instance(), and physicsActivated.
Referenced by ParsePhysicsList().
|
private |
Physics constructor loader.
Definition at line 532 of file BDSModularPhysicsList.cc.
References physicsActivated.
|
private |
Physics constructor loader.
Definition at line 1059 of file BDSModularPhysicsList.cc.
References ConstructAllIons(), ConstructAllLeptons(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 541 of file BDSModularPhysicsList.cc.
References physicsActivated.
|
private |
Physics constructor loader.
Definition at line 1030 of file BDSModularPhysicsList.cc.
References physicsActivated.
|
private |
Physics constructor loader.
Definition at line 1074 of file BDSModularPhysicsList.cc.
References physicsActivated, BDS::StrContains(), and temporaryName.
|
private |
Physics constructor loader.
Definition at line 550 of file BDSModularPhysicsList.cc.
References ConstructAllLeptons(), and physicsActivated.
Referenced by Cherenkov().
|
private |
Physics constructor loader.
Definition at line 666 of file BDSModularPhysicsList.cc.
References ConstructAllLeptons(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 676 of file BDSModularPhysicsList.cc.
References ConstructAllLeptons(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 686 of file BDSModularPhysicsList.cc.
References ConstructAllLeptons(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 696 of file BDSModularPhysicsList.cc.
References ConstructAllLeptons(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 560 of file BDSModularPhysicsList.cc.
References BDS::CheckLowEnergyNeutronDataExists(), ConstructAllBaryons(), ConstructAllIons(), ConstructAllLeptons(), ConstructAllMesons(), ConstructAllShortLived(), BDSGlobalConstants::Instance(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 1018 of file BDSModularPhysicsList.cc.
References ConstructAllLeptons(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 606 of file BDSModularPhysicsList.cc.
References ConstructAllLeptons(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 616 of file BDSModularPhysicsList.cc.
References ConstructAllLeptons(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 626 of file BDSModularPhysicsList.cc.
References ConstructAllLeptons(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 636 of file BDSModularPhysicsList.cc.
References ConstructAllLeptons(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 646 of file BDSModularPhysicsList.cc.
References ConstructAllLeptons(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 656 of file BDSModularPhysicsList.cc.
References ConstructAllLeptons(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 706 of file BDSModularPhysicsList.cc.
References ConstructAllLeptons(), HadronicElastic(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 717 of file BDSModularPhysicsList.cc.
References ConstructAllLeptons(), HadronicElastic(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 728 of file BDSModularPhysicsList.cc.
References physicsActivated.
|
private |
Physics constructor loader.
Definition at line 737 of file BDSModularPhysicsList.cc.
References ConstructAllLeptons(), and physicsActivated.
Referenced by FTFPBERT(), and FTFPBERTHP().
|
private |
Physics constructor loader.
Definition at line 747 of file BDSModularPhysicsList.cc.
References ConstructAllLeptons(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 757 of file BDSModularPhysicsList.cc.
References ConstructAllLeptons(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 767 of file BDSModularPhysicsList.cc.
References ConstructAllLeptons(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 777 of file BDSModularPhysicsList.cc.
References BDS::CheckLowEnergyNeutronDataExists(), ConstructAllLeptons(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 788 of file BDSModularPhysicsList.cc.
References ConstructAllLeptons(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 798 of file BDSModularPhysicsList.cc.
References ConstructAllBaryons(), ConstructAllIons(), ConstructAllLeptons(), ConstructAllMesons(), ConstructAllShortLived(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 813 of file BDSModularPhysicsList.cc.
References BDS::CheckHighPrecisionDataExists(), ConstructAllBaryons(), ConstructAllIons(), ConstructAllLeptons(), ConstructAllMesons(), ConstructAllShortLived(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 830 of file BDSModularPhysicsList.cc.
References ConstructAllBaryons(), ConstructAllIons(), ConstructAllLeptons(), ConstructAllMesons(), ConstructAllShortLived(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 846 of file BDSModularPhysicsList.cc.
References ConstructAllBaryons(), ConstructAllIons(), ConstructAllLeptons(), ConstructAllMesons(), ConstructAllShortLived(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 861 of file BDSModularPhysicsList.cc.
References ConstructAllBaryons(), ConstructAllIons(), ConstructAllLeptons(), ConstructAllMesons(), ConstructAllShortLived(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 875 of file BDSModularPhysicsList.cc.
References BDS::CheckHighPrecisionDataExists(), ConstructAllBaryons(), ConstructAllIons(), ConstructAllLeptons(), ConstructAllMesons(), ConstructAllShortLived(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 1041 of file BDSModularPhysicsList.cc.
References BDS::CheckHighPrecisionDataExists(), ConstructAllBaryons(), ConstructAllIons(), ConstructAllLeptons(), ConstructAllMesons(), ConstructAllShortLived(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 891 of file BDSModularPhysicsList.cc.
References physicsActivated.
|
private |
Physics constructor loader.
Definition at line 900 of file BDSModularPhysicsList.cc.
References emWillBeUsed, and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 909 of file BDSModularPhysicsList.cc.
References physicsActivated.
|
private |
Physics constructor loader.
Definition at line 918 of file BDSModularPhysicsList.cc.
References BDSGlobalConstants::Instance(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 934 of file BDSModularPhysicsList.cc.
References physicsActivated.
|
private |
Interpret the string of physics lists given from the user through the parser.
Definition at line 344 of file BDSModularPhysicsList.cc.
References aliasToOriginal, CheckIncompatiblePhysics(), CutsAndLimits(), emWillBeUsed, BDS::LowerCase(), physicsConstructors, physicsLists, and temporaryName.
void BDSModularPhysicsList::Print | ( | ) |
Print out which physics lists are activated.
Definition at line 335 of file BDSModularPhysicsList.cc.
References physicsActivated.
|
private |
Physics constructor loader.
Definition at line 944 of file BDSModularPhysicsList.cc.
References ConstructAllLeptons(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 954 of file BDSModularPhysicsList.cc.
References ConstructAllLeptons(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 964 of file BDSModularPhysicsList.cc.
References ConstructAllLeptons(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 974 of file BDSModularPhysicsList.cc.
References ConstructAllLeptons(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 1115 of file BDSModularPhysicsList.cc.
References physicsActivated.
|
private |
Physics constructor loader.
Definition at line 984 of file BDSModularPhysicsList.cc.
References AllParticles(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 1124 of file BDSModularPhysicsList.cc.
References BDS::CheckLowEnergyNeutronDataExists(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 996 of file BDSModularPhysicsList.cc.
References ConstructAllIons(), ConstructAllShortLived(), and physicsActivated.
|
private |
Physics constructor loader.
Definition at line 1007 of file BDSModularPhysicsList.cc.
References ConstructAllLeptons(), and physicsActivated.
|
inline |
Definition at line 72 of file BDSModularPhysicsList.hh.
|
private |
Map of possible aliases for a given physics list.
Definition at line 129 of file BDSModularPhysicsList.hh.
Referenced by ParsePhysicsList().
|
private |
Definition at line 132 of file BDSModularPhysicsList.hh.
|
private |
Flag as to whether em will be used - avoids duplicate processes being registered.
Definition at line 138 of file BDSModularPhysicsList.hh.
Referenced by Muon(), and ParsePhysicsList().
|
private |
Keep a local reference to global constants to avoid getting it all the time.
Definition at line 135 of file BDSModularPhysicsList.hh.
Referenced by ConfigureOptical().
|
private |
Map of incompatible physics lists by our name for each individual list.
Definition at line 126 of file BDSModularPhysicsList.hh.
Referenced by CheckIncompatiblePhysics().
|
private |
Definition at line 131 of file BDSModularPhysicsList.hh.
|
private |
Many physics lists require other physics lists - keep a record of which ones have been activated and if the required ones haven't, activate them. This is also constructed from the physicsConstructors map.
Definition at line 123 of file BDSModularPhysicsList.hh.
Referenced by AnnihiToMuMu(), Channelling(), ChargeExchange(), CheckIncompatiblePhysics(), Cherenkov(), CutsAndLimits(), Decay(), DecayMuonicAtom(), DecayRadioactive(), DecaySpin(), DNA(), Em(), Em1(), Em2(), Em3(), Em4(), EmExtra(), EmGS(), EmLivermore(), EmLivermorePolarised(), EmLowEP(), EmPenelope(), EmSS(), EmWVI(), FTFPBERT(), FTFPBERTHP(), GammaToMuMu(), HadronicElastic(), HadronicElasticD(), HadronicElasticH(), HadronicElasticHP(), HadronicElasticLEND(), HadronicElasticXS(), Ion(), IonBinary(), IonElastic(), IonElasticQMD(), IonEMDissociation(), IonINCLXX(), IonPHP(), LaserWire(), Muon(), MuonInelastic(), NeutronTrackingCut(), Optical(), Print(), QGSPBERT(), QGSPBERTHP(), QGSPBIC(), QGSPBICHP(), Radioactivation(), Shielding(), ShieldingLEND(), Stopping(), and SynchRad().
|
private |
A map of physics list names to their constructors.
Definition at line 114 of file BDSModularPhysicsList.hh.
Referenced by ParsePhysicsList().
|
private |
A vector of all the physics list names for searching. This is constructed from the above map physicsConstructors.
Definition at line 118 of file BDSModularPhysicsList.hh.
Referenced by ParsePhysicsList().
|
private |
Temporary string used to pass name to constructor functions.
Definition at line 111 of file BDSModularPhysicsList.hh.
Referenced by DNA(), and ParsePhysicsList().
|
mutableprivate |
Flag telling whether ions are being used either in physics list or in beam particle.
Definition at line 141 of file BDSModularPhysicsList.hh.
Referenced by ConstructAllIons().