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_option0.hh"
37 #include "PhysListEmStandard_option3.hh"
38 #include "PhysListEmStandard_option4.hh"
39 #include "PhysListEmStandard_GS.hh"
40 #include "PhysListEmStandard_WVI.hh"
41 #include "PhysListEmStandard_SS.hh"
42 
43 #include "StepMax.hh"
44 
45 #include "G4ParticleDefinition.hh"
46 
47 #include "G4ProcessManager.hh"
48 #include "G4LossTableManager.hh"
49 
50 // Bosons
51 #include "G4ChargedGeantino.hh"
52 #include "G4Geantino.hh"
53 #include "G4Gamma.hh"
54 
55 // leptons
56 #include "G4Electron.hh"
57 #include "G4Positron.hh"
58 
59 // Hadrons
60 #include "G4Proton.hh"
61 
62 #include "G4SystemOfUnits.hh"
63 
64 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
65 
67 {
69  fMessenger = new PhysicsListMessenger(this);
70 
71  // EM physics
72  fEmName = G4String("standard_opt3");
74 
75  defaultCutValue = 10*km;
76 
77  SetVerboseLevel(1);
78 }
79 
80 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
81 
83 {
84  delete fEmPhysicsList;
85  delete fMessenger;
86 }
87 
88 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
89 
91 {
92 
93  // pseudo-particles
96 
97  // gamma
99 
100  // leptons
103 
104  // baryons
106 }
107 
108 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
109 
111 {
114 
115  AddStepMax();
116 }
117 
118 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
119 
121 {
122  // Step limitation seen as a process
123  StepMax* stepMaxProcess = new StepMax();
124 
126  particleIterator->reset();
127  while ((*particleIterator)()){
129  G4ProcessManager* pmanager = particle->GetProcessManager();
130 
131  if (stepMaxProcess->IsApplicable(*particle) && !particle->IsShortLived())
132  {
133  pmanager ->AddDiscreteProcess(stepMaxProcess);
134  }
135  }
136 }
137 
138 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
139 
141 {
142  if (verboseLevel>0) {
143  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
144  }
145 
146  if (name == fEmName) return;
147 
148  if (name == "standard_opt0") {
149 
150  fEmName = name;
151  delete fEmPhysicsList;
153 
154  } else if (name == "standard_opt3") {
155 
156  fEmName = name;
157  delete fEmPhysicsList;
159 
160  } else if (name == "standard_opt4") {
161 
162  fEmName = name;
163  delete fEmPhysicsList;
165 
166  } else if (name == "standard_GS") {
167 
168  fEmName = name;
169  delete fEmPhysicsList;
171 
172  } else if (name == "standard_WVI") {
173 
174  fEmName = name;
175  delete fEmPhysicsList;
177 
178  } else if (name == "standard_SS") {
179 
180  fEmName = name;
181  delete fEmPhysicsList;
183 
184  } else {
185 
186  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
187  << " is not defined"
188  << G4endl;
189  }
190 }
191 
192 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......