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 "PhysListEmStandardNR.hh"
38 #include "G4EmStandardPhysics.hh"
44 #include "G4EmStandardPhysicsGS.hh"
45 #include "G4EmStandardPhysicsSS.hh"
46 
47 #include "G4EmLivermorePhysics.hh"
48 #include "G4EmPenelopePhysics.hh"
49 #include "G4EmLowEPPhysics.hh"
50 
51 #include "G4DecayPhysics.hh"
52 
56 #include "G4HadronInelasticQBBC.hh"
57 #include "G4IonPhysics.hh"
58 
59 #include "G4LossTableManager.hh"
60 #include "G4EmConfigurator.hh"
61 #include "G4UnitsTable.hh"
62 
63 #include "G4ProcessManager.hh"
64 #include "G4Decay.hh"
65 
66 #include "StepMax.hh"
67 
68 #include "G4IonFluctuations.hh"
71 
72 #include "G4BraggIonGasModel.hh"
74 
75 #include "G4PhysicalConstants.hh"
76 #include "G4SystemOfUnits.hh"
77 
78 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
79 
81  fStepMaxProcess(nullptr)
82 {
83  fHelIsRegisted = false;
84  fBicIsRegisted = false;
85  fBiciIsRegisted = false;
86 
87  // protected member of the base class
88  verboseLevel = 1;
89 
90  fMessenger = new PhysicsListMessenger(this);
91 
92  // EM physics
93  fEmName = G4String("emstandard_opt0");
95 
96  // Deacy physics and all particles
98 }
99 
100 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
101 
103 {
104  delete fMessenger;
105  delete fEmPhysicsList;
106  delete fDecPhysicsList;
107  for(size_t i=0; i<fHadronPhys.size(); i++) {delete fHadronPhys[i];}
108 }
109 
110 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
111 
113 {
115 }
116 
117 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
118 
120 {
121  // transportation
122  //
124 
125  // electromagnetic physics list
126  //
128 
129  // decay physics list
130  //
132 
133  // hadronic physics lists
134  for(size_t i=0; i<fHadronPhys.size(); i++) {
135  fHadronPhys[i]->ConstructProcess();
136  }
137 
138  // step limitation (as a full process)
139  //
140  AddStepMax();
141 }
142 
143 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
144 
146 {
147  if (verboseLevel>1) {
148  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
149  }
150 
151  if (name == fEmName) return;
152 
153  if (name == "local") {
154 
155  fEmName = name;
156  delete fEmPhysicsList;
158 
159  } else if (name == "emstandard_opt0") {
160 
161  fEmName = name;
162  delete fEmPhysicsList;
164 
165  } else if (name == "emstandard_opt1") {
166 
167  fEmName = name;
168  delete fEmPhysicsList;
170 
171  } else if (name == "emstandard_opt2") {
172 
173  fEmName = name;
174  delete fEmPhysicsList;
176 
177  } else if (name == "emstandard_opt3") {
178 
179  fEmName = name;
180  delete fEmPhysicsList;
182 
183  } else if (name == "emstandard_opt4") {
184 
185  fEmName = name;
186  delete fEmPhysicsList;
188 
189  } else if (name == "ionGasModels") {
190 
191  AddPhysicsList("emstandard_opt0");
192  fEmName = name;
193  AddIonGasModels();
194 
195  } else if (name == "standardNR") {
196 
197  fEmName = name;
198  delete fEmPhysicsList;
200 
201  } else if (name == "emlivermore") {
202  fEmName = name;
203  delete fEmPhysicsList;
205 
206  } else if (name == "empenelope") {
207  fEmName = name;
208  delete fEmPhysicsList;
210 
211  } else if (name == "emlowenergy") {
212  fEmName = name;
213  delete fEmPhysicsList;
215 
216  } else if (name == "emstandardSS") {
217 
218  fEmName = name;
219  delete fEmPhysicsList;
221 
222  } else if (name == "emstandardWVI") {
223 
224  fEmName = name;
225  delete fEmPhysicsList;
227 
228  } else if (name == "emstandardGS") {
229 
230  fEmName = name;
231  delete fEmPhysicsList;
233 
234  } else if (name == "elastic" && !fHelIsRegisted) {
236  fHelIsRegisted = true;
237 
238  } else if (name == "DElastic" && !fHelIsRegisted) {
240  fHelIsRegisted = true;
241 
242  } else if (name == "HElastic" && !fHelIsRegisted) {
244  fHelIsRegisted = true;
245 
246  } else if (name == "binary" && !fBicIsRegisted) {
248  fBicIsRegisted = true;
249 
250  } else if (name == "binary_ion" && !fBiciIsRegisted) {
251  fHadronPhys.push_back(new G4IonPhysics(verboseLevel));
252  fBiciIsRegisted = true;
253 
254  } else {
255 
256  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
257  << " is not defined"
258  << G4endl;
259  }
260 }
261 
262 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
263 
265 {
266  // Step limitation seen as a process
267  fStepMaxProcess = new StepMax();
268 
270  particleIterator->reset();
271  while ((*particleIterator)()){
273  G4ProcessManager* pmanager = particle->GetProcessManager();
274 
275  if (fStepMaxProcess->IsApplicable(*particle) && pmanager)
276  {
278  }
279  }
280 }
281 
282 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
283 
285 {
289  particleIterator->reset();
290  while ((*particleIterator)())
291  {
292  G4ParticleDefinition* particle = particleIterator->value();
293  G4String partname = particle->GetParticleName();
294  if(partname == "alpha" || partname == "He3" || partname == "GenericIon") {
297  G4double eth = 2.*MeV*particle->GetPDGMass()/proton_mass_c2;
298  em_config->SetExtraEmModel(partname,"ionIoni",mod1,"",0.0,eth,
299  new G4IonFluctuations());
300  em_config->SetExtraEmModel(partname,"ionIoni",mod2,"",eth,100*TeV,
301  new G4UniversalFluctuation());
302 
303  }
304  }
305 }
306 
307 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
308