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 //
32 // ClassName: PhysicsList
33 //
34 // Description: EM physics with a possibility to add transition radiation
35 //
36 // Author: V.Ivanchenko 16.12.2015
37 //
38 //----------------------------------------------------------------------------
39 //
40 
41 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
42 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
43 
44 #include "PhysicsList.hh"
45 #include "PhysicsListMessenger.hh"
46 #include "DetectorConstruction.hh"
47 
48 #include "G4EmStandardPhysics.hh"
53 #include "G4EmStandardPhysicsGS.hh"
54 #include "G4EmStandardPhysicsSS.hh"
56 #include "G4EmLivermorePhysics.hh"
57 #include "G4EmPenelopePhysics.hh"
58 #include "G4EmLowEPPhysics.hh"
59 #include "G4DecayPhysics.hh"
61 
62 #include "G4EmParameters.hh"
63 
64 #include "StepMax.hh"
65 
66 #include "G4ProcessManager.hh"
67 //#include "G4ParticleTypes.hh"
68 //#include "G4ParticleTable.hh"
69 #include "G4SystemOfUnits.hh"
70 
72 
73 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
74 
77  fVerbose(1)
78 {
81 
82  fMessenger = new PhysicsListMessenger(this);
83 
84  // Decay Physics is always defined to define all particles
86 
87  // EM physics
88  fEmName = G4String("emstandard_opt0");
90 
91  // Transition radiation physics
93 }
94 
95 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
96 
98 {
99  delete fMessenger;
100  delete fDecayPhysicsList;
101  delete fXTRPhysicsList;
102  delete fEmPhysicsList;
103 }
104 
105 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
106 
108 {
110 }
111 
112 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
113 
115 {
120  AddStepMax();
121 }
122 
123 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
124 
126 {
127  if (fVerbose > 1) {
128  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
129  }
130 
131  if (name == fEmName) {
132  return;
133 
134  } else if (name == "emstandard_opt0") {
135 
136  fEmName = name;
137  delete fEmPhysicsList;
139 
140  } else if (name == "emstandard_opt1") {
141 
142  fEmName = name;
143  delete fEmPhysicsList;
145 
146  } else if (name == "emstandard_opt2") {
147 
148  fEmName = name;
149  delete fEmPhysicsList;
151 
152  } else if (name == "emstandard_opt3") {
153 
154  fEmName = name;
155  delete fEmPhysicsList;
157 
158  } else if (name == "emstandard_opt4") {
159 
160  fEmName = name;
161  delete fEmPhysicsList;
163 
164  } else if (name == "emstandardWVI") {
165 
166  fEmName = name;
167  delete fEmPhysicsList;
169 
170  } else if (name == "emstandardSS") {
171 
172  fEmName = name;
173  delete fEmPhysicsList;
175 
176  } else if (name == "emstandardGS") {
177 
178  fEmName = name;
179  delete fEmPhysicsList;
181 
182  } else if (name == "emlivermore") {
183 
184  fEmName = name;
185  delete fEmPhysicsList;
187 
188  } else if (name == "empenelope") {
189 
190  fEmName = name;
191  delete fEmPhysicsList;
193 
194  } else if (name == "emlowenergy") {
195 
196  fEmName = name;
197  delete fEmPhysicsList;
199 
200  } else {
201 
202  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
203  << " is not defined"
204  << G4endl;
205  }
206 }
207 
208 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
209 
211 {
213 }
214 
215 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
216 
218 {
219  // Step limitation seen as a process
220  fStepMaxProcess = new StepMax();
221 
223  particleIterator->reset();
224  while ((*particleIterator)())
225  {
227  G4ProcessManager* pmanager = particle->GetProcessManager();
228 
229  if (fStepMaxProcess->IsApplicable(*particle))
230  {
232  }
233  }
234 }
235 
236 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
237