Geant4
v4-10.4-release
메인 페이지
관련된 페이지
모듈
네임스페이스
클래스
파일들
파일 목록
파일 멤버
모두
클래스
네임스페이스들
파일들
함수
변수
타입정의
열거형 타입
열거형 멤버
Friends
매크로
그룹들
페이지들
examples
extended
electromagnetic
TestEm9
src
examples/extended/electromagnetic/TestEm9/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 100282 2016-10-17 08:39:00Z gcosmo $
30
//
31
//---------------------------------------------------------------------------
32
//
33
// ClassName: PhysicsList
34
//
35
// Author: V.Ivanchenko 14.10.2002
36
//
37
// Modified:
38
// 17.11.06 Use components from physics_lists subdirectory (V.Ivanchenko)
39
// 24.10.12 Migrated to new stopping and ion physics (A.Ribon)
40
//
41
//----------------------------------------------------------------------------
42
//
43
44
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
45
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
46
47
#include "PhysicsList.hh"
48
#include "PhysicsListMessenger.hh"
49
50
#include "PhysListEmStandard.hh"
51
#include "
G4EmStandardPhysics.hh
"
52
#include "
G4EmStandardPhysics_option1.hh
"
53
#include "
G4EmStandardPhysics_option2.hh
"
54
#include "
G4EmStandardPhysics_option3.hh
"
55
#include "
G4EmStandardPhysics_option4.hh
"
56
#include "
G4EmLivermorePhysics.hh
"
57
#include "
G4EmPenelopePhysics.hh
"
58
#include "
G4EmLowEPPhysics.hh
"
59
#include "
G4EmStandardPhysicsGS.hh
"
60
#include "
G4EmStandardPhysicsSS.hh
"
61
#include "
G4EmStandardPhysicsWVI.hh
"
62
#include "
G4DecayPhysics.hh
"
63
#include "
G4HadronElasticPhysics.hh
"
64
#include "
G4HadronInelasticQBBC.hh
"
65
#include "
G4IonPhysics.hh
"
66
#include "
G4EmExtraPhysics.hh
"
67
#include "
G4StoppingPhysics.hh
"
68
69
#include "
G4RegionStore.hh
"
70
#include "
G4ProcessManager.hh
"
71
#include "
G4ParticleTypes.hh
"
72
#include "
G4ParticleTable.hh
"
73
74
#include "
G4Gamma.hh
"
75
#include "
G4Electron.hh
"
76
#include "
G4Positron.hh
"
77
#include "
G4Proton.hh
"
78
79
#include "
G4UnitsTable.hh
"
80
#include "
G4SystemOfUnits.hh
"
81
#include "
G4LossTableManager.hh
"
82
#include "StepMax.hh"
83
84
#include "
G4EmProcessOptions.hh
"
85
86
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
87
88
PhysicsList::PhysicsList
() :
G4VModularPhysicsList
(),
89
fEmPhysicsList(0),
90
fDecayPhysicsList(0),
91
fStepMaxProcess(0),
92
fMessenger(0)
93
{
94
G4LossTableManager::Instance
();
95
SetDefaultCutValue
(1*
mm
);
96
97
fMessenger
=
new
PhysicsListMessenger
(
this
);
98
fStepMaxProcess
=
new
StepMax
();
99
100
// Initilise flags
101
102
SetVerboseLevel
(1);
103
104
fHelIsRegisted
=
false
;
105
fBicIsRegisted
=
false
;
106
fGnucIsRegisted
=
false
;
107
fStopIsRegisted
=
false
;
108
109
// EM physics
110
fEmName
=
G4String
(
"emstandard"
);
111
fEmPhysicsList
=
new
G4EmStandardPhysics
();
112
113
// Decay Physics is always defined
114
fDecayPhysicsList
=
new
G4DecayPhysics
();
115
}
116
117
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
118
119
PhysicsList::~PhysicsList
()
120
{
121
delete
fMessenger
;
122
delete
fDecayPhysicsList
;
123
delete
fEmPhysicsList
;
124
delete
fStepMaxProcess
;
125
for
(
size_t
i=0; i<
fHadronPhys
.size(); i++) {
126
delete
fHadronPhys
[i];
127
}
128
}
129
130
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
131
132
void
PhysicsList::ConstructParticle
()
133
{
134
fDecayPhysicsList
->
ConstructParticle
();
135
}
136
137
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
138
139
void
PhysicsList::ConstructProcess
()
140
{
141
AddTransportation
();
142
fEmPhysicsList
->
ConstructProcess
();
143
fDecayPhysicsList
->
ConstructProcess
();
144
for
(
size_t
i=0; i<
fHadronPhys
.size(); ++i) {
145
fHadronPhys
[i]->ConstructProcess();
146
}
147
AddStepMax
();
148
}
149
150
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
151
152
void
PhysicsList::AddPhysicsList
(
const
G4String
&
name
)
153
{
154
if
(
verboseLevel
> 1)
155
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
<<
G4endl
;
156
157
if
(name ==
fEmName
)
return
;
158
159
if
(name ==
"emstandard"
) {
160
fEmName
=
name
;
161
delete
fEmPhysicsList
;
162
fEmPhysicsList
=
new
G4EmStandardPhysics
();
163
if
(
verboseLevel
> 0)
164
G4cout
<<
"PhysicsList::Set "
<< name <<
" EM physics"
<<
G4endl
;
165
166
}
else
if
(name ==
"emstandard_opt1"
) {
167
fEmName
=
name
;
168
delete
fEmPhysicsList
;
169
fEmPhysicsList
=
new
G4EmStandardPhysics_option1
();
170
if
(
verboseLevel
> 0)
171
G4cout
<<
"PhysicsList::Set "
<< name <<
" EM physics"
<<
G4endl
;
172
173
}
else
if
(name ==
"emstandard_opt2"
) {
174
fEmName
=
name
;
175
delete
fEmPhysicsList
;
176
fEmPhysicsList
=
new
G4EmStandardPhysics_option2
();
177
if
(
verboseLevel
> 0)
178
G4cout
<<
"PhysicsList::Set "
<< name <<
" EM physics"
<<
G4endl
;
179
180
}
else
if
(name ==
"emstandard_opt3"
) {
181
fEmName
=
name
;
182
delete
fEmPhysicsList
;
183
fEmPhysicsList
=
new
G4EmStandardPhysics_option3
();
184
if
(
verboseLevel
> 0)
185
G4cout
<<
"PhysicsList::Set "
<< name <<
" EM physics"
<<
G4endl
;
186
187
}
else
if
(name ==
"emstandard_opt4"
) {
188
fEmName
=
name
;
189
delete
fEmPhysicsList
;
190
fEmPhysicsList
=
new
G4EmStandardPhysics_option4
();
191
if
(
verboseLevel
> 0)
192
G4cout
<<
"PhysicsList::Set "
<< name <<
" EM physics"
<<
G4endl
;
193
194
}
else
if
(name ==
"emstandard_local"
) {
195
fEmName
=
name
;
196
delete
fEmPhysicsList
;
197
fEmPhysicsList
=
new
PhysListEmStandard
();
198
if
(
verboseLevel
> 0)
199
G4cout
<<
"PhysicsList::Set "
<< name <<
" EM physics"
<<
G4endl
;
200
201
}
else
if
(name ==
"emlivermore"
) {
202
fEmName
=
name
;
203
delete
fEmPhysicsList
;
204
fEmPhysicsList
=
new
G4EmLivermorePhysics
();
205
206
}
else
if
(name ==
"empenelope"
) {
207
fEmName
=
name
;
208
delete
fEmPhysicsList
;
209
fEmPhysicsList
=
new
G4EmPenelopePhysics
();
210
211
}
else
if
(name ==
"emlowenergy"
) {
212
fEmName
=
name
;
213
delete
fEmPhysicsList
;
214
fEmPhysicsList
=
new
G4EmLowEPPhysics
();
215
216
}
else
if
(name ==
"emstandardGS"
) {
217
fEmName
=
name
;
218
delete
fEmPhysicsList
;
219
fEmPhysicsList
=
new
G4EmStandardPhysicsGS
();
220
221
}
else
if
(name ==
"emstandardSS"
) {
222
fEmName
=
name
;
223
delete
fEmPhysicsList
;
224
fEmPhysicsList
=
new
G4EmStandardPhysicsSS
();
225
226
}
else
if
(name ==
"emstandardWVI"
) {
227
fEmName
=
name
;
228
delete
fEmPhysicsList
;
229
fEmPhysicsList
=
new
G4EmStandardPhysicsWVI
();
230
231
}
else
if
(name ==
"elastic"
&& !
fHelIsRegisted
) {
232
fHadronPhys
.push_back(
new
G4HadronElasticPhysics
());
233
fHelIsRegisted
=
true
;
234
if
(
verboseLevel
> 0)
235
G4cout
<<
"PhysicsList::Add hadron elastic physics"
<<
G4endl
;
236
237
}
else
if
(name ==
"binary"
&& !
fBicIsRegisted
) {
238
fHadronPhys
.push_back(
new
G4HadronInelasticQBBC
());
239
fHadronPhys
.push_back(
new
G4IonPhysics
());
240
fBicIsRegisted
=
true
;
241
if
(
verboseLevel
> 0)
242
G4cout
<<
"PhysicsList::Add hadron inelastic physics from <QBBC>"
243
<<
G4endl
;
244
245
}
else
if
(name ==
"gamma_nuc"
&& !
fGnucIsRegisted
) {
246
fHadronPhys
.push_back(
new
G4EmExtraPhysics
());
247
fGnucIsRegisted
=
true
;
248
if
(
verboseLevel
> 0)
249
G4cout
<<
"PhysicsList::Add gamma- and electro-nuclear physics"
250
<<
G4endl
;
251
252
}
else
if
(name ==
"stopping"
&& !
fStopIsRegisted
) {
253
fHadronPhys
.push_back(
new
G4StoppingPhysics
());
254
fStopIsRegisted
=
true
;
255
if
(
verboseLevel
> 0)
256
G4cout
<<
"PhysicsList::Add stopping physics"
<<
G4endl
;
257
258
}
else
{
259
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
260
<<
" is not defined"
261
<<
G4endl
;
262
}
263
}
264
265
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
266
267
void
PhysicsList::AddStepMax
()
268
{
269
// Step limitation seen as a process
270
271
auto
particleIterator
=
GetParticleIterator
();
272
particleIterator
->reset();
273
while
((*
particleIterator
)()){
274
G4ParticleDefinition
* particle =
particleIterator
->value();
275
G4ProcessManager
* pmanager = particle->
GetProcessManager
();
276
277
if
(
fStepMaxProcess
->
IsApplicable
(*particle) && !particle->
IsShortLived
())
278
{
279
pmanager ->
AddDiscreteProcess
(
fStepMaxProcess
);
280
}
281
}
282
}
283
284
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
285
PhysicsList::fStepMaxProcess
G4StepLimiter * fStepMaxProcess
Definition:
examples/advanced/microbeam/include/PhysicsList.hh:68
G4EmStandardPhysics_option3
Definition:
G4EmStandardPhysics_option3.hh:53
name
const XML_Char * name
Definition:
expat.h:151
PhysicsList::fEmPhysicsList
G4VPhysicsConstructor * fEmPhysicsList
Definition:
examples/advanced/microbeam/include/PhysicsList.hh:65
G4StoppingPhysics
Definition:
G4StoppingPhysics.hh:63
G4Positron.hh
G4Gamma.hh
G4Electron.hh
PhysicsList::fBicIsRegisted
G4bool fBicIsRegisted
Definition:
examples/extended/electromagnetic/TestEm7/include/PhysicsList.hh:70
G4EmStandardPhysics_option3.hh
G4ProcessManager::AddDiscreteProcess
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
G4EmPenelopePhysics
Definition:
G4EmPenelopePhysics.hh:37
G4DecayPhysics.hh
mm
static constexpr double mm
Definition:
G4SIunits.hh:115
PhysicsList::AddStepMax
void AddStepMax()
Definition:
examples/advanced/microbeam/src/PhysicsList.cc:164
PhysicsList::fDecayPhysicsList
G4VPhysicsConstructor * fDecayPhysicsList
Definition:
examples/extended/electromagnetic/TestEm10/include/PhysicsList.hh:76
G4endl
#define G4endl
Definition:
G4ios.hh:61
G4StoppingPhysics.hh
G4EmStandardPhysics_option1.hh
G4VModularPhysicsList::verboseLevel
G4int verboseLevel
Definition:
G4VModularPhysicsList.hh:146
G4EmStandardPhysics_option4
Definition:
G4EmStandardPhysics_option4.hh:54
PhysicsList::fHelIsRegisted
G4bool fHelIsRegisted
Definition:
examples/extended/electromagnetic/TestEm7/include/PhysicsList.hh:69
G4String
Definition:
examples/extended/parallel/TopC/ParN02/AnnotatedFiles/G4String.hh:45
PhysicsList::fGnucIsRegisted
G4bool fGnucIsRegisted
Definition:
examples/extended/electromagnetic/TestEm9/include/PhysicsList.hh:91
G4VProcess::IsApplicable
virtual G4bool IsApplicable(const G4ParticleDefinition &)
Definition:
G4VProcess.hh:205
G4EmStandardPhysicsSS
Definition:
G4EmStandardPhysicsSS.hh:51
G4EmLivermorePhysics.hh
G4ParticleTypes.hh
G4LossTableManager.hh
G4HadronInelasticQBBC
Definition:
G4HadronInelasticQBBC.hh:48
G4EmExtraPhysics.hh
G4HadronElasticPhysics.hh
G4EmLowEPPhysics.hh
G4IonPhysics.hh
G4EmStandardPhysics.hh
G4EmPenelopePhysics.hh
PhysicsList::AddPhysicsList
void AddPhysicsList(const G4String &name)
Definition:
environments/g4py/examples/demos/TestEm0/module/PhysicsList.cc:191
G4VPhysicsConstructor::ConstructParticle
virtual void ConstructParticle()=0
G4VPhysicsConstructor::ConstructProcess
virtual void ConstructProcess()=0
G4VUserPhysicsList::GetParticleIterator
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
Definition:
G4VUserPhysicsList.cc:978
G4HadronElasticPhysics
Definition:
G4HadronElasticPhysics.hh:52
PhysicsList::fEmName
G4String fEmName
Definition:
examples/advanced/microbeam/include/PhysicsList.hh:60
G4EmStandardPhysicsGS.hh
G4EmStandardPhysicsGS
Definition:
G4EmStandardPhysicsGS.hh:53
G4EmStandardPhysics
Definition:
G4EmStandardPhysics.hh:53
PhysicsList::ConstructProcess
void ConstructProcess()
Definition:
environments/g4py/examples/demos/TestEm0/module/PhysicsList.cc:170
G4ProcessManager.hh
PhysicsList::fStopIsRegisted
G4bool fStopIsRegisted
Definition:
examples/extended/electromagnetic/TestEm9/include/PhysicsList.hh:92
G4HadronInelasticQBBC.hh
PhysicsList::ConstructParticle
void ConstructParticle()
Definition:
environments/g4py/examples/demos/TestEm0/module/PhysicsList.cc:117
PhysicsList::PhysicsList
PhysicsList()
Implementation of the PhysicsList class.
Definition:
environments/g4py/examples/demos/TestEm0/module/PhysicsList.cc:43
G4EmStandardPhysics_option4.hh
G4SystemOfUnits.hh
G4ParticleDefinition
Definition:
G4ParticleDefinition.hh:73
G4EmLivermorePhysics
Definition:
G4EmLivermorePhysics.hh:37
G4ParticleTable.hh
PhysicsList::~PhysicsList
~PhysicsList()
Definition:
environments/g4py/examples/demos/TestEm0/module/PhysicsList.cc:65
G4EmStandardPhysics_option2.hh
G4VUserPhysicsList::SetDefaultCutValue
void SetDefaultCutValue(G4double newCutValue)
Definition:
G4VUserPhysicsList.cc:370
G4EmLowEPPhysics
Definition:
G4EmLowEPPhysics.hh:36
G4DecayPhysics
Definition:
G4DecayPhysics.hh:49
PhysicsList::fMessenger
PhysicsListMessenger * fMessenger
Definition:
examples/advanced/microbeam/include/PhysicsList.hh:70
G4UnitsTable.hh
G4VUserPhysicsList::AddTransportation
void AddTransportation()
Definition:
G4VUserPhysicsList.cc:959
G4Proton.hh
G4EmStandardPhysics_option1
Definition:
G4EmStandardPhysics_option1.hh:55
G4IonPhysics
Definition:
G4IonPhysics.hh:53
G4ParticleDefinition::GetProcessManager
G4ProcessManager * GetProcessManager() const
Definition:
G4ParticleDefinition.cc:258
particleIterator
std::vector< G4InuclElementaryParticle >::iterator particleIterator
Definition:
G4BigBanger.cc:65
G4cout
G4GLOB_DLL std::ostream G4cout
PhysListEmStandard
Definition:
environments/g4py/examples/demos/TestEm0/module/PhysListEmStandard.hh:40
G4LossTableManager::Instance
static G4LossTableManager * Instance()
Definition:
G4LossTableManager.cc:119
G4EmExtraPhysics
Definition:
G4EmExtraPhysics.hh:59
G4RegionStore.hh
G4ParticleDefinition::IsShortLived
G4bool IsShortLived() const
Definition:
G4ParticleDefinition.hh:158
G4EmStandardPhysicsSS.hh
G4EmStandardPhysicsWVI.hh
G4EmProcessOptions.hh
PhysicsList::fHadronPhys
std::vector< G4VPhysicsConstructor * > fHadronPhys
Definition:
examples/extended/electromagnetic/TestEm7/include/PhysicsList.hh:76
PhysicsListMessenger
Definition:
environments/g4py/examples/demos/TestEm0/module/PhysicsListMessenger.hh:44
G4EmStandardPhysics_option2
Definition:
G4EmStandardPhysics_option2.hh:56
G4ProcessManager
Definition:
G4ProcessManager.hh:106
G4EmStandardPhysicsWVI
Definition:
G4EmStandardPhysicsWVI.hh:54
G4VModularPhysicsList
Definition:
G4VModularPhysicsList.hh:93
StepMax
Definition:
electromagnetic/TestEm1/include/StepMax.hh:46
G4VModularPhysicsList::SetVerboseLevel
void SetVerboseLevel(G4int value)
Definition:
G4VModularPhysicsList.cc:374
다음에 의해 생성됨 :
1.8.5