ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TSPhysicsList.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TSPhysicsList.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 //
37 //
38 //
39 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
40 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
41 
42 
43 #include "TSPhysicsList.hh"
44 
45 #include "G4RunManager.hh"
46 #include "G4ParticleDefinition.hh"
47 #include "G4ProcessManager.hh"
48 #include "G4ParticleTypes.hh"
49 
50 // Hadrons
51 #include "G4BaryonConstructor.hh"
52 #include "G4IonConstructor.hh"
53 #include "G4MesonConstructor.hh"
54 
55 // Bosons
56 #include "G4BosonConstructor.hh"
57 
58 // Leptons
59 #include "G4LeptonConstructor.hh"
60 
61 // Other Particles
63 
64 // Process options
65 #include "G4LossTableManager.hh"
66 #include "G4EmProcessOptions.hh"
67 
68 // Physics List Helper
69 #include "G4PhysicsListHelper.hh"
70 
71 #include "G4StepLimiter.hh"
72 
73 // Constructors
81 #include "G4IonElasticPhysics.hh"
83 #include "G4DecayPhysics.hh"
84 
85 #include <set>
86 
87 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
88 
90 
91 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
92 
94 {
95  return fgInstance;
96 }
97 
98 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
99 
101 : fDefaultCutValue(1.*CLHEP::mm)
102 {
103  fgInstance = this;
104 
106  fConstructors.push_back(new G4DecayPhysics);
110  fConstructors.push_back(new G4IonElasticPhysics);
112 }
113 
114 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
115 
117 {
118  for(auto ite : fConstructors)
119  delete ite;
120 
121  fgInstance = 0;
122 }
123 
124 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
125 
127 {
128  for(auto c : fConstructors)
129  {
130  c->ConstructParticle();
131  }
132 }
133 
134 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
135 
137 {
138  // Transportation
139  //
141 
142  for(auto c : fConstructors)
143  {
144  c->ConstructProcess();
145  }
146 
147  std::set<G4String> step_limit_particles;
148  // standard particles
149  step_limit_particles.insert("e-");
150  step_limit_particles.insert("e+");
151  step_limit_particles.insert("alpha");
152  step_limit_particles.insert("He3");
153  step_limit_particles.insert("GenericIon");
154  step_limit_particles.insert("proton");
155  step_limit_particles.insert("neutron");
156  // more ~exotic particles
157  step_limit_particles.insert("pi+");
158  step_limit_particles.insert("pi-");
159  step_limit_particles.insert("mu+");
160  step_limit_particles.insert("mu-");
161 
163  particleIterator->reset();
164 
166 
167  while( (*particleIterator)() )
168  {
170  G4String pname = particle->GetParticleName();
171 
172  if(step_limit_particles.find(pname) != step_limit_particles.end() ||
173  particle->GetPDGCharge())
174  {
175  ph->RegisterProcess(new G4StepLimiter, particle);
176  }
177  }
178 }
179 
180 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
181 
183 {
186  SetCutValue(fDefaultCutValue, "gamma");
187  SetCutValue(fDefaultCutValue, "proton");
188 }
189 
190 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
191