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 
38 #include "G4EmStandardPhysics.hh"
43 #include "G4EmStandardPhysicsSS.hh"
44 #include "G4EmStandardPhysicsGS.hh"
46 #include "G4EmLivermorePhysics.hh"
47 #include "G4EmPenelopePhysics.hh"
48 #include "G4EmLowEPPhysics.hh"
49 
50 #include "G4LossTableManager.hh"
51 #include "G4UnitsTable.hh"
52 #include "G4SystemOfUnits.hh"
53 
54 // particles
55 
56 #include "G4BosonConstructor.hh"
57 #include "G4LeptonConstructor.hh"
58 #include "G4MesonConstructor.hh"
59 #include "G4BosonConstructor.hh"
60 #include "G4BaryonConstructor.hh"
61 #include "G4IonConstructor.hh"
63 
65 
66 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
67 
69 {
70  fMessenger = new PhysicsListMessenger(this);
71 
72  SetVerboseLevel(1);
73 
74  // EM physics
75  fEmPhysicsList = new PhysListEmStandard(fEmName = "local");
76 
79 }
80 
81 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
82 
84 {
85  delete fMessenger;
86  delete fEmPhysicsList;
87 }
88 
89 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
90 
92 {
93  G4BosonConstructor pBosonConstructor;
94  pBosonConstructor.ConstructParticle();
95 
96  G4LeptonConstructor pLeptonConstructor;
97  pLeptonConstructor.ConstructParticle();
98 
99  G4MesonConstructor pMesonConstructor;
100  pMesonConstructor.ConstructParticle();
101 
102  G4BaryonConstructor pBaryonConstructor;
103  pBaryonConstructor.ConstructParticle();
104 
105  G4IonConstructor pIonConstructor;
106  pIonConstructor.ConstructParticle();
107 
108  G4ShortLivedConstructor pShortLivedConstructor;
109  pShortLivedConstructor.ConstructParticle();
110 }
111 
112 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
113 
114 #include "G4ProcessManager.hh"
115 
117 {
118  // transportation
119  //
121 
122  // electromagnetic physics list
123  //
125 
126  // Em options
127  //
129  param->SetBuildCSDARange(true);
130 
131  // decay process
132  //
133  AddDecay();
134 
135  // radioactive decay Process
136  //
138 
139  // step limitation (as a full process)
140  //
141  AddStepMax();
142 }
143 
144 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
145 
147 {
148  if (verboseLevel>-1) {
149  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
150  }
151 
152  if (name == fEmName) return;
153 
154  if (name == "local") {
155  fEmName = name;
156  delete fEmPhysicsList;
158 
159  } else if (name == "emstandard_opt0") {
160  fEmName = name;
161  delete fEmPhysicsList;
163 
164  } else if (name == "emstandard_opt1") {
165  fEmName = name;
166  delete fEmPhysicsList;
168 
169  } else if (name == "emstandard_opt2") {
170  fEmName = name;
171  delete fEmPhysicsList;
173 
174  } else if (name == "emstandard_opt3") {
175  fEmName = name;
176  delete fEmPhysicsList;
178 
179  } else if (name == "emstandard_opt4") {
180  fEmName = name;
181  delete fEmPhysicsList;
183 
184  } else if (name == "emstandardSS") {
185  fEmName = name;
186  delete fEmPhysicsList;
188 
189  } else if (name == "emstandardGS") {
190  fEmName = name;
191  delete fEmPhysicsList;
193 
194  } else if (name == "emstandardWVI") {
195  fEmName = name;
196  delete fEmPhysicsList;
198 
199  } else if (name == "emlowenergy") {
200  fEmName = name;
201  delete fEmPhysicsList;
203 
204  } else if (name == "emlivermore") {
205  fEmName = name;
206  delete fEmPhysicsList;
208 
209  } else if (name == "empenelope") {
210  fEmName = name;
211  delete fEmPhysicsList;
213 
214  } else {
215 
216  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
217  << " is not defined"
218  << G4endl;
219  }
220 }
221 
222 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
223 
224 #include "G4Decay.hh"
225 
227 {
228  // decay process
229  //
230  G4Decay* fDecayProcess = new G4Decay();
231 
233  particleIterator->reset();
234  while( (*particleIterator)() ){
236  G4ProcessManager* pmanager = particle->GetProcessManager();
237 
238  if (fDecayProcess->IsApplicable(*particle) && !particle->IsShortLived()) {
239 
240  pmanager ->AddProcess(fDecayProcess);
241 
242  // set ordering for PostStepDoIt and AtRestDoIt
243  pmanager ->SetProcessOrdering(fDecayProcess, idxPostStep);
244  pmanager ->SetProcessOrdering(fDecayProcess, idxAtRest);
245 
246  }
247  }
248 }
249 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
250 
251 #include "G4PhysicsListHelper.hh"
252 #include "G4RadioactiveDecay.hh"
253 #include "G4GenericIon.hh"
254 #include "G4NuclideTable.hh"
255 
257 {
258  G4RadioactiveDecay* radioactiveDecay = new G4RadioactiveDecay();
259 
260  radioactiveDecay->SetARM(true); //Atomic Rearangement
261 
263  ph->RegisterProcess(radioactiveDecay, G4GenericIon::GenericIon());
264 
265  // mandatory for G4NuclideTable
266  //
268 }
269 
270 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
271 
272 #include "StepMax.hh"
273 
275 {
276  // Step limitation seen as a process
277  fStepMaxProcess = new StepMax();
278 
280  particleIterator->reset();
281  while ((*particleIterator)()){
282  G4ParticleDefinition* particle = particleIterator->value();
283  G4ProcessManager* pmanager = particle->GetProcessManager();
284 
285  if (fStepMaxProcess->IsApplicable(*particle))
286  {
288  }
289  }
290 }
291 
292 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......