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 PAI model
35 //
36 // Author: V.Ivanchenko 01.09.2010
37 //
38 //----------------------------------------------------------------------------
39 //
40 
41 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
42 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
43 
44 #include "PhysicsList.hh"
45 #include "PhysicsListMessenger.hh"
46 
47 #include "G4EmStandardPhysics.hh"
52 #include "G4EmStandardPhysicsGS.hh"
53 #include "G4EmStandardPhysicsSS.hh"
55 #include "G4EmLivermorePhysics.hh"
56 #include "G4EmPenelopePhysics.hh"
57 #include "G4EmLowEPPhysics.hh"
58 #include "G4DecayPhysics.hh"
59 
60 #include "G4PAIModel.hh"
61 #include "G4PAIPhotModel.hh"
62 
63 #include "G4Gamma.hh"
64 #include "G4Electron.hh"
65 #include "G4Positron.hh"
66 #include "G4Proton.hh"
67 
68 #include "G4UnitsTable.hh"
69 #include "G4SystemOfUnits.hh"
70 #include "G4LossTableManager.hh"
71 #include "G4ProductionCutsTable.hh"
72 #include "G4EmConfigurator.hh"
73 #include "G4EmParameters.hh"
74 
75 #include "StepMax.hh"
76 
77 #include "G4ProcessManager.hh"
78 #include "G4ParticleTypes.hh"
79 #include "G4ParticleTable.hh"
80 #include "DetectorConstruction.hh"
81 
82 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
83 
85  : G4VModularPhysicsList(), fDetectorConstruction(ptr)
86 {
87  // set verbosity for zero to avoid double printout
88  // on physics verbosity should be restored to 1 when cuts
89  // are set
91 
93 
94  fMessenger = new PhysicsListMessenger(this);
95 
96  // Decay Physics is always defined
98 
99  // EM physics
100  fEmName = G4String("emstandard_opt0");
102 
103  SetVerboseLevel(1);
104 }
105 
106 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
107 
109 {
110  delete fMessenger;
111  delete fDecayPhysicsList;
112  delete fEmPhysicsList;
113 }
114 
115 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
116 
118 {
120 }
121 
122 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
123 
125 {
129  AddStepMax();
130 }
131 
132 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
133 
135 {
136  if (verboseLevel>1) {
137  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
138  }
139 
140  if (name == fEmName) {
141  return;
142 
143  } else if (name == "emstandard_opt0") {
144 
145  fEmName = name;
146  delete fEmPhysicsList;
148 
149  } else if (name == "emstandard_opt1") {
150 
151  fEmName = name;
152  delete fEmPhysicsList;
154 
155  } else if (name == "emstandard_opt2") {
156 
157  fEmName = name;
158  delete fEmPhysicsList;
160 
161  } else if (name == "emstandard_opt3") {
162 
163  fEmName = name;
164  delete fEmPhysicsList;
166 
167  } else if (name == "emstandard_opt4") {
168 
169  fEmName = name;
170  delete fEmPhysicsList;
172 
173  } else if (name == "emstandardWVI") {
174 
175  fEmName = name;
176  delete fEmPhysicsList;
178 
179  } else if (name == "emstandardSS") {
180 
181  fEmName = name;
182  delete fEmPhysicsList;
184 
185  } else if (name == "emstandardGS") {
186 
187  fEmName = name;
188  delete fEmPhysicsList;
190 
191  } else if (name == "pai") {
192  G4EmParameters::Instance()->AddPAIModel("all","world","pai");
193 
194  } else if (name == "pai_photon") {
195  G4EmParameters::Instance()->AddPAIModel("all","world","pai_photon");
196 
197  } else if (name == "emlivermore") {
198 
199  fEmName = name;
200  delete fEmPhysicsList;
202 
203  } else if (name == "empenelope") {
204 
205  fEmName = name;
206  delete fEmPhysicsList;
208 
209  } else if (name == "emlowenergy") {
210 
211  fEmName = name;
212  delete fEmPhysicsList;
214 
215  } else {
216 
217  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
218  << " is not defined"
219  << G4endl;
220  }
221 }
222 
223 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
224 
226 {
227  // Step limitation seen as a process
228  StepMax* stepMaxProcess = new StepMax(fDetectorConstruction);
229 
231  particleIterator->reset();
232  while ((*particleIterator)())
233  {
235  G4ProcessManager* pmanager = particle->GetProcessManager();
236 
237  if (stepMaxProcess->IsApplicable(*particle))
238  {
239  pmanager->AddDiscreteProcess(stepMaxProcess);
240  }
241  }
242 }
243 
244 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
245 
247 {
249  if ( verboseLevel > 0 ) { DumpCutValuesTable(); }
250 }
251 
252 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
253