Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
examples/extended/electromagnetic/TestEm6/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 100285 2016-10-17 08:42:54Z gcosmo $
30 //
31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33 
34 #include "PhysicsList.hh"
35 #include "PhysicsListMessenger.hh"
36 
37 #include "G4EmStandardPhysics.hh"
42 #include "G4EmStandardPhysicsGS.hh"
44 #include "G4EmStandardPhysicsSS.hh"
45 #include "G4EmLivermorePhysics.hh"
46 #include "G4EmPenelopePhysics.hh"
47 #include "G4EmLowEPPhysics.hh"
48 
49 #include "G4DecayPhysics.hh"
50 
51 #include "G4ParticleDefinition.hh"
52 #include "G4ProcessManager.hh"
53 #include "G4ParticleTable.hh"
54 #include "G4ProcessTable.hh"
55 
56 #include "G4Gamma.hh"
57 #include "G4Electron.hh"
58 #include "G4Positron.hh"
59 
61 
62 #include "G4AnnihiToMuPair.hh"
63 #include "G4eeToHadrons.hh"
64 
65 #include "G4SystemOfUnits.hh"
66 #include "G4UnitsTable.hh"
67 #include "G4LossTableManager.hh"
68 
69 #include "StepMax.hh"
70 
71 
72 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
73 
75  fEmPhysicsList(0),
76  fDecayPhysicsList(0),
77  fStepMaxProcess(0),
78  fMes(0)
79 {
81 
82  defaultCutValue = 1.*km;
83  fMes = new PhysicsListMessenger(this);
84 
85  fStepMaxProcess = new StepMax();
86 
88 
89  SetVerboseLevel(2);
90 }
91 
92 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
93 
95 {
96  delete fMes;
97  delete fDecayPhysicsList;
98  delete fEmPhysicsList;
99  delete fStepMaxProcess;
100 }
101 
102 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
103 
105 {
107 }
108 
109 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
110 
112 {
114 
117 
118  AddStepMax();
119 
121 }
122 
123 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
124 
126 {
127  const G4ParticleDefinition* particle = G4Gamma::Gamma();
128  G4ProcessManager* pmanager = particle->GetProcessManager();
129 
131 
132  particle = G4Positron::Positron();
133  pmanager = particle->GetProcessManager();
134 
135  pmanager->AddDiscreteProcess(new G4AnnihiToMuPair);
136  pmanager->AddDiscreteProcess(new G4eeToHadrons);
137 }
138 
139 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
140 
142 {
143  G4ProcessTable* theProcessTable = G4ProcessTable::GetProcessTable();
144  G4GammaConversionToMuons* gammaToMuPairProcess = (G4GammaConversionToMuons*)
145  theProcessTable->FindProcess("GammaToMuPair","gamma");
146  if(gammaToMuPairProcess) gammaToMuPairProcess->SetCrossSecFactor(fac);
147  else G4cout
148  << "Warning. No process GammaToMuPair found, SetGammaToMuPairFac was ignored"
149  << G4endl;
150 }
151 
152 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
153 
155 {
156  G4ProcessTable* theProcessTable = G4ProcessTable::GetProcessTable();
157  G4AnnihiToMuPair* annihiToMuPairProcess = (G4AnnihiToMuPair*)
158  theProcessTable->FindProcess("AnnihiToMuPair","e+");
159  if(annihiToMuPairProcess) annihiToMuPairProcess->SetCrossSecFactor(fac);
160  else G4cout
161  << "Warning. No process AnnihiToMuPair found, SetAnnihiToMuPairFac ignored"
162  << G4endl;
163 }
164 
165 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
166 
168 {
169  G4ProcessTable* theProcessTable = G4ProcessTable::GetProcessTable();
170  G4eeToHadrons* eehadProcess = (G4eeToHadrons*)
171  theProcessTable->FindProcess("ee2hadr","e+");
172  if(eehadProcess) eehadProcess->SetCrossSecFactor(fac);
173  else G4cout
174  << "Warning. No process ee2hadr found, SetAnnihiToHadronFac was ignored"
175  << G4endl;
176 }
177 
178 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
179 
181 {
182  if (verboseLevel>1) {
183  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
184  }
185 
186  if (name == fEmName) {
187  return;
188 
189  } else if (name == "emstandard_opt0") {
190 
191  fEmName = name;
192  delete fEmPhysicsList;
194 
195  } else if (name == "emstandard_opt1") {
196 
197  fEmName = name;
198  delete fEmPhysicsList;
200 
201  } else if (name == "emstandard_opt2") {
202 
203  fEmName = name;
204  delete fEmPhysicsList;
206 
207  } else if (name == "emstandard_opt3") {
208 
209  fEmName = name;
210  delete fEmPhysicsList;
212 
213  } else if (name == "emstandard_opt4") {
214 
215  fEmName = name;
216  delete fEmPhysicsList;
218 
219  } else if (name == "emlivermore") {
220 
221  fEmName = name;
222  delete fEmPhysicsList;
224 
225  } else if (name == "empenelope") {
226 
227  fEmName = name;
228  delete fEmPhysicsList;
230 
231  } else if (name == "emlowenergy") {
232 
233  fEmName = name;
234  delete fEmPhysicsList;
236 
237  } else if (name == "emstandardGS") {
238 
239  fEmName = name;
240  delete fEmPhysicsList;
242 
243  } else if (name == "emstandardSS") {
244 
245  fEmName = name;
246  delete fEmPhysicsList;
248 
249  } else if (name == "emstandardWVI") {
250 
251  fEmName = name;
252  delete fEmPhysicsList;
254 
255  } else {
256 
257  G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
258  << " is not defined"
259  << G4endl;
260  }
261 }
262 
263 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
264 
266 {
267  //Step limitation seen as a process
268 
270  particleIterator->reset();
271  while ((*particleIterator)())
272  {
273  G4ParticleDefinition* particle = particleIterator->value();
274  G4ProcessManager* pmanager = particle->GetProcessManager();
275 
276  if (fStepMaxProcess->IsApplicable(*particle))
277  {
279  }
280  }
281 }
282 
283 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
284 
const XML_Char * name
Definition: expat.h:151
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
#define G4endl
Definition: G4ios.hh:61
virtual G4bool IsApplicable(const G4ParticleDefinition &)
Definition: G4VProcess.hh:205
static G4ProcessTable * GetProcessTable()
void SetVerbose(G4int val)
static G4Gamma * Gamma()
Definition: G4Gamma.cc:86
virtual void ConstructParticle()=0
virtual void ConstructProcess()=0
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
double G4double
Definition: G4Types.hh:76
PhysicsList()
Implementation of the PhysicsList class.
static G4Positron * Positron()
Definition: G4Positron.cc:94
void SetCrossSecFactor(G4double fac)
void SetCrossSecFactor(G4double fac)
G4ProcessManager * GetProcessManager() const
static const G4double fac
std::vector< G4InuclElementaryParticle >::iterator particleIterator
Definition: G4BigBanger.cc:65
G4GLOB_DLL std::ostream G4cout
G4VProcess * FindProcess(const G4String &processName, const G4String &particleName) const
static G4LossTableManager * Instance()
static constexpr double km
Definition: G4SIunits.hh:133
void SetVerboseLevel(G4int value)