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 //
31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33 
34 #include "PhysicsList.hh"
35 #include "PhysicsListMessenger.hh"
36 
37 #include "PhysListEmStandard.hh"
38 
39 #include "G4LossTableManager.hh"
40 #include "G4UnitsTable.hh"
41 #include "G4SystemOfUnits.hh"
42 
43 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
44 
47  fEmPhysicsList(0), fMessenger(0)
48 {
51 
52  fMessenger = new PhysicsListMessenger(this);
53 
54  SetVerboseLevel(1);
55 
56  // EM physics
57  fEmName = G4String("local");
59 
60 }
61 
62 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
63 
65 {
66  delete fMessenger;
67 }
68 
69 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
70 
71 // Bosons
72 #include "G4ChargedGeantino.hh"
73 #include "G4Geantino.hh"
74 #include "G4Gamma.hh"
75 #include "G4OpticalPhoton.hh"
76 
77 // leptons
78 #include "G4MuonPlus.hh"
79 #include "G4MuonMinus.hh"
80 #include "G4NeutrinoMu.hh"
81 #include "G4AntiNeutrinoMu.hh"
82 
83 #include "G4Electron.hh"
84 #include "G4Positron.hh"
85 #include "G4NeutrinoE.hh"
86 #include "G4AntiNeutrinoE.hh"
87 
88 // Mesons
89 #include "G4PionPlus.hh"
90 #include "G4PionMinus.hh"
91 #include "G4PionZero.hh"
92 #include "G4Eta.hh"
93 #include "G4EtaPrime.hh"
94 
95 #include "G4KaonPlus.hh"
96 #include "G4KaonMinus.hh"
97 #include "G4KaonZero.hh"
98 #include "G4AntiKaonZero.hh"
99 #include "G4KaonZeroLong.hh"
100 #include "G4KaonZeroShort.hh"
101 
102 // Baryons
103 #include "G4Proton.hh"
104 #include "G4AntiProton.hh"
105 #include "G4Neutron.hh"
106 #include "G4AntiNeutron.hh"
107 
108 // Nuclei
109 #include "G4Deuteron.hh"
110 #include "G4Triton.hh"
111 #include "G4Alpha.hh"
112 #include "G4GenericIon.hh"
113 
114 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
115 
117 {
118 // pseudo-particles
121 
122 // gamma
124 
125 // optical photon
127 
128 // leptons
133 
138 
139 // mesons
151 
152 // barions
157 
158 // ions
163 }
164 
165 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
166 
168 {
169  // Transportation
170  //
172 
173  // Electromagnetic physics list
174  //
176 
177  // Em options
178  //
180  param->SetIntegral(false);
181  param->SetStepFunction(1., 1*mm);
182  param->SetLossFluctuations(false);
183 
184  // step limitation (as a full process)
185  //
186  AddStepMax();
187 }
188 
189 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
190 
192 #include "G4EmStandardPhysicsWVI.hh"
193 #include "G4EmStandardPhysicsGS.hh"
194 #include "G4EmStandardPhysicsSS.hh"
196 #include "PhysListEm5DStandard.hh"
197 
199 {
200  if (verboseLevel>0) {
201  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
202  }
203 
204  if (name == fEmName) return;
205 
206  if (name == "local") {
207 
208  fEmName = name;
209  delete fEmPhysicsList;
211 
212  } else if (name == "emstandard_opt3") {
213 
214  fEmName = name;
215  delete fEmPhysicsList;
217 
218 } else if (name == "emstandardSS") {
219 
220  fEmName = name;
221  delete fEmPhysicsList;
223 
224 } else if (name == "emstandardWVI") {
225 
226  fEmName = name;
227  delete fEmPhysicsList;
229 
230 } else if (name == "emstandardGS") {
231 
232  fEmName = name;
233  delete fEmPhysicsList;
235 
236  } else if (name == "emstandard5D") {
237  fEmName = name;
238  delete fEmPhysicsList;
240 
241  } else if (name == "emlivermorePola") {
242  fEmName = name;
243  delete fEmPhysicsList;
245 
246  } else {
247  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
248  << " is not defined"
249  << G4endl;
250  }
251 }
252 
253 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
254 
255 #include "G4ProcessManager.hh"
256 #include "StepMax.hh"
257 
259 {
260  // Step limitation seen as a process
261  StepMax* stepMaxProcess = new StepMax();
262 
264  particleIterator->reset();
265  while ((*particleIterator)()){
267  G4ProcessManager* pmanager = particle->GetProcessManager();
268 
269  if (stepMaxProcess->IsApplicable(*particle) && pmanager)
270  {
271  pmanager ->AddDiscreteProcess(stepMaxProcess);
272  }
273  }
274 }
275 
276 
277 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......