Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
examples/extended/electromagnetic/TestEm15/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 //
30 // $Id: PhysicsList.cc 110788 2018-06-14 06:45:08Z gcosmo $
31 //
32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
34 
35 #include "PhysicsList.hh"
36 #include "PhysicsListMessenger.hh"
37 
38 #include "PhysListEmStandard.hh"
39 
40 #include "G4LossTableManager.hh"
41 #include "G4UnitsTable.hh"
42 #include "G4SystemOfUnits.hh"
43 
44 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
45 
48  fEmPhysicsList(0), fMessenger(0)
49 {
52 
53  fMessenger = new PhysicsListMessenger(this);
54 
55  SetVerboseLevel(1);
56 
57  // EM physics
58  fEmName = G4String("local");
60 
61 }
62 
63 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
64 
66 {
67  delete fMessenger;
68 }
69 
70 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
71 
72 // Bosons
73 #include "G4ChargedGeantino.hh"
74 #include "G4Geantino.hh"
75 #include "G4Gamma.hh"
76 #include "G4OpticalPhoton.hh"
77 
78 // leptons
79 #include "G4MuonPlus.hh"
80 #include "G4MuonMinus.hh"
81 #include "G4NeutrinoMu.hh"
82 #include "G4AntiNeutrinoMu.hh"
83 
84 #include "G4Electron.hh"
85 #include "G4Positron.hh"
86 #include "G4NeutrinoE.hh"
87 #include "G4AntiNeutrinoE.hh"
88 
89 // Mesons
90 #include "G4PionPlus.hh"
91 #include "G4PionMinus.hh"
92 #include "G4PionZero.hh"
93 #include "G4Eta.hh"
94 #include "G4EtaPrime.hh"
95 
96 #include "G4KaonPlus.hh"
97 #include "G4KaonMinus.hh"
98 #include "G4KaonZero.hh"
99 #include "G4AntiKaonZero.hh"
100 #include "G4KaonZeroLong.hh"
101 #include "G4KaonZeroShort.hh"
102 
103 // Baryons
104 #include "G4Proton.hh"
105 #include "G4AntiProton.hh"
106 #include "G4Neutron.hh"
107 #include "G4AntiNeutron.hh"
108 
109 // Nuclei
110 #include "G4Deuteron.hh"
111 #include "G4Triton.hh"
112 #include "G4Alpha.hh"
113 #include "G4GenericIon.hh"
114 
115 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
116 
118 {
119 // pseudo-particles
122 
123 // gamma
125 
126 // optical photon
128 
129 // leptons
134 
139 
140 // mesons
152 
153 // barions
158 
159 // ions
164 }
165 
166 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
167 
169 {
170  // Transportation
171  //
173 
174  // Electromagnetic physics list
175  //
177 
178  // Em options
179  //
181  param->SetIntegral(false);
182  param->SetStepFunction(1., 1*mm);
183  param->SetLossFluctuations(false);
184 
185  // step limitation (as a full process)
186  //
187  AddStepMax();
188 }
189 
190 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
191 
193 #include "G4EmStandardPhysicsWVI.hh"
194 #include "G4EmStandardPhysicsGS.hh"
195 #include "G4EmStandardPhysicsSS.hh"
197 #include "PhysListEm5DStandard.hh"
198 
200 {
201  if (verboseLevel>0) {
202  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
203  }
204 
205  if (name == fEmName) return;
206 
207  if (name == "local") {
208 
209  fEmName = name;
210  delete fEmPhysicsList;
212 
213  } else if (name == "emstandard_opt3") {
214 
215  fEmName = name;
216  delete fEmPhysicsList;
218 
219 } else if (name == "emstandardSS") {
220 
221  fEmName = name;
222  delete fEmPhysicsList;
224 
225 } else if (name == "emstandardWVI") {
226 
227  fEmName = name;
228  delete fEmPhysicsList;
230 
231 } else if (name == "emstandardGS") {
232 
233  fEmName = name;
234  delete fEmPhysicsList;
236 
237  } else if (name == "emstandard5D") {
238  fEmName = name;
239  delete fEmPhysicsList;
241 
242  } else if (name == "emlivermorePola") {
243  fEmName = name;
244  delete fEmPhysicsList;
246 
247  } else {
248  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
249  << " is not defined"
250  << G4endl;
251  }
252 }
253 
254 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
255 
256 #include "G4ProcessManager.hh"
257 #include "StepMax.hh"
258 
260 {
261  // Step limitation seen as a process
262  StepMax* stepMaxProcess = new StepMax();
263 
265  particleIterator->reset();
266  while ((*particleIterator)()){
267  G4ParticleDefinition* particle = particleIterator->value();
268  G4ProcessManager* pmanager = particle->GetProcessManager();
269 
270  if (stepMaxProcess->IsApplicable(*particle) && pmanager)
271  {
272  pmanager ->AddDiscreteProcess(stepMaxProcess);
273  }
274  }
275 }
276 
277 
278 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
const XML_Char * name
Definition: expat.h:151
static G4Triton * TritonDefinition()
Definition: G4Triton.cc:90
static G4Deuteron * DeuteronDefinition()
Definition: G4Deuteron.cc:89
static G4AntiNeutron * AntiNeutronDefinition()
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
static G4ChargedGeantino * ChargedGeantinoDefinition()
static constexpr double mm
Definition: G4SIunits.hh:115
static G4KaonZero * KaonZeroDefinition()
Definition: G4KaonZero.cc:99
#define G4endl
Definition: G4ios.hh:61
static G4PionPlus * PionPlusDefinition()
Definition: G4PionPlus.cc:93
static G4KaonZeroShort * KaonZeroShortDefinition()
void SetLossFluctuations(G4bool val)
static G4MuonMinus * MuonMinusDefinition()
Definition: G4MuonMinus.cc:95
virtual void ConstructProcess()=0
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
static G4Proton * ProtonDefinition()
Definition: G4Proton.cc:88
void SetStepFunction(G4double v1, G4double v2)
PhysicsList()
Implementation of the PhysicsList class.
static G4PionZero * PionZeroDefinition()
Definition: G4PionZero.cc:103
static G4OpticalPhoton * OpticalPhotonDefinition()
static G4PionMinus * PionMinusDefinition()
Definition: G4PionMinus.cc:93
void SetIntegral(G4bool val)
void SetDefaultCutValue(G4double newCutValue)
static G4Electron * ElectronDefinition()
Definition: G4Electron.cc:89
static G4AntiNeutrinoMu * AntiNeutrinoMuDefinition()
static G4Alpha * AlphaDefinition()
Definition: G4Alpha.cc:84
static G4KaonMinus * KaonMinusDefinition()
Definition: G4KaonMinus.cc:108
static G4Gamma * GammaDefinition()
Definition: G4Gamma.cc:81
static G4GenericIon * GenericIonDefinition()
Definition: G4GenericIon.cc:88
virtual G4bool IsApplicable(const G4ParticleDefinition &)
G4ProcessManager * GetProcessManager() const
static G4NeutrinoE * NeutrinoEDefinition()
Definition: G4NeutrinoE.cc:80
static G4KaonZeroLong * KaonZeroLongDefinition()
static G4Neutron * NeutronDefinition()
Definition: G4Neutron.cc:99
std::vector< G4InuclElementaryParticle >::iterator particleIterator
Definition: G4BigBanger.cc:65
G4GLOB_DLL std::ostream G4cout
static G4AntiKaonZero * AntiKaonZeroDefinition()
static G4LossTableManager * Instance()
static G4Eta * EtaDefinition()
Definition: G4Eta.cc:104
static G4Positron * PositronDefinition()
Definition: G4Positron.cc:89
static G4NeutrinoMu * NeutrinoMuDefinition()
Definition: G4NeutrinoMu.cc:80
static G4Geantino * GeantinoDefinition()
Definition: G4Geantino.cc:82
static G4KaonPlus * KaonPlusDefinition()
Definition: G4KaonPlus.cc:108
static G4MuonPlus * MuonPlusDefinition()
Definition: G4MuonPlus.cc:94
static G4AntiProton * AntiProtonDefinition()
Definition: G4AntiProton.cc:88
static G4AntiNeutrinoE * AntiNeutrinoEDefinition()
static G4EtaPrime * EtaPrimeDefinition()
Definition: G4EtaPrime.cc:106
static G4EmParameters * Instance()
void SetVerboseLevel(G4int value)