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 "PhysListEmLivermore.hh"
38 #include "PhysListEmPenelope.hh"
39 
40 #include "G4LossTableManager.hh"
41 #include "G4UnitsTable.hh"
42 #include "G4SystemOfUnits.hh"
43 
44 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
45 
47  fMessenger(0),
48  fEmPhysicsList(0)
49 {
51  fMessenger = new PhysicsListMessenger(this);
52 
53  // EM physics
54  fEmName = G4String("standard");
56 
58 
59  SetVerboseLevel(1);
60 }
61 
62 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
63 
65 {
66  delete fEmPhysicsList;
67  delete fMessenger;
68 }
69 
70 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
71 
73 {
74  if (verboseLevel>1) {
75  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
76  }
77 
78  if (name == fEmName) return;
79 
80  if (name == "standard") {
81 
82  fEmName = name;
83  delete fEmPhysicsList;
85 
86  } else if (name == "livermore") {
87 
88  fEmName = name;
89  delete fEmPhysicsList;
91 
92  } else if (name == "penelope") {
93 
94  fEmName = name;
95  delete fEmPhysicsList;
97 
98  } else {
99 
100  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
101  << " is not defined"
102  << G4endl;
103  }
104 }
105 
106 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
107 
108 // Bosons
109 #include "G4ChargedGeantino.hh"
110 #include "G4Geantino.hh"
111 #include "G4Gamma.hh"
112 
113 // leptons
114 #include "G4Electron.hh"
115 #include "G4Positron.hh"
116 
117 #include "G4MuonPlus.hh"
118 #include "G4MuonMinus.hh"
119 
120 // Mesons
121 #include "G4PionPlus.hh"
122 #include "G4PionMinus.hh"
123 
124 #include "G4KaonPlus.hh"
125 #include "G4KaonMinus.hh"
126 
127 // Baryons
128 #include "G4Proton.hh"
129 #include "G4AntiProton.hh"
130 #include "G4Neutron.hh"
131 #include "G4AntiNeutron.hh"
132 
133 // Nuclei
134 #include "G4Deuteron.hh"
135 #include "G4Triton.hh"
136 #include "G4Alpha.hh"
137 #include "G4GenericIon.hh"
138 
140 {
141 // pseudo-particles
144 
145 // gamma
147 
148 // leptons
153 
154 // mesons
159 
160 // baryons
165 
166 // ions
171 }
172 
173 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
174 
176 {
179  AddStepMax();
180 }
181 
182 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
183 
184 #include "G4ProcessManager.hh"
185 #include "StepMax.hh"
186 
188 {
189  // Step limitation seen as a process
190  StepMax* stepMaxProcess = new StepMax();
191 
193  particleIterator->reset();
194  while ((*particleIterator)()){
196  G4ProcessManager* pmanager = particle->GetProcessManager();
197 
198  if (stepMaxProcess->IsApplicable(*particle) && !particle->IsShortLived())
199  {
200  pmanager ->AddDiscreteProcess(stepMaxProcess);
201  }
202  }
203 }
204 
205 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......