Geant4
9.6.p02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
geant4_9_6_p02
examples
extended
radioactivedecay
rdecay02
src
exrdmPhysicsList.cc
Go to the documentation of this file.
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
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
30
31
#include "
exrdmPhysicsList.hh
"
32
#include "
exrdmPhysicsListMessenger.hh
"
33
34
#include "
exrdmPhysListParticles.hh
"
35
#include "
G4EmStandardPhysics.hh
"
36
#include "
exrdmPhysListEmLowEnergy.hh
"
37
#include "
exrdmPhysListHadron.hh
"
38
#include "
G4RegionStore.hh
"
39
#include "
G4Region.hh
"
40
#include "
G4ProductionCuts.hh
"
41
#include "
G4ProcessManager.hh
"
42
#include "
G4ParticleTypes.hh
"
43
#include "
G4ParticleTable.hh
"
44
45
#include "
G4Gamma.hh
"
46
#include "
G4Electron.hh
"
47
#include "
G4Positron.hh
"
48
49
#include "
G4UnitsTable.hh
"
50
#include "
G4LossTableManager.hh
"
51
52
#include "
HadronPhysicsQGSP_BERT.hh
"
53
#include "
HadronPhysicsQGSP_BIC.hh
"
54
#include "
HadronPhysicsQGSP_BERT_HP.hh
"
55
#include "
HadronPhysicsQGSP_BIC_HP.hh
"
56
57
#include "
G4EmExtraPhysics.hh
"
58
#include "
G4HadronElasticPhysics.hh
"
59
#include "
G4StoppingPhysics.hh
"
60
#include "
G4IonBinaryCascadePhysics.hh
"
61
#include "
G4RadioactiveDecayPhysics.hh
"
62
#include "
G4NeutronTrackingCut.hh
"
63
#include "
G4DecayPhysics.hh
"
64
65
#include "
G4SystemOfUnits.hh
"
66
67
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
68
69
exrdmPhysicsList::exrdmPhysicsList
() :
70
G4VModularPhysicsList
(),
71
fCutForGamma(1.*
mm
), fCutForElectron(1.*
mm
),
72
fCutForPositron(1.*
mm
), fHadPhysicsList(0),
73
fNhadcomp(0),fDetectorCuts(0), fTargetCuts(0)
74
{
75
G4LossTableManager::Instance
();
76
defaultCutValue
=1.*
mm
;
77
78
fPMessenger =
new
exrdmPhysicsListMessenger
(
this
);
79
80
SetVerboseLevel
(1);
81
82
//default physics
83
fParticleList =
new
G4DecayPhysics
();
84
85
//default physics
86
fRaddecayList =
new
G4RadioactiveDecayPhysics
();
87
88
// EM physics
89
fEmPhysicsList =
new
G4EmStandardPhysics
();
90
91
92
93
}
94
95
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
96
97
exrdmPhysicsList::~exrdmPhysicsList
()
98
{
99
delete
fPMessenger;
100
delete
fRaddecayList;
101
delete
fEmPhysicsList;
102
if
(fHadPhysicsList)
delete
fHadPhysicsList;
103
if
(fNhadcomp > 0) {
104
for
(
G4int
i=0; i<fNhadcomp; i++) {
105
delete
fHadronPhys[i];
106
}
107
}
108
}
109
110
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
111
112
void
exrdmPhysicsList::ConstructParticle
()
113
{
114
fParticleList->
ConstructParticle
();
115
}
116
117
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
118
119
void
exrdmPhysicsList::ConstructProcess
()
120
{
121
AddTransportation
();
122
// em
123
fEmPhysicsList->
ConstructProcess
();
124
// decays
125
fParticleList->
ConstructProcess
();
126
fRaddecayList->
ConstructProcess
();
127
// had
128
if
(fNhadcomp > 0) {
129
for
(
G4int
i=0; i<fNhadcomp; i++) {
130
(fHadronPhys[i])->
ConstructProcess
();
131
}
132
}
133
if
(fHadPhysicsList) fHadPhysicsList->
ConstructProcess
();
134
G4cout
<<
"### exrdmPhysicsList::ConstructProcess is done"
<<
G4endl
;
135
136
}
137
138
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
139
140
void
exrdmPhysicsList::SelectPhysicsList
(
const
G4String
&
name
)
141
{
142
if
(
verboseLevel
>1) {
143
G4cout
<<
"exrdmPhysicsList::SelectPhysicsList: <"
<< name <<
">"
<<
G4endl
;
144
}
145
// default Had physics
146
if
(name ==
"Hadron"
&& !fHadPhysicsList) {
147
fHadPhysicsList =
new
exrdmPhysListHadron
(
"hadron"
);
148
}
else
if
(name ==
"QGSP_BERT"
) {
149
AddExtraBuilders(
false
);
150
fHadPhysicsList =
new
HadronPhysicsQGSP_BERT
(
"std-hadron"
);
151
}
else
if
(name ==
"QGSP_BIC"
&& !fHadPhysicsList) {
152
AddExtraBuilders(
false
);
153
fHadPhysicsList =
new
HadronPhysicsQGSP_BIC
(
"std-hadron"
);
154
}
else
if
(name ==
"QGSP_BERT_HP"
&& !fHadPhysicsList) {
155
AddExtraBuilders(
true
);
156
fHadPhysicsList =
new
HadronPhysicsQGSP_BERT_HP
(
"std-hadron"
);
157
}
else
if
(name ==
"QGSP_BIC_HP"
&& !fHadPhysicsList) {
158
AddExtraBuilders(
true
);
159
fHadPhysicsList =
new
HadronPhysicsQGSP_BIC_HP
(
"std-hadron"
);
160
}
else
if
(name ==
"LowEnergy_EM"
) {
161
delete
fEmPhysicsList;
162
fEmPhysicsList =
new
exrdmPhysListEmLowEnergy
(
"lowe-em"
);
163
}
else
if
(name ==
"Standard_EM"
) {
164
delete
fEmPhysicsList;
165
fEmPhysicsList =
new
G4EmStandardPhysics
();
166
}
else
{
167
G4cout
<<
"exrdmPhysicsList WARNING wrong or unkonwn <"
168
<< name <<
"> Physics "
<<
G4endl
;
169
}
170
}
171
172
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
173
174
void
exrdmPhysicsList::AddExtraBuilders(
G4bool
flagHP)
175
{
176
fNhadcomp = 5;
177
fHadronPhys.push_back(
new
G4EmExtraPhysics
(
"extra EM"
));
178
fHadronPhys.push_back(
new
G4HadronElasticPhysics
(
"elastic"
,
verboseLevel
,
179
flagHP));
180
fHadronPhys.push_back(
new
G4StoppingPhysics
(
"stopping"
,
verboseLevel
));
181
fHadronPhys.push_back(
new
G4IonBinaryCascadePhysics
(
"ionBIC"
));
182
fHadronPhys.push_back(
new
G4NeutronTrackingCut
(
"Neutron tracking cut"
));
183
}
184
185
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
186
187
void
exrdmPhysicsList::SetCuts
()
188
{
189
SetCutValue
(fCutForGamma,
"gamma"
);
190
SetCutValue
(fCutForElectron,
"e-"
);
191
SetCutValue
(fCutForPositron,
"e+"
);
192
G4cout
<<
"world cuts are set"
<<
G4endl
;
193
194
if
( !fTargetCuts )
SetTargetCut
(fCutForElectron);
195
G4Region
* region = (
G4RegionStore::GetInstance
())->GetRegion(
"Target"
);
196
region->
SetProductionCuts
(fTargetCuts);
197
G4cout
<<
"Target cuts are set"
<<
G4endl
;
198
199
if
( !fDetectorCuts )
SetDetectorCut
(fCutForElectron);
200
region = (
G4RegionStore::GetInstance
())->GetRegion(
"Detector"
);
201
region->
SetProductionCuts
(fDetectorCuts);
202
G4cout
<<
"Detector cuts are set"
<<
G4endl
;
203
204
if
(
verboseLevel
>0)
DumpCutValuesTable
();
205
}
206
207
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
208
209
void
exrdmPhysicsList::SetCutForGamma
(
G4double
cut)
210
{
211
fCutForGamma = cut;
212
SetParticleCuts
(fCutForGamma,
G4Gamma::Gamma
());
213
}
214
215
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
216
217
void
exrdmPhysicsList::SetCutForElectron
(
G4double
cut)
218
{
219
fCutForElectron = cut;
220
SetParticleCuts
(fCutForElectron,
G4Electron::Electron
());
221
}
222
223
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
224
225
void
exrdmPhysicsList::SetCutForPositron
(
G4double
cut)
226
{
227
fCutForPositron = cut;
228
SetParticleCuts
(fCutForPositron,
G4Positron::Positron
());
229
}
230
231
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
232
233
void
exrdmPhysicsList::SetTargetCut
(
G4double
cut)
234
{
235
if
( !fTargetCuts ) fTargetCuts =
new
G4ProductionCuts
();
236
237
fTargetCuts->
SetProductionCut
(cut,
idxG4GammaCut
);
238
fTargetCuts->
SetProductionCut
(cut,
idxG4ElectronCut
);
239
fTargetCuts->
SetProductionCut
(cut,
idxG4PositronCut
);
240
241
}
242
243
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
244
245
void
exrdmPhysicsList::SetDetectorCut
(
G4double
cut)
246
{
247
if
( !fDetectorCuts ) fDetectorCuts =
new
G4ProductionCuts
();
248
249
fDetectorCuts->
SetProductionCut
(cut,
idxG4GammaCut
);
250
fDetectorCuts->
SetProductionCut
(cut,
idxG4ElectronCut
);
251
fDetectorCuts->
SetProductionCut
(cut,
idxG4PositronCut
);
252
}
253
254
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Generated on Sat May 25 2013 14:33:01 for Geant4 by
1.8.4