Geant4
v4-10.4-release
메인 페이지
관련된 페이지
모듈
네임스페이스
클래스
파일들
파일 목록
파일 멤버
모두
클래스
네임스페이스들
파일들
함수
변수
타입정의
열거형 타입
열거형 멤버
Friends
매크로
그룹들
페이지들
examples
advanced
hadrontherapy
src
HadrontherapyPhysicsList.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
//
26
// Hadrontherapy advanced example for Geant4
27
// See more at: https://twiki.cern.ch/twiki/bin/view/Geant4/AdvancedExamplesHadrontherapy
28
//
29
//
30
// ****** SUGGESTED PHYSICS FOR ACCURATE SIMULATIONS *********
31
// ****** IN MEDICAL PHYSICS APPLI CATIONS *********
32
//
33
// 'HADRONTHERAPY_1' and 'HADRONTHERAPY_2' are both suggested;
34
// It can be activated inside any macro file using the command:
35
// /Physics/addPhysics HADRONTHERAPY_1 (HADRONTHERAPY_2)
36
37
#include "
G4SystemOfUnits.hh
"
38
#include "
G4RunManager.hh
"
39
#include "
G4Region.hh
"
40
#include "
G4RegionStore.hh
"
41
#include "
HadrontherapyPhysicsList.hh
"
42
#include "
HadrontherapyPhysicsListMessenger.hh
"
43
#include "
HadrontherapyStepMax.hh
"
44
#include "
G4PhysListFactory.hh
"
45
#include "
G4VPhysicsConstructor.hh
"
46
#include "
G4HadronPhysicsQGSP_BIC_HP.hh
"
47
#include "
G4HadronPhysicsQGSP_BIC.hh
"
48
#include "
G4EmStandardPhysics_option4.hh
"
49
#include "
G4EmStandardPhysics.hh
"
50
#include "
G4EmExtraPhysics.hh
"
51
#include "
G4StoppingPhysics.hh
"
52
#include "
G4DecayPhysics.hh
"
53
#include "
G4HadronElasticPhysics.hh
"
54
#include "
G4HadronElasticPhysicsHP.hh
"
55
#include "
G4RadioactiveDecayPhysics.hh
"
56
#include "
G4IonBinaryCascadePhysics.hh
"
57
#include "
G4DecayPhysics.hh
"
58
#include "
G4NeutronTrackingCut.hh
"
59
#include "
G4LossTableManager.hh
"
60
#include "
G4UnitsTable.hh
"
61
#include "
G4ProcessManager.hh
"
62
#include "
G4IonFluctuations.hh
"
63
#include "
G4IonParametrisedLossModel.hh
"
64
#include "
G4EmProcessOptions.hh
"
65
#include "
G4ParallelWorldPhysics.hh
"
66
#include "
G4EmLivermorePhysics.hh
"
67
#include "
G4AutoDelete.hh
"
68
70
HadrontherapyPhysicsList::HadrontherapyPhysicsList
() :
G4VModularPhysicsList
()
71
{
72
G4LossTableManager::Instance
();
73
defaultCutValue
= 1.*
mm
;
74
cutForGamma
=
defaultCutValue
;
75
cutForElectron
=
defaultCutValue
;
76
cutForPositron
=
defaultCutValue
;
77
78
pMessenger
=
new
HadrontherapyPhysicsListMessenger
(
this
);
79
SetVerboseLevel
(1);
80
decay_List
=
new
G4DecayPhysics
();
81
// Elecromagnetic physics
82
//
83
emPhysicsList
=
new
G4EmStandardPhysics_option4
();
84
85
}
86
88
HadrontherapyPhysicsList::~HadrontherapyPhysicsList
()
89
{
90
delete
pMessenger
;
91
delete
emPhysicsList
;
92
delete
decay_List
;
93
//delete radioactiveDecay_List;
94
hadronPhys
.clear();
95
for
(
size_t
i=0; i<
hadronPhys
.size(); i++)
96
{
97
delete
hadronPhys
[i];
98
}
99
}
100
102
void
HadrontherapyPhysicsList::ConstructParticle
()
103
{
104
decay_List
->
ConstructParticle
();
105
106
}
107
109
void
HadrontherapyPhysicsList::ConstructProcess
()
110
{
111
// Transportation
112
//
113
AddTransportation
();
114
115
decay_List
->
ConstructProcess
();
116
emPhysicsList
->
ConstructProcess
();
117
118
119
//em_config.AddModels();
120
121
// Hadronic physics
122
//
123
for
(
size_t
i=0; i <
hadronPhys
.size(); i++)
124
{
125
hadronPhys
[i] ->
ConstructProcess
();
126
}
127
128
// step limitation (as a full process)
129
//
130
AddStepMax
();
131
132
//Parallel world sensitivity
133
//
134
G4ParallelWorldPhysics
* pWorld =
new
G4ParallelWorldPhysics
(
"DetectorROGeometry"
);
135
pWorld->
ConstructProcess
();
136
137
return
;
138
}
139
141
void
HadrontherapyPhysicsList::AddPhysicsList
(
const
G4String
&
name
)
142
{
143
if
(
verboseLevel
>1) {
144
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
<<
G4endl
;
145
}
146
if
(name ==
emName
)
return
;
147
149
// ELECTROMAGNETIC MODELS
151
if
(name ==
"standard_opt4"
) {
152
emName
=
name
;
153
delete
emPhysicsList
;
154
hadronPhys
.clear();
155
emPhysicsList
=
new
G4EmStandardPhysics_option4
();
156
G4RunManager::GetRunManager
() -> PhysicsHasBeenModified();
157
G4cout
<<
"THE FOLLOWING ELECTROMAGNETIC PHYSICS LIST HAS BEEN ACTIVATED: G4EmStandardPhysics_option4"
<<
G4endl
;
158
160
// ELECTROMAGNETIC + HADRONIC MODELS
162
163
}
else
if
(name ==
"HADRONTHERAPY_1"
) {
164
165
AddPhysicsList
(
"standard_opt4"
);
166
hadronPhys
.push_back(
new
G4DecayPhysics
());
167
hadronPhys
.push_back(
new
G4RadioactiveDecayPhysics
());
168
hadronPhys
.push_back(
new
G4IonBinaryCascadePhysics
());
169
hadronPhys
.push_back(
new
G4EmExtraPhysics
());
170
hadronPhys
.push_back(
new
G4HadronElasticPhysicsHP
());
171
hadronPhys
.push_back(
new
G4StoppingPhysics
());
172
hadronPhys
.push_back(
new
G4HadronPhysicsQGSP_BIC_HP
());
173
hadronPhys
.push_back(
new
G4NeutronTrackingCut
());
174
175
G4cout
<<
"HADRONTHERAPY_1 PHYSICS LIST has been activated"
<<
G4endl
;
176
}
177
178
else
if
(name ==
"HADRONTHERAPY_2"
) {
179
// HP models are switched off
180
AddPhysicsList
(
"standard_opt4"
);
181
hadronPhys
.push_back(
new
G4DecayPhysics
());
182
hadronPhys
.push_back(
new
G4RadioactiveDecayPhysics
());
183
hadronPhys
.push_back(
new
G4IonBinaryCascadePhysics
());
184
hadronPhys
.push_back(
new
G4EmExtraPhysics
());
185
hadronPhys
.push_back(
new
G4HadronElasticPhysics
());
186
hadronPhys
.push_back(
new
G4StoppingPhysics
());
187
hadronPhys
.push_back(
new
G4HadronPhysicsQGSP_BIC
());
188
hadronPhys
.push_back(
new
G4NeutronTrackingCut
());
189
190
G4cout
<<
"HADRONTHERAPY_2 PHYSICS LIST has been activated"
<<
G4endl
; }
191
else
{
192
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
193
<<
" is not defined"
194
<<
G4endl
;
195
}
196
197
}
198
200
void
HadrontherapyPhysicsList::AddStepMax
()
201
{
202
// Step limitation seen as a process
203
// This process must exist in all threads.
204
//
205
HadrontherapyStepMax
* stepMaxProcess =
new
HadrontherapyStepMax
();
206
G4AutoDelete::Register
( stepMaxProcess );
207
208
auto
particleIterator
=
GetParticleIterator
();
209
particleIterator
->reset();
210
while
((*
particleIterator
)()){
211
G4ParticleDefinition
* particle =
particleIterator
->value();
212
G4ProcessManager
* pmanager = particle->
GetProcessManager
();
213
214
if
(stepMaxProcess->
IsApplicable
(*particle) && pmanager)
215
{
216
pmanager ->
AddDiscreteProcess
(stepMaxProcess);
217
}
218
}
219
}
G4RunManager::GetRunManager
static G4RunManager * GetRunManager()
Definition:
G4RunManager.cc:80
G4AutoDelete.hh
name
const XML_Char * name
Definition:
expat.h:151
G4StoppingPhysics
Definition:
G4StoppingPhysics.hh:63
HadrontherapyPhysicsList::AddStepMax
void AddStepMax()
Definition:
HadrontherapyPhysicsList.cc:200
G4RadioactiveDecayPhysics
Definition:
G4RadioactiveDecayPhysics.hh:38
G4ProcessManager::AddDiscreteProcess
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
G4DecayPhysics.hh
mm
static constexpr double mm
Definition:
G4SIunits.hh:115
G4endl
#define G4endl
Definition:
G4ios.hh:61
HadrontherapyPhysicsList::pMessenger
HadrontherapyPhysicsListMessenger * pMessenger
Definition:
HadrontherapyPhysicsList.hh:73
G4StoppingPhysics.hh
G4IonParametrisedLossModel.hh
G4VModularPhysicsList::verboseLevel
G4int verboseLevel
Definition:
G4VModularPhysicsList.hh:146
G4EmStandardPhysics_option4
Definition:
G4EmStandardPhysics_option4.hh:54
G4String
Definition:
examples/extended/parallel/TopC/ParN02/AnnotatedFiles/G4String.hh:45
G4IonFluctuations.hh
G4EmLivermorePhysics.hh
G4LossTableManager.hh
HadrontherapyPhysicsList::AddPhysicsList
void AddPhysicsList(const G4String &name)
Definition:
HadrontherapyPhysicsList.cc:141
G4AutoDelete::Register
void Register(T *inst)
Definition:
G4AutoDelete.hh:65
HadrontherapyPhysicsListMessenger
Definition:
HadrontherapyPhysicsListMessenger.hh:42
G4EmExtraPhysics.hh
HadrontherapyPhysicsList::hadronPhys
std::vector< G4VPhysicsConstructor * > hadronPhys
Definition:
HadrontherapyPhysicsList.hh:71
G4HadronElasticPhysics.hh
G4HadronElasticPhysicsHP
Definition:
G4HadronElasticPhysicsHP.hh:47
G4IonBinaryCascadePhysics.hh
G4EmStandardPhysics.hh
G4PhysListFactory.hh
G4VUserPhysicsList::GetParticleIterator
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
Definition:
G4VUserPhysicsList.cc:978
G4HadronElasticPhysics
Definition:
G4HadronElasticPhysics.hh:52
G4HadronPhysicsQGSP_BIC_HP.hh
HadrontherapyPhysicsList::decay_List
G4VPhysicsConstructor * decay_List
Definition:
HadrontherapyPhysicsList.hh:68
HadrontherapyPhysicsListMessenger.hh
G4ProcessManager.hh
HadrontherapyPhysicsList::emPhysicsList
G4VPhysicsConstructor * emPhysicsList
Definition:
HadrontherapyPhysicsList.hh:67
HadrontherapyStepMax
Definition:
HadrontherapyStepMax.hh:40
G4ParallelWorldPhysics.hh
G4EmStandardPhysics_option4.hh
G4SystemOfUnits.hh
G4ParticleDefinition
Definition:
G4ParticleDefinition.hh:73
HadrontherapyPhysicsList::cutForPositron
G4double cutForPositron
Definition:
HadrontherapyPhysicsList.hh:63
G4HadronPhysicsQGSP_BIC_HP
Definition:
G4HadronPhysicsQGSP_BIC_HP.hh:75
HadrontherapyPhysicsList::HadrontherapyPhysicsList
HadrontherapyPhysicsList()
Definition:
HadrontherapyPhysicsList.cc:70
G4RunManager.hh
G4HadronPhysicsQGSP_BIC.hh
HadrontherapyStepMax::IsApplicable
G4bool IsApplicable(const G4ParticleDefinition &)
Definition:
HadrontherapyStepMax.cc:43
HadrontherapyPhysicsList::~HadrontherapyPhysicsList
virtual ~HadrontherapyPhysicsList()
Definition:
HadrontherapyPhysicsList.cc:88
HadrontherapyPhysicsList.hh
G4DecayPhysics
Definition:
G4DecayPhysics.hh:49
HadrontherapyPhysicsList::cutForGamma
G4double cutForGamma
Definition:
HadrontherapyPhysicsList.hh:61
G4ParallelWorldPhysics::ConstructProcess
virtual void ConstructProcess()
Definition:
G4ParallelWorldPhysics.cc:73
G4HadronElasticPhysicsHP.hh
G4UnitsTable.hh
G4VUserPhysicsList::AddTransportation
void AddTransportation()
Definition:
G4VUserPhysicsList.cc:959
G4ParticleDefinition::GetProcessManager
G4ProcessManager * GetProcessManager() const
Definition:
G4ParticleDefinition.cc:258
G4VUserPhysicsList::defaultCutValue
G4double defaultCutValue
Definition:
G4VUserPhysicsList.hh:359
G4HadronPhysicsQGSP_BIC
Definition:
G4HadronPhysicsQGSP_BIC.hh:56
particleIterator
std::vector< G4InuclElementaryParticle >::iterator particleIterator
Definition:
G4BigBanger.cc:65
HadrontherapyPhysicsList::emName
G4String emName
Definition:
HadrontherapyPhysicsList.hh:66
G4VPhysicsConstructor.hh
G4cout
G4GLOB_DLL std::ostream G4cout
HadrontherapyStepMax.hh
G4LossTableManager::Instance
static G4LossTableManager * Instance()
Definition:
G4LossTableManager.cc:119
G4EmExtraPhysics
Definition:
G4EmExtraPhysics.hh:59
G4RegionStore.hh
G4NeutronTrackingCut
Definition:
G4NeutronTrackingCut.hh:46
G4Region.hh
G4EmProcessOptions.hh
HadrontherapyPhysicsList::ConstructParticle
void ConstructParticle()
Definition:
HadrontherapyPhysicsList.cc:102
G4RadioactiveDecayPhysics.hh
G4ProcessManager
Definition:
G4ProcessManager.hh:106
G4VModularPhysicsList
Definition:
G4VModularPhysicsList.hh:93
G4IonBinaryCascadePhysics
Definition:
G4IonBinaryCascadePhysics.hh:54
G4NeutronTrackingCut.hh
G4ParallelWorldPhysics
Definition:
G4ParallelWorldPhysics.hh:40
HadrontherapyPhysicsList::ConstructProcess
void ConstructProcess()
Definition:
HadrontherapyPhysicsList.cc:109
HadrontherapyPhysicsList::cutForElectron
G4double cutForElectron
Definition:
HadrontherapyPhysicsList.hh:62
G4VModularPhysicsList::SetVerboseLevel
void SetVerboseLevel(G4int value)
Definition:
G4VModularPhysicsList.cc:374
다음에 의해 생성됨 :
1.8.5