ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PhysicsList.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PhysicsList.cc
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 //
28 //
29 //
30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32 
33 #include "PhysicsList.hh"
34 #include "PhysicsListMessenger.hh"
35 
36 #include "PhysListEmStandard.hh"
37 #include "PhysListEm5DStandard.hh"
38 #include "PhysListEm19DStandard.hh"
39 
40 #include "G4EmStandardPhysics.hh"
46 #include "G4EmStandardPhysicsGS.hh"
47 #include "G4EmStandardPhysicsSS.hh"
48 
49 #include "G4EmLivermorePhysics.hh"
50 #include "G4EmPenelopePhysics.hh"
51 #include "G4EmLowEPPhysics.hh"
52 
53 #include "G4EmDNAPhysics.hh"
57 
59 
60 #include "G4DecayPhysics.hh"
61 #include "StepMax.hh"
62 
63 #include "G4UnitsTable.hh"
64 #include "G4SystemOfUnits.hh"
65 
66 #include "G4ParticleDefinition.hh"
67 #include "G4ProcessManager.hh"
68 
69 // particles
70 
71 #include "G4BosonConstructor.hh"
72 #include "G4LeptonConstructor.hh"
73 #include "G4MesonConstructor.hh"
74 #include "G4BosonConstructor.hh"
75 #include "G4BaryonConstructor.hh"
76 #include "G4IonConstructor.hh"
79 
80 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
81 
83  fHadPhysicsList(nullptr)
84 {
85  fMessenger = new PhysicsListMessenger(this);
86  SetVerboseLevel(1);
87 
88  // EM physics
89  fEmName = G4String("emstandard_opt4");
91 
92  // Decay physics
94 
96 }
97 
98 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
99 
101 {
102  delete fEmPhysicsList;
103  delete fMessenger;
104 }
105 
106 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
107 
109 {
110  G4BosonConstructor pBosonConstructor;
111  pBosonConstructor.ConstructParticle();
112 
113  G4LeptonConstructor pLeptonConstructor;
114  pLeptonConstructor.ConstructParticle();
115 
116  G4MesonConstructor pMesonConstructor;
117  pMesonConstructor.ConstructParticle();
118 
119  G4BaryonConstructor pBaryonConstructor;
120  pBaryonConstructor.ConstructParticle();
121 
122  G4IonConstructor pIonConstructor;
123  pIonConstructor.ConstructParticle();
124 
125  G4ShortLivedConstructor sLivedConstructor;
126  sLivedConstructor.ConstructParticle();
127 
128  // Geant4-DNA
129 
130  G4DNAGenericIonsManager* genericIonsManager;
131  genericIonsManager=G4DNAGenericIonsManager::Instance();
132  genericIonsManager->GetIon("alpha++");
133  genericIonsManager->GetIon("alpha+");
134  genericIonsManager->GetIon("helium");
135  genericIonsManager->GetIon("hydrogen");
136 }
137 
138 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
139 
141 {
146  AddStepMax();
147 }
148 
149 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
150 
152 {
153  // Step limitation seen as a process
154  StepMax* stepMaxProcess = new StepMax(fMessenger);
155 
157  particleIterator->reset();
158  while ((*particleIterator)()){
160  G4ProcessManager* pmanager = particle->GetProcessManager();
161 
162  if (stepMaxProcess->IsApplicable(*particle))
163  {
164  pmanager ->AddDiscreteProcess(stepMaxProcess);
165  }
166  }
167 }
168 
169 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
170 
172 {
173  if (verboseLevel>-1) {
174  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
175  }
176 
177  if (name == fEmName) return;
178 
179  if (name == "local") {
180 
181  fEmName = name;
182  delete fEmPhysicsList;
184 
185  } else if (name == "emstandard_opt0") {
186 
187  fEmName = name;
188  delete fEmPhysicsList;
190 
191  } else if (name == "emstandard_opt1") {
192 
193  fEmName = name;
194  delete fEmPhysicsList;
196 
197  } else if (name == "emstandard_opt2") {
198 
199  fEmName = name;
200  delete fEmPhysicsList;
202 
203  } else if (name == "emstandard_opt3") {
204 
205  fEmName = name;
206  delete fEmPhysicsList;
208 
209  } else if (name == "emstandard_opt4") {
210 
211  fEmName = name;
212  delete fEmPhysicsList;
214 
215  } else if (name == "emstandardATIMA") {
216 
217  fEmName = name;
218  delete fEmPhysicsList;
220 
221  } else if (name == "emstandardSS") {
222 
223  fEmName = name;
224  delete fEmPhysicsList;
226 
227  } else if (name == "emstandard5D") {
228 
229  fEmName = name;
230  delete fEmPhysicsList;
232 
233  } else if (name == "emstandardWVI") {
234 
235  fEmName = name;
236  delete fEmPhysicsList;
238 
239  } else if (name == "emstandardGS") {
240 
241  fEmName = name;
242  delete fEmPhysicsList;
244 
245  } else if (name == "empenelope") {
246  fEmName = name;
247  delete fEmPhysicsList;
249 
250  } else if (name == "emlowenergy") {
251  fEmName = name;
252  delete fEmPhysicsList;
254 
255  } else if (name == "emlivermore") {
256  fEmName = name;
257  delete fEmPhysicsList;
259 
260  } else if (name == "dna") {
261  fEmName = name;
262  delete fEmPhysicsList;
264 
265  } else if (name == "dna_opt2") {
266  fEmName = name;
267  delete fEmPhysicsList;
269 
270  } else if (name == "dna_opt4") {
271  fEmName = name;
272  delete fEmPhysicsList;
274 
275  } else if (name == "dna_opt6") {
276  fEmName = name;
277  delete fEmPhysicsList;
279 
280  } else if (name == "had_elastic" && !fHadPhysicsList) {
282 
283  } else {
284 
285  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
286  << " is not defined"
287  << G4endl;
288  }
289 }
290 
291 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......