Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
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 // $Id: TSPhysicsList.cc 93110 2015-11-05 08:37:42Z jmadsen $
31 //
32 //
38 //
39 //
40 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
41 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
42 
43 
44 #include "TSPhysicsList.hh"
45 
46 #include "G4RunManager.hh"
47 #include "G4ParticleDefinition.hh"
48 #include "G4ProcessManager.hh"
49 #include "G4ParticleTypes.hh"
50 
51 // Hadrons
52 #include "G4BaryonConstructor.hh"
53 #include "G4IonConstructor.hh"
54 #include "G4MesonConstructor.hh"
55 
56 // Bosons
57 #include "G4BosonConstructor.hh"
58 
59 // Leptons
60 #include "G4LeptonConstructor.hh"
61 
62 // Other Particles
64 
65 // Process options
66 #include "G4LossTableManager.hh"
67 #include "G4EmProcessOptions.hh"
68 
69 // Physics List Helper
70 #include "G4PhysicsListHelper.hh"
71 
72 #include "G4StepLimiter.hh"
73 
74 // Constructors
82 #include "G4IonElasticPhysics.hh"
84 #include "G4DecayPhysics.hh"
85 
86 #include <set>
87 
88 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
89 
91 
92 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
93 
95 {
96  return fgInstance;
97 }
98 
99 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
100 
102 : fDefaultCutValue(1.*CLHEP::mm)
103 {
104  fgInstance = this;
105 
107  fConstructors.push_back(new G4DecayPhysics);
111  fConstructors.push_back(new G4IonElasticPhysics);
113 }
114 
115 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
116 
118 {
119  for(auto ite : fConstructors)
120  delete ite;
121 
122  fgInstance = 0;
123 }
124 
125 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
126 
128 {
129  for(auto c : fConstructors)
130  {
131  c->ConstructParticle();
132  }
133 }
134 
135 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
136 
138 {
139  // Transportation
140  //
142 
143  for(auto c : fConstructors)
144  {
145  c->ConstructProcess();
146  }
147 
148  std::set<G4String> step_limit_particles;
149  // standard particles
150  step_limit_particles.insert("e-");
151  step_limit_particles.insert("e+");
152  step_limit_particles.insert("alpha");
153  step_limit_particles.insert("He3");
154  step_limit_particles.insert("GenericIon");
155  step_limit_particles.insert("proton");
156  step_limit_particles.insert("neutron");
157  // more ~exotic particles
158  step_limit_particles.insert("pi+");
159  step_limit_particles.insert("pi-");
160  step_limit_particles.insert("mu+");
161  step_limit_particles.insert("mu-");
162 
164  particleIterator->reset();
165 
167 
168  while( (*particleIterator)() )
169  {
170  G4ParticleDefinition* particle = particleIterator->value();
171  G4String pname = particle->GetParticleName();
172 
173  if(step_limit_particles.find(pname) != step_limit_particles.end() ||
174  particle->GetPDGCharge())
175  {
176  ph->RegisterProcess(new G4StepLimiter, particle);
177  }
178  }
179 }
180 
181 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
182 
184 {
187  SetCutValue(fDefaultCutValue, "gamma");
188  SetCutValue(fDefaultCutValue, "proton");
189 }
190 
191 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
192 
G4double fDefaultCutValue
void ConstructParticle()
virtual ~TSPhysicsList()
static TSPhysicsList * Instance()
static constexpr double mm
Definition: G4SIunits.hh:115
const G4String & GetParticleName() const
G4double GetPDGCharge() const
static TSPhysicsList * fgInstance
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
Definition of the TSPhysicsList class.
G4bool RegisterProcess(G4VProcess *process, G4ParticleDefinition *particle)
static G4PhysicsListHelper * GetPhysicsListHelper()
std::vector< G4InuclElementaryParticle >::iterator particleIterator
Definition: G4BigBanger.cc:65
PhysicsSet_t fConstructors
void SetCutValue(G4double aCut, const G4String &pname)
void ConstructProcess()