Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
examples/extended/electromagnetic/TestEm3/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 109096 2018-03-26 14:46:51Z 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"
45 #include "G4EmStandardPhysicsGS.hh"
46 #include "G4EmStandardPhysicsSS.hh"
47 
48 #include "G4EmLivermorePhysics.hh"
49 #include "G4EmPenelopePhysics.hh"
50 #include "G4EmLowEPPhysics.hh"
51 
52 #include "G4EmDNAPhysics.hh"
56 
58 
59 #include "G4DecayPhysics.hh"
60 #include "StepMax.hh"
61 
62 #include "G4UnitsTable.hh"
63 #include "G4SystemOfUnits.hh"
64 
65 #include "G4ParticleDefinition.hh"
66 #include "G4ProcessManager.hh"
67 
68 // particles
69 
70 #include "G4BosonConstructor.hh"
71 #include "G4LeptonConstructor.hh"
72 #include "G4MesonConstructor.hh"
73 #include "G4BosonConstructor.hh"
74 #include "G4BaryonConstructor.hh"
75 #include "G4IonConstructor.hh"
78 
79 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
80 
82  fHadPhysicsList(nullptr)
83 {
84  fMessenger = new PhysicsListMessenger(this);
85  SetVerboseLevel(1);
86 
87  // EM physics
88  fEmName = G4String("emstandard_opt4");
90 
91  // Decay physics
93 
95 }
96 
97 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
98 
100 {
101  delete fEmPhysicsList;
102  delete fMessenger;
103 }
104 
105 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
106 
108 {
109  G4BosonConstructor pBosonConstructor;
110  pBosonConstructor.ConstructParticle();
111 
112  G4LeptonConstructor pLeptonConstructor;
113  pLeptonConstructor.ConstructParticle();
114 
115  G4MesonConstructor pMesonConstructor;
116  pMesonConstructor.ConstructParticle();
117 
118  G4BaryonConstructor pBaryonConstructor;
119  pBaryonConstructor.ConstructParticle();
120 
121  G4IonConstructor pIonConstructor;
122  pIonConstructor.ConstructParticle();
123 
124  G4ShortLivedConstructor sLivedConstructor;
125  sLivedConstructor.ConstructParticle();
126 
127  // Geant4-DNA
128 
129  G4DNAGenericIonsManager* genericIonsManager;
130  genericIonsManager=G4DNAGenericIonsManager::Instance();
131  genericIonsManager->GetIon("alpha++");
132  genericIonsManager->GetIon("alpha+");
133  genericIonsManager->GetIon("helium");
134  genericIonsManager->GetIon("hydrogen");
135 }
136 
137 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
138 
140 {
145  AddStepMax();
146 }
147 
148 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
149 
151 {
152  // Step limitation seen as a process
153  StepMax* stepMaxProcess = new StepMax(fMessenger);
154 
156  particleIterator->reset();
157  while ((*particleIterator)()){
158  G4ParticleDefinition* particle = particleIterator->value();
159  G4ProcessManager* pmanager = particle->GetProcessManager();
160 
161  if (stepMaxProcess->IsApplicable(*particle))
162  {
163  pmanager ->AddDiscreteProcess(stepMaxProcess);
164  }
165  }
166 }
167 
168 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
169 
171 {
172  if (verboseLevel>-1) {
173  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
174  }
175 
176  if (name == fEmName) return;
177 
178  if (name == "local") {
179 
180  fEmName = name;
181  delete fEmPhysicsList;
183 
184  } else if (name == "emstandard_opt0") {
185 
186  fEmName = name;
187  delete fEmPhysicsList;
189 
190  } else if (name == "emstandard_opt1") {
191 
192  fEmName = name;
193  delete fEmPhysicsList;
195 
196  } else if (name == "emstandard_opt2") {
197 
198  fEmName = name;
199  delete fEmPhysicsList;
201 
202  } else if (name == "emstandard_opt3") {
203 
204  fEmName = name;
205  delete fEmPhysicsList;
207 
208  } else if (name == "emstandard_opt4") {
209 
210  fEmName = name;
211  delete fEmPhysicsList;
213 
214  } else if (name == "emstandardSS") {
215 
216  fEmName = name;
217  delete fEmPhysicsList;
219 
220  } else if (name == "emstandardWVI") {
221 
222  fEmName = name;
223  delete fEmPhysicsList;
225 
226  } else if (name == "emstandardGS") {
227 
228  fEmName = name;
229  delete fEmPhysicsList;
231 
232  } else if (name == "empenelope") {
233  fEmName = name;
234  delete fEmPhysicsList;
236 
237  } else if (name == "emlowenergy") {
238  fEmName = name;
239  delete fEmPhysicsList;
241 
242  } else if (name == "emlivermore") {
243  fEmName = name;
244  delete fEmPhysicsList;
246 
247  } else if (name == "dna") {
248  fEmName = name;
249  delete fEmPhysicsList;
251 
252  } else if (name == "dna_opt2") {
253  fEmName = name;
254  delete fEmPhysicsList;
256 
257  } else if (name == "dna_opt4") {
258  fEmName = name;
259  delete fEmPhysicsList;
261 
262  } else if (name == "dna_opt6") {
263  fEmName = name;
264  delete fEmPhysicsList;
266 
267  } else if (name == "had_elastic" && !fHadPhysicsList) {
269 
270  } else {
271 
272  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
273  << " is not defined"
274  << G4endl;
275  }
276 }
277 
278 //....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)