BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSModularPhysicsList.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3University of London 2001 - 2024.
4
5This file is part of BDSIM.
6
7BDSIM is free software: you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published
9by the Free Software Foundation version 3 of the License.
10
11BDSIM is distributed in the hope that it will be useful, but
12WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
18*/
19#ifndef BDSMODULARPHYSICSLIST_H
20#define BDSMODULARPHYSICSLIST_H
21
22#include "G4VModularPhysicsList.hh"
23
24#include <map>
25#include <string>
26#include <vector>
27
31class G4OpticalPhysics;
32class G4VPhysicsConstructor;
33
34namespace GMAD {
35 class PhysicsBiasing;
36 template<typename T> class FastList;
37}
38
54class BDSModularPhysicsList: public G4VModularPhysicsList
55{
56public:
57 BDSModularPhysicsList() = delete;
58 explicit BDSModularPhysicsList(const G4String& physicsList);
59 virtual ~BDSModularPhysicsList();
60
63 virtual void ConstructParticle();
64
67 virtual void ConstructProcess();
68
70 void Print();
71
72 inline G4bool UsingIons() const {return usingIons;}
73
74private:
79
82
84 void ConstructAllMesons();
85
88
90 void ConstructAllIons();
91
99
101 void ParsePhysicsList(const G4String& physListName);
102
105 void ConfigurePhysics();
106
109 void ConfigureOptical();
110
113 void CheckIncompatiblePhysics(const G4String& singlePhysicsIn) const;
114
117
120
122 std::map<std::string, Constructor> physicsConstructors;
123
126 std::vector<G4String> physicsLists;
127
131 std::map<G4String, G4bool> physicsActivated;
132
134 std::map<G4String, std::vector<G4String> > incompatible;
135
137 std::map<G4String, G4String> aliasToOriginal;
138
139 G4OpticalPhysics* opticalPhysics;
140 std::vector<G4VPhysicsConstructor*> constructors;
141
144
147
149 mutable G4bool usingIons;
150
151 G4bool particlesConstructed;
152
155 void AllParticles();
156
158 void AnnihiToMuMu();
159 void ChargeExchange();
160 void Cherenkov();
161 void CutsAndLimits();
162 void Decay();
163 void DecayRadioactive();
164 void Em();
165 void EmExtra();
166 void EmLivermore();
168 void EmLowEP();
169 void EmPenelope();
170 void EmSS();
171 void EmWVI();
172 void Em1();
173 void Em2();
174 void Em3();
175 void Em4();
176 void FTFPBERT();
177 void FTFPBERTHP();
178 void FTFBIC();
179 void GammaToMuMu();
180 void HadronicElastic();
181 void HadronicElasticD();
182 void HadronicElasticH();
183 void HadronicElasticHP();
184 void HadronicElasticLEND();
185 void HadronicElasticXS();
186 void Ion();
187 void IonBinary();
188 void IonElastic();
189 void IonElasticQMD();
190 void IonEMDissociation();
191 void IonINCLXX();
192 void Ionisation();
193 void LaserWire();
198 void LaserIonExcitation();
199 void Muon();
200 void MuonInelastic();
201 void NeutronTrackingCut();
202 void Optical();
203 void QGSPBERT();
204 void QGSPBERTHP();
205 void QGSPBIC();
206 void QGSPBICHP();
207 void Shielding();
208 void Stopping();
209 void SynchRad();
210#if G4VERSION_NUMBER > 1019
211 void EmGS();
212 void DNAChemistry();
213#endif
214#if G4VERSION_NUMBER > 1020
215 void DecaySpin();
216#endif
217#if G4VERSION_NUMBER > 1022
218 void IonPHP();
219#endif
220#if G4VERSION_NUMBER > 1029
221 void DecayMuonicAtom();
222#endif
223#if G4VERSION_NUMBER > 1039
224 void Channelling();
225 void DNA();
226 void Radioactivation();
227 void ShieldingLEND();
228#endif
229#if G4VERSION_NUMBER > 1119
230 void XrayReflection();
231#endif
233};
234
235#endif
A class that holds global options and constants.
Modular physics list based on Geant4 constructors.
void ConstructAllShortLived()
Construct resonances and quarks - sometimes required explicitly.
void ShieldingLEND()
Physics constructor loader.
void MuonInelastic()
Physics constructor loader.
G4bool constructedAllBaryons
Cached flag to avoid repeated construction.
void Em1()
Physics constructor loader.
void EmLivermorePolarised()
Physics constructor loader.
void Optical()
Physics constructor loader.
void HadronicElasticHP()
Physics constructor loader.
void Em2()
Physics constructor loader.
void IonBinary()
Physics constructor loader.
void ConstructAllIons()
Construct ions.
void HadronicElasticXS()
Physics constructor loader.
void IonINCLXX()
Physics constructor loader.
void LaserComptonScattering()
Physics constructor loader.
void ParsePhysicsList(const G4String &physListName)
Interpret the string of physics lists given from the user through the parser.
void Em3()
Physics constructor loader.
void Stopping()
Physics constructor loader.
void LaserWire()
Physics constructor loader.
void EmLowEP()
Physics constructor loader.
G4bool constructedAllIons
Cached flag to avoid repeated construction.
void EmWVI()
Physics constructor loader.
void DNAChemistry()
Physics constructor loader.
BDSGlobalConstants * globals
Keep a local reference to global constants to avoid getting it all the time.
G4bool usingIons
Flag telling whether ions are being used either in physics list or in beam particle.
void CheckIncompatiblePhysics(const G4String &singlePhysicsIn) const
void Ion()
Physics constructor loader.
void Cherenkov()
Physics constructor loader.
void ChargeExchange()
Physics constructor loader.
std::map< G4String, std::vector< G4String > > incompatible
Map of incompatible physics lists by our name for each individual list.
void DecayMuonicAtom()
Physics constructor loader.
void DecayRadioactive()
Physics constructor loader.
void DNA()
Physics constructor loader.
void HadronicElasticH()
Physics constructor loader.
G4String temporaryName
Temporary string used to pass name to constructor functions.
void IonEMDissociation()
Physics constructor loader.
std::map< G4String, G4bool > physicsActivated
void Em4()
Physics constructor loader.
void EmExtra()
Physics constructor loader.
void HadronicElasticLEND()
Physics constructor loader.
void Radioactivation()
Physics constructor loader.
void QGSPBICHP()
Physics constructor loader.
void IonElastic()
Physics constructor loader.
void Muon()
Physics constructor loader.
void LaserPhotoDetachment()
Physics constructor loader.
void NeutronTrackingCut()
Physics constructor loader.
void Ionisation()
Physics constructor loader.
void LaserCumulativePhotoDetachment()
Physics constructor loader.
void ConstructAllBaryons()
Construct baryons.
void QGSPBERTHP()
Physics constructor loader.
void IonPHP()
Physics constructor loader.
G4bool constructedAllLeptons
Cached flag to avoid repeated construction.
void Decay()
Physics constructor loader.
void FTFBIC()
Physics constructor loader.
void EmSS()
Physics constructor loader.
void FTFPBERT()
Physics constructor loader.
void XrayReflection()
Physics constructor loader.
void AnnihiToMuMu()
Physics constructor loader.
void QGSPBIC()
Physics constructor loader.
void LaserIonExcitation()
Physics constructor loader.
void GammaToMuMu()
Physics constructor loader.
void CutsAndLimits()
Physics constructor loader.
void Em()
Physics constructor loader.
void EmPenelope()
Physics constructor loader.
void HadronicElastic()
Physics constructor loader.
G4bool emWillBeUsed
Flag as to whether em will be used - avoids duplicate processes being registered.
void HadronicElasticD()
Physics constructor loader.
G4bool constructedAllShortLived
Cached flag to avoid repeated construction.
void DecaySpin()
Physics constructor loader.
void FTFPBERTHP()
Physics constructor loader.
void EmLivermore()
Physics constructor loader.
void IonElasticQMD()
Physics constructor loader.
std::map< std::string, Constructor > physicsConstructors
A map of physics list names to their constructors.
std::vector< G4String > physicsLists
void Channelling()
Physics constructor loader.
G4bool constructedAllMesons
Cached flag to avoid repeated construction.
void QGSPBERT()
Physics constructor loader.
void Shielding()
Physics constructor loader.
void EmGS()
Physics constructor loader.
void ConstructAllMesons()
Construct mesons.
void LaserCumulativeCompton()
Physics constructor loader.
void(BDSModularPhysicsList::* Constructor)()
Typedef for function pointers to simplify syntax.
void Print()
Print out which physics lists are activated.
std::map< G4String, G4String > aliasToOriginal
Map of possible aliases for a given physics list.
void SynchRad()
Physics constructor loader.
Wrapper for particle definition.
Parser namespace for GMAD language. Combination of Geant4 and MAD.