Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
examples/extended/electromagnetic/TestEm11/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 100280 2016-10-17 08:36:57Z 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 
39 #include "G4EmStandardPhysics.hh"
44 #include "G4EmStandardPhysicsSS.hh"
45 #include "G4EmStandardPhysicsGS.hh"
47 #include "G4EmLivermorePhysics.hh"
48 #include "G4EmPenelopePhysics.hh"
49 #include "G4EmLowEPPhysics.hh"
50 
51 #include "G4LossTableManager.hh"
52 #include "G4UnitsTable.hh"
53 #include "G4SystemOfUnits.hh"
54 
55 // particles
56 
57 #include "G4BosonConstructor.hh"
58 #include "G4LeptonConstructor.hh"
59 #include "G4MesonConstructor.hh"
60 #include "G4BosonConstructor.hh"
61 #include "G4BaryonConstructor.hh"
62 #include "G4IonConstructor.hh"
64 
66 
67 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
68 
70 {
71  fMessenger = new PhysicsListMessenger(this);
72 
73  SetVerboseLevel(1);
74 
75  // EM physics
76  fEmPhysicsList = new PhysListEmStandard(fEmName = "local");
77 
80 }
81 
82 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
83 
85 {
86  delete fMessenger;
87  delete fEmPhysicsList;
88 }
89 
90 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
91 
93 {
94  G4BosonConstructor pBosonConstructor;
95  pBosonConstructor.ConstructParticle();
96 
97  G4LeptonConstructor pLeptonConstructor;
98  pLeptonConstructor.ConstructParticle();
99 
100  G4MesonConstructor pMesonConstructor;
101  pMesonConstructor.ConstructParticle();
102 
103  G4BaryonConstructor pBaryonConstructor;
104  pBaryonConstructor.ConstructParticle();
105 
106  G4IonConstructor pIonConstructor;
107  pIonConstructor.ConstructParticle();
108 
109  G4ShortLivedConstructor pShortLivedConstructor;
110  pShortLivedConstructor.ConstructParticle();
111 }
112 
113 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
114 
115 #include "G4ProcessManager.hh"
116 
118 {
119  // transportation
120  //
122 
123  // electromagnetic physics list
124  //
126 
127  // Em options
128  //
130  param->SetBuildCSDARange(true);
131 
132  // decay process
133  //
134  AddDecay();
135 
136  // radioactive decay Process
137  //
139 
140  // step limitation (as a full process)
141  //
142  AddStepMax();
143 }
144 
145 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
146 
148 {
149  if (verboseLevel>-1) {
150  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
151  }
152 
153  if (name == fEmName) return;
154 
155  if (name == "local") {
156  fEmName = name;
157  delete fEmPhysicsList;
159 
160  } else if (name == "emstandard_opt0") {
161  fEmName = name;
162  delete fEmPhysicsList;
164 
165  } else if (name == "emstandard_opt1") {
166  fEmName = name;
167  delete fEmPhysicsList;
169 
170  } else if (name == "emstandard_opt2") {
171  fEmName = name;
172  delete fEmPhysicsList;
174 
175  } else if (name == "emstandard_opt3") {
176  fEmName = name;
177  delete fEmPhysicsList;
179 
180  } else if (name == "emstandard_opt4") {
181  fEmName = name;
182  delete fEmPhysicsList;
184 
185  } else if (name == "emstandardSS") {
186  fEmName = name;
187  delete fEmPhysicsList;
189 
190  } else if (name == "emstandardGS") {
191  fEmName = name;
192  delete fEmPhysicsList;
194 
195  } else if (name == "emstandardWVI") {
196  fEmName = name;
197  delete fEmPhysicsList;
199 
200  } else if (name == "emlowenergy") {
201  fEmName = name;
202  delete fEmPhysicsList;
204 
205  } else if (name == "emlivermore") {
206  fEmName = name;
207  delete fEmPhysicsList;
209 
210  } else if (name == "empenelope") {
211  fEmName = name;
212  delete fEmPhysicsList;
214 
215  } else {
216 
217  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
218  << " is not defined"
219  << G4endl;
220  }
221 }
222 
223 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
224 
225 #include "G4Decay.hh"
226 
228 {
229  // decay process
230  //
231  G4Decay* fDecayProcess = new G4Decay();
232 
234  particleIterator->reset();
235  while( (*particleIterator)() ){
236  G4ParticleDefinition* particle = particleIterator->value();
237  G4ProcessManager* pmanager = particle->GetProcessManager();
238 
239  if (fDecayProcess->IsApplicable(*particle) && !particle->IsShortLived()) {
240 
241  pmanager ->AddProcess(fDecayProcess);
242 
243  // set ordering for PostStepDoIt and AtRestDoIt
244  pmanager ->SetProcessOrdering(fDecayProcess, idxPostStep);
245  pmanager ->SetProcessOrdering(fDecayProcess, idxAtRest);
246 
247  }
248  }
249 }
250 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
251 
252 #include "G4PhysicsListHelper.hh"
253 #include "G4RadioactiveDecay.hh"
254 #include "G4GenericIon.hh"
255 #include "G4NuclideTable.hh"
256 
258 {
259  G4RadioactiveDecay* radioactiveDecay = new G4RadioactiveDecay();
260 
261  radioactiveDecay->SetARM(true); //Atomic Rearangement
262 
264  ph->RegisterProcess(radioactiveDecay, G4GenericIon::GenericIon());
265 
266  // mandatory for G4NuclideTable
267  //
269 }
270 
271 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
272 
273 #include "StepMax.hh"
274 
276 {
277  // Step limitation seen as a process
278  fStepMaxProcess = new StepMax();
279 
281  particleIterator->reset();
282  while ((*particleIterator)()){
283  G4ParticleDefinition* particle = particleIterator->value();
284  G4ProcessManager* pmanager = particle->GetProcessManager();
285 
286  if (fStepMaxProcess->IsApplicable(*particle))
287  {
289  }
290  }
291 }
292 
293 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
static G4GenericIon * GenericIon()
Definition: G4GenericIon.cc:93
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 G4bool IsApplicable(const G4ParticleDefinition &)
Definition: G4VProcess.hh:205
virtual G4bool IsApplicable(const G4ParticleDefinition &) override
Definition: G4Decay.cc:89
void SetBuildCSDARange(G4bool val)
#define G4ThreadLocal
Definition: tls.hh:69
void SetProcessOrdering(G4VProcess *aProcess, G4ProcessVectorDoItIndex idDoIt, G4int ordDoIt=ordDefault)
virtual void ConstructProcess()=0
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
G4int AddProcess(G4VProcess *aProcess, G4int ordAtRestDoIt=ordInActive, G4int ordAlongSteptDoIt=ordInActive, G4int ordPostStepDoIt=ordInActive)
PhysicsList()
Implementation of the PhysicsList class.
static void ConstructParticle()
void SetDefaultCutValue(G4double newCutValue)
static void ConstructParticle()
void SetARM(G4bool arm)
G4bool RegisterProcess(G4VProcess *process, G4ParticleDefinition *particle)
void SetThresholdOfHalfLife(G4double)
static G4PhysicsListHelper * GetPhysicsListHelper()
G4ProcessManager * GetProcessManager() const
std::vector< G4InuclElementaryParticle >::iterator particleIterator
Definition: G4BigBanger.cc:65
G4GLOB_DLL std::ostream G4cout
static G4LossTableManager * Instance()
static constexpr double picosecond
Definition: G4SIunits.hh:161
static G4NuclideTable * GetInstance()
static G4EmParameters * Instance()
void SetVerboseLevel(G4int value)