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 "G4EmStandardPhysics.hh"
41 #include "G4EmStandardPhysicsGS.hh"
43 #include "G4EmStandardPhysicsSS.hh"
44 #include "G4EmLivermorePhysics.hh"
45 #include "G4EmPenelopePhysics.hh"
46 #include "G4EmLowEPPhysics.hh"
47 
48 #include "G4DecayPhysics.hh"
49 
50 #include "G4ParticleDefinition.hh"
51 #include "G4ProcessManager.hh"
52 #include "G4ParticleTable.hh"
53 #include "G4ProcessTable.hh"
54 
55 #include "G4Gamma.hh"
56 #include "G4Electron.hh"
57 #include "G4Positron.hh"
58 
60 
61 #include "G4AnnihiToMuPair.hh"
62 #include "G4eeToHadrons.hh"
63 
64 #include "G4SystemOfUnits.hh"
65 #include "G4UnitsTable.hh"
66 #include "G4LossTableManager.hh"
67 
68 #include "StepMax.hh"
69 
70 
71 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
72 
74  fEmPhysicsList(0),
75  fDecayPhysicsList(0),
76  fStepMaxProcess(0),
77  fMes(0)
78 {
80 
81  defaultCutValue = 1.*km;
82  fMes = new PhysicsListMessenger(this);
83 
84  fStepMaxProcess = new StepMax();
85 
87 
88  SetVerboseLevel(2);
89 }
90 
91 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
92 
94 {
95  delete fMes;
96  delete fDecayPhysicsList;
97  delete fEmPhysicsList;
98  delete fStepMaxProcess;
99 }
100 
101 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
102 
104 {
106 }
107 
108 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
109 
111 {
113 
116 
117  AddStepMax();
118 
120 }
121 
122 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
123 
125 {
127  G4ProcessManager* pmanager = particle->GetProcessManager();
128 
130 
131  particle = G4Positron::Positron();
132  pmanager = particle->GetProcessManager();
133 
134  pmanager->AddDiscreteProcess(new G4AnnihiToMuPair);
135  pmanager->AddDiscreteProcess(new G4eeToHadrons);
136 }
137 
138 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
139 
141 {
142  G4ProcessTable* theProcessTable = G4ProcessTable::GetProcessTable();
143  G4GammaConversionToMuons* gammaToMuPairProcess = (G4GammaConversionToMuons*)
144  theProcessTable->FindProcess("GammaToMuPair","gamma");
145  if(gammaToMuPairProcess) gammaToMuPairProcess->SetCrossSecFactor(fac);
146  else G4cout
147  << "Warning. No process GammaToMuPair found, SetGammaToMuPairFac was ignored"
148  << G4endl;
149 }
150 
151 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
152 
154 {
155  G4ProcessTable* theProcessTable = G4ProcessTable::GetProcessTable();
156  G4AnnihiToMuPair* annihiToMuPairProcess = (G4AnnihiToMuPair*)
157  theProcessTable->FindProcess("AnnihiToMuPair","e+");
158  if(annihiToMuPairProcess) annihiToMuPairProcess->SetCrossSecFactor(fac);
159  else G4cout
160  << "Warning. No process AnnihiToMuPair found, SetAnnihiToMuPairFac ignored"
161  << G4endl;
162 }
163 
164 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
165 
167 {
168  G4ProcessTable* theProcessTable = G4ProcessTable::GetProcessTable();
169  G4eeToHadrons* eehadProcess = (G4eeToHadrons*)
170  theProcessTable->FindProcess("ee2hadr","e+");
171  if(eehadProcess) eehadProcess->SetCrossSecFactor(fac);
172  else G4cout
173  << "Warning. No process ee2hadr found, SetAnnihiToHadronFac was ignored"
174  << G4endl;
175 }
176 
177 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
178 
180 {
181  if (verboseLevel>1) {
182  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
183  }
184 
185  if (name == fEmName) {
186  return;
187 
188  } else if (name == "emstandard_opt0") {
189 
190  fEmName = name;
191  delete fEmPhysicsList;
193 
194  } else if (name == "emstandard_opt1") {
195 
196  fEmName = name;
197  delete fEmPhysicsList;
199 
200  } else if (name == "emstandard_opt2") {
201 
202  fEmName = name;
203  delete fEmPhysicsList;
205 
206  } else if (name == "emstandard_opt3") {
207 
208  fEmName = name;
209  delete fEmPhysicsList;
211 
212  } else if (name == "emstandard_opt4") {
213 
214  fEmName = name;
215  delete fEmPhysicsList;
217 
218  } else if (name == "emlivermore") {
219 
220  fEmName = name;
221  delete fEmPhysicsList;
223 
224  } else if (name == "empenelope") {
225 
226  fEmName = name;
227  delete fEmPhysicsList;
229 
230  } else if (name == "emlowenergy") {
231 
232  fEmName = name;
233  delete fEmPhysicsList;
235 
236  } else if (name == "emstandardGS") {
237 
238  fEmName = name;
239  delete fEmPhysicsList;
241 
242  } else if (name == "emstandardSS") {
243 
244  fEmName = name;
245  delete fEmPhysicsList;
247 
248  } else if (name == "emstandardWVI") {
249 
250  fEmName = name;
251  delete fEmPhysicsList;
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 
269  particleIterator->reset();
270  while ((*particleIterator)())
271  {
273  G4ProcessManager* pmanager = particle->GetProcessManager();
274 
275  if (fStepMaxProcess->IsApplicable(*particle))
276  {
278  }
279  }
280 }
281 
282 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
283