Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
examples/extended/electromagnetic/TestEm5/src/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 // $Id: PhysicsList.cc 110387 2018-05-22 07:52:43Z gcosmo $
30 //
31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33 
34 #include "PhysicsList.hh"
35 #include "PhysicsListMessenger.hh"
36 
37 #include "PhysListEmStandard.hh"
38 #include "PhysListEm5DStandard.hh"
39 #include "PhysListEm19DStandard.hh"
40 
41 #include "G4EmStandardPhysics.hh"
47 #include "G4EmStandardPhysicsGS.hh"
48 #include "G4EmStandardPhysicsSS.hh"
49 
50 #include "G4EmLivermorePhysics.hh"
51 #include "G4EmPenelopePhysics.hh"
52 #include "G4EmLowEPPhysics.hh"
53 
54 #include "G4EmDNAPhysics.hh"
58 
60 
61 #include "G4DecayPhysics.hh"
62 #include "StepMax.hh"
63 
64 #include "G4UnitsTable.hh"
65 #include "G4SystemOfUnits.hh"
66 
67 #include "G4ParticleDefinition.hh"
68 #include "G4ProcessManager.hh"
69 
70 // particles
71 
72 #include "G4BosonConstructor.hh"
73 #include "G4LeptonConstructor.hh"
74 #include "G4MesonConstructor.hh"
75 #include "G4BosonConstructor.hh"
76 #include "G4BaryonConstructor.hh"
77 #include "G4IonConstructor.hh"
80 
81 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
82 
84  fHadPhysicsList(nullptr)
85 {
86  fMessenger = new PhysicsListMessenger(this);
87  SetVerboseLevel(1);
88 
89  // EM physics
90  fEmName = G4String("emstandard_opt4");
92 
93  // Decay physics
95 
97 }
98 
99 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
100 
102 {
103  delete fEmPhysicsList;
104  delete fMessenger;
105 }
106 
107 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
108 
110 {
111  G4BosonConstructor pBosonConstructor;
112  pBosonConstructor.ConstructParticle();
113 
114  G4LeptonConstructor pLeptonConstructor;
115  pLeptonConstructor.ConstructParticle();
116 
117  G4MesonConstructor pMesonConstructor;
118  pMesonConstructor.ConstructParticle();
119 
120  G4BaryonConstructor pBaryonConstructor;
121  pBaryonConstructor.ConstructParticle();
122 
123  G4IonConstructor pIonConstructor;
124  pIonConstructor.ConstructParticle();
125 
126  G4ShortLivedConstructor sLivedConstructor;
127  sLivedConstructor.ConstructParticle();
128 
129  // Geant4-DNA
130 
131  G4DNAGenericIonsManager* genericIonsManager;
132  genericIonsManager=G4DNAGenericIonsManager::Instance();
133  genericIonsManager->GetIon("alpha++");
134  genericIonsManager->GetIon("alpha+");
135  genericIonsManager->GetIon("helium");
136  genericIonsManager->GetIon("hydrogen");
137 }
138 
139 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
140 
142 {
147  AddStepMax();
148 }
149 
150 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
151 
153 {
154  // Step limitation seen as a process
155  StepMax* stepMaxProcess = new StepMax(fMessenger);
156 
158  particleIterator->reset();
159  while ((*particleIterator)()){
160  G4ParticleDefinition* particle = particleIterator->value();
161  G4ProcessManager* pmanager = particle->GetProcessManager();
162 
163  if (stepMaxProcess->IsApplicable(*particle))
164  {
165  pmanager ->AddDiscreteProcess(stepMaxProcess);
166  }
167  }
168 }
169 
170 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
171 
173 {
174  if (verboseLevel>-1) {
175  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
176  }
177 
178  if (name == fEmName) return;
179 
180  if (name == "local") {
181 
182  fEmName = name;
183  delete fEmPhysicsList;
185 
186  } else if (name == "emstandard_opt0") {
187 
188  fEmName = name;
189  delete fEmPhysicsList;
191 
192  } else if (name == "emstandard_opt1") {
193 
194  fEmName = name;
195  delete fEmPhysicsList;
197 
198  } else if (name == "emstandard_opt2") {
199 
200  fEmName = name;
201  delete fEmPhysicsList;
203 
204  } else if (name == "emstandard_opt3") {
205 
206  fEmName = name;
207  delete fEmPhysicsList;
209 
210  } else if (name == "emstandard_opt4") {
211 
212  fEmName = name;
213  delete fEmPhysicsList;
215 
216  } else if (name == "emstandardATIMA") {
217 
218  fEmName = name;
219  delete fEmPhysicsList;
221 
222  } else if (name == "emstandardSS") {
223 
224  fEmName = name;
225  delete fEmPhysicsList;
227 
228  } else if (name == "emstandard5D") {
229 
230  fEmName = name;
231  delete fEmPhysicsList;
233 
234  } else if (name == "emstandardWVI") {
235 
236  fEmName = name;
237  delete fEmPhysicsList;
239 
240  } else if (name == "emstandardGS") {
241 
242  fEmName = name;
243  delete fEmPhysicsList;
245 
246  } else if (name == "empenelope") {
247  fEmName = name;
248  delete fEmPhysicsList;
250 
251  } else if (name == "emlowenergy") {
252  fEmName = name;
253  delete fEmPhysicsList;
255 
256  } else if (name == "emlivermore") {
257  fEmName = name;
258  delete fEmPhysicsList;
260 
261  } else if (name == "dna") {
262  fEmName = name;
263  delete fEmPhysicsList;
265 
266  } else if (name == "dna_opt2") {
267  fEmName = name;
268  delete fEmPhysicsList;
270 
271  } else if (name == "dna_opt4") {
272  fEmName = name;
273  delete fEmPhysicsList;
275 
276  } else if (name == "dna_opt6") {
277  fEmName = name;
278  delete fEmPhysicsList;
280 
281  } else if (name == "had_elastic" && !fHadPhysicsList) {
283 
284  } else {
285 
286  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
287  << " is not defined"
288  << G4endl;
289  }
290 }
291 
292 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
const XML_Char * name
Definition: expat.h:151
static void ConstructParticle()
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
static constexpr double mm
Definition: G4SIunits.hh:115
#define G4endl
Definition: G4ios.hh:61
static void ConstructParticle()
static void ConstructParticle()
virtual void ConstructProcess()=0
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
PhysicsList()
Implementation of the PhysicsList class.
static void ConstructParticle()
void SetDefaultCutValue(G4double newCutValue)
static void ConstructParticle()
G4ParticleDefinition * GetIon(const G4String &name)
virtual G4bool IsApplicable(const G4ParticleDefinition &)
G4ProcessManager * GetProcessManager() const
static G4DNAGenericIonsManager * Instance(void)
std::vector< G4InuclElementaryParticle >::iterator particleIterator
Definition: G4BigBanger.cc:65
G4GLOB_DLL std::ostream G4cout
void SetVerboseLevel(G4int value)