Geant4
v4-10.4-release
메인 페이지
관련된 페이지
모듈
네임스페이스
클래스
파일들
파일 목록
파일 멤버
모두
클래스
네임스페이스들
파일들
함수
변수
타입정의
열거형 타입
열거형 멤버
Friends
매크로
그룹들
페이지들
examples
extended
electromagnetic
TestEm10
src
examples/extended/electromagnetic/TestEm10/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 100281 2016-10-17 08:37:40Z gcosmo $
30
//
31
//---------------------------------------------------------------------------
32
//
33
// ClassName: PhysicsList
34
//
35
// Description: EM physics with a possibility to add transition radiation
36
//
37
// Author: V.Ivanchenko 16.12.2015
38
//
39
//----------------------------------------------------------------------------
40
//
41
42
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
43
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
44
45
#include "PhysicsList.hh"
46
#include "PhysicsListMessenger.hh"
47
#include "DetectorConstruction.hh"
48
49
#include "
G4EmStandardPhysics.hh
"
50
#include "
G4EmStandardPhysics_option1.hh
"
51
#include "
G4EmStandardPhysics_option2.hh
"
52
#include "
G4EmStandardPhysics_option3.hh
"
53
#include "
G4EmStandardPhysics_option4.hh
"
54
#include "
G4EmStandardPhysicsGS.hh
"
55
#include "
G4EmStandardPhysicsSS.hh
"
56
#include "
G4EmStandardPhysicsWVI.hh
"
57
#include "
G4EmLivermorePhysics.hh
"
58
#include "
G4EmPenelopePhysics.hh
"
59
#include "
G4EmLowEPPhysics.hh
"
60
#include "
G4DecayPhysics.hh
"
61
#include "
TransitionRadiationPhysics.hh
"
62
63
#include "
G4EmParameters.hh
"
64
65
#include "StepMax.hh"
66
67
#include "
G4ProcessManager.hh
"
68
//#include "G4ParticleTypes.hh"
69
//#include "G4ParticleTable.hh"
70
#include "
G4SystemOfUnits.hh
"
71
72
G4ThreadLocal
StepMax
*
PhysicsList::fStepMaxProcess
=
nullptr
;
73
74
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
75
76
PhysicsList::PhysicsList
(
DetectorConstruction
* ptr)
77
:
G4VModularPhysicsList
(),
78
fVerbose(1)
79
{
80
SetDefaultCutValue
(1*
CLHEP::mm
);
81
SetVerboseLevel
(
fVerbose
);
82
83
fMessenger
=
new
PhysicsListMessenger
(
this
);
84
85
// Decay Physics is always defined to define all particles
86
fDecayPhysicsList
=
new
G4DecayPhysics
(
fVerbose
);
87
88
// EM physics
89
fEmName
=
G4String
(
"emstandard_opt0"
);
90
fEmPhysicsList
=
new
G4EmStandardPhysics
(
fVerbose
);
91
92
// Transition radiation physics
93
fXTRPhysicsList
=
new
TransitionRadiationPhysics
(
fVerbose
, ptr);
94
}
95
96
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
97
98
PhysicsList::~PhysicsList
()
99
{
100
delete
fMessenger
;
101
delete
fDecayPhysicsList
;
102
delete
fXTRPhysicsList
;
103
delete
fEmPhysicsList
;
104
}
105
106
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
107
108
void
PhysicsList::ConstructParticle
()
109
{
110
fDecayPhysicsList
->
ConstructParticle
();
111
}
112
113
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
114
115
void
PhysicsList::ConstructProcess
()
116
{
117
AddTransportation
();
118
fEmPhysicsList
->
ConstructProcess
();
119
fDecayPhysicsList
->
ConstructProcess
();
120
fXTRPhysicsList
->
ConstructProcess
();
121
AddStepMax
();
122
}
123
124
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
125
126
void
PhysicsList::AddPhysicsList
(
const
G4String
&
name
)
127
{
128
if
(
fVerbose
> 1) {
129
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
<<
G4endl
;
130
}
131
132
if
(name ==
fEmName
) {
133
return
;
134
135
}
else
if
(name ==
"emstandard_opt0"
) {
136
137
fEmName
=
name
;
138
delete
fEmPhysicsList
;
139
fEmPhysicsList
=
new
G4EmStandardPhysics
(
fVerbose
);
140
141
}
else
if
(name ==
"emstandard_opt1"
) {
142
143
fEmName
=
name
;
144
delete
fEmPhysicsList
;
145
fEmPhysicsList
=
new
G4EmStandardPhysics_option1
(
fVerbose
);
146
147
}
else
if
(name ==
"emstandard_opt2"
) {
148
149
fEmName
=
name
;
150
delete
fEmPhysicsList
;
151
fEmPhysicsList
=
new
G4EmStandardPhysics_option2
(
fVerbose
);
152
153
}
else
if
(name ==
"emstandard_opt3"
) {
154
155
fEmName
=
name
;
156
delete
fEmPhysicsList
;
157
fEmPhysicsList
=
new
G4EmStandardPhysics_option3
(
fVerbose
);
158
159
}
else
if
(name ==
"emstandard_opt4"
) {
160
161
fEmName
=
name
;
162
delete
fEmPhysicsList
;
163
fEmPhysicsList
=
new
G4EmStandardPhysics_option4
(
fVerbose
);
164
165
}
else
if
(name ==
"emstandardWVI"
) {
166
167
fEmName
=
name
;
168
delete
fEmPhysicsList
;
169
fEmPhysicsList
=
new
G4EmStandardPhysicsWVI
(
fVerbose
);
170
171
}
else
if
(name ==
"emstandardSS"
) {
172
173
fEmName
=
name
;
174
delete
fEmPhysicsList
;
175
fEmPhysicsList
=
new
G4EmStandardPhysicsSS
(
fVerbose
);
176
177
}
else
if
(name ==
"emstandardGS"
) {
178
179
fEmName
=
name
;
180
delete
fEmPhysicsList
;
181
fEmPhysicsList
=
new
G4EmStandardPhysicsGS
(
fVerbose
);
182
183
}
else
if
(name ==
"emlivermore"
) {
184
185
fEmName
=
name
;
186
delete
fEmPhysicsList
;
187
fEmPhysicsList
=
new
G4EmLivermorePhysics
(
fVerbose
);
188
189
}
else
if
(name ==
"empenelope"
) {
190
191
fEmName
=
name
;
192
delete
fEmPhysicsList
;
193
fEmPhysicsList
=
new
G4EmPenelopePhysics
(
fVerbose
);
194
195
}
else
if
(name ==
"emlowenergy"
) {
196
197
fEmName
=
name
;
198
delete
fEmPhysicsList
;
199
fEmPhysicsList
=
new
G4EmLowEPPhysics
(
fVerbose
);
200
201
}
else
{
202
203
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
204
<<
" is not defined"
205
<<
G4endl
;
206
}
207
}
208
209
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
210
211
void
PhysicsList::SetXTRModel
(
const
G4String
& name)
212
{
213
fXTRPhysicsList
->
SetXTRModel
(name);
214
}
215
216
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
217
218
void
PhysicsList::AddStepMax
()
219
{
220
// Step limitation seen as a process
221
fStepMaxProcess
=
new
StepMax
();
222
223
auto
particleIterator
=
GetParticleIterator
();
224
particleIterator
->reset();
225
while
((*
particleIterator
)())
226
{
227
G4ParticleDefinition
* particle =
particleIterator
->value();
228
G4ProcessManager
* pmanager = particle->
GetProcessManager
();
229
230
if
(
fStepMaxProcess
->
IsApplicable
(*particle))
231
{
232
pmanager->
AddDiscreteProcess
(
fStepMaxProcess
);
233
}
234
}
235
}
236
237
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
238
PhysicsList::fStepMaxProcess
G4StepLimiter * fStepMaxProcess
Definition:
examples/advanced/microbeam/include/PhysicsList.hh:68
G4EmStandardPhysics_option3
Definition:
G4EmStandardPhysics_option3.hh:53
TransitionRadiationPhysics
Definition:
TransitionRadiationPhysics.hh:45
name
const XML_Char * name
Definition:
expat.h:151
PhysicsList::fEmPhysicsList
G4VPhysicsConstructor * fEmPhysicsList
Definition:
examples/advanced/microbeam/include/PhysicsList.hh:65
G4EmStandardPhysics_option3.hh
G4ProcessManager::AddDiscreteProcess
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
G4EmPenelopePhysics
Definition:
G4EmPenelopePhysics.hh:37
G4DecayPhysics.hh
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
G4EmStandardPhysics_option1.hh
G4EmStandardPhysics_option4
Definition:
G4EmStandardPhysics_option4.hh:54
G4String
Definition:
examples/extended/parallel/TopC/ParN02/AnnotatedFiles/G4String.hh:45
G4VProcess::IsApplicable
virtual G4bool IsApplicable(const G4ParticleDefinition &)
Definition:
G4VProcess.hh:205
G4EmStandardPhysicsSS
Definition:
G4EmStandardPhysicsSS.hh:51
PhysicsList::SetXTRModel
void SetXTRModel(const G4String &name)
Definition:
examples/extended/electromagnetic/TestEm10/src/PhysicsList.cc:211
G4EmLivermorePhysics.hh
G4ThreadLocal
#define G4ThreadLocal
Definition:
tls.hh:69
G4EmLowEPPhysics.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
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::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
TransitionRadiationPhysics.hh
Definition of the TransitionRadiationPhysics class.
G4SystemOfUnits.hh
G4ParticleDefinition
Definition:
G4ParticleDefinition.hh:73
TransitionRadiationPhysics::SetXTRModel
void SetXTRModel(const G4String &name)
Definition:
TransitionRadiationPhysics.hh:59
G4EmLivermorePhysics
Definition:
G4EmLivermorePhysics.hh:37
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
G4VUserPhysicsList::AddTransportation
void AddTransportation()
Definition:
G4VUserPhysicsList.cc:959
G4EmStandardPhysics_option1
Definition:
G4EmStandardPhysics_option1.hh:55
G4ParticleDefinition::GetProcessManager
G4ProcessManager * GetProcessManager() const
Definition:
G4ParticleDefinition.cc:258
CLHEP::mm
static constexpr double mm
Definition:
SystemOfUnits.h:95
particleIterator
std::vector< G4InuclElementaryParticle >::iterator particleIterator
Definition:
G4BigBanger.cc:65
G4cout
G4GLOB_DLL std::ostream G4cout
TransitionRadiationPhysics::ConstructProcess
virtual void ConstructProcess()
Definition:
TransitionRadiationPhysics.cc:69
G4EmStandardPhysicsSS.hh
G4EmStandardPhysicsWVI.hh
PhysicsListMessenger
Definition:
environments/g4py/examples/demos/TestEm0/module/PhysicsListMessenger.hh:44
PhysicsList::fVerbose
G4int fVerbose
Definition:
examples/extended/electromagnetic/TestEm10/include/PhysicsList.hh:81
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
DetectorConstruction
Simple detector construction with a box volume placed in a world.
Definition:
environments/g4py/examples/demos/TestEm0/module/DetectorConstruction.hh:46
PhysicsList::fXTRPhysicsList
TransitionRadiationPhysics * fXTRPhysicsList
Definition:
examples/extended/electromagnetic/TestEm10/include/PhysicsList.hh:78
G4EmParameters.hh
G4VModularPhysicsList::SetVerboseLevel
void SetVerboseLevel(G4int value)
Definition:
G4VModularPhysicsList.cc:374
다음에 의해 생성됨 :
1.8.5