Geant4
10.02.p01
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
PhysicsList.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
// $Id: PhysicsList.cc 93668 2015-10-28 09:54:03Z 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
theParticleIterator
->reset();
272
while
((*
theParticleIterator
)()){
273
G4ParticleDefinition
* particle =
theParticleIterator
->value();
274
G4ProcessManager
* pmanager = particle->
GetProcessManager
();
275
276
if
(
fStepMaxProcess
->
IsApplicable
(*particle) && !particle->
IsShortLived
())
277
{
278
pmanager ->
AddDiscreteProcess
(
fStepMaxProcess
);
279
}
280
}
281
}
282
283
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
284
G4DecayPhysics.hh
G4VUserPhysicsList::SetDefaultCutValue
void SetDefaultCutValue(G4double newCutValue)
Definition:
G4VUserPhysicsList.cc:367
G4EmStandardPhysics_option4.hh
G4HadronInelasticQBBC.hh
PhysicsList::ConstructParticle
void ConstructParticle()
Definition:
PhysicsList.cc:117
G4StoppingPhysics.hh
G4EmLivermorePhysics.hh
G4LossTableManager::Instance
static G4LossTableManager * Instance()
Definition:
G4LossTableManager.cc:112
G4EmStandardPhysics_option2
Definition:
G4EmStandardPhysics_option2.hh:55
G4HadronElasticPhysics.hh
G4EmExtraPhysics
Definition:
G4EmExtraPhysics.hh:53
name
G4String name
Definition:
TRTMaterials.hh:40
G4IonPhysics.hh
G4ProcessManager::AddDiscreteProcess
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
G4UnitsTable.hh
G4EmPenelopePhysics.hh
G4LossTableManager.hh
G4HadronElasticPhysics
Definition:
G4HadronElasticPhysics.hh:52
PhysicsList::fHadronPhys
std::vector< G4VPhysicsConstructor * > fHadronPhys
Definition:
PhysicsList.hh:76
G4ParticleDefinition
Definition:
G4ParticleDefinition.hh:111
G4EmStandardPhysics.hh
G4IonPhysics
Definition:
G4IonPhysics.hh:53
G4ParticleDefinition::GetProcessManager
G4ProcessManager * GetProcessManager() const
G4EmStandardPhysics_option1.hh
PhysicsList::fMessenger
PhysicsListMessenger * fMessenger
Definition:
PhysicsList.hh:78
G4EmStandardPhysics_option1
Definition:
G4EmStandardPhysics_option1.hh:54
PhysicsList::fStopIsRegisted
G4bool fStopIsRegisted
Definition:
PhysicsList.hh:92
PhysicsList::AddPhysicsList
void AddPhysicsList(const G4String &name)
Definition:
PhysicsList.cc:191
G4VModularPhysicsList::verboseLevel
G4int verboseLevel
Definition:
G4VModularPhysicsList.hh:146
PhysicsList::fHelIsRegisted
G4bool fHelIsRegisted
Definition:
PhysicsList.hh:69
G4EmStandardPhysics_option4
Definition:
G4EmStandardPhysics_option4.hh:53
G4ParticleTypes.hh
G4VPhysicsConstructor::ConstructParticle
virtual void ConstructParticle()=0
StepMax
Definition:
StepMax.hh:46
G4EmLowEPPhysics
Definition:
G4EmLowEPPhysics.hh:35
G4cout
G4GLOB_DLL std::ostream G4cout
G4ParticleTable.hh
G4RegionStore.hh
G4EmLivermorePhysics
Definition:
G4EmLivermorePhysics.hh:36
G4EmStandardPhysicsSS.hh
G4Proton.hh
G4Positron.hh
G4ProcessManager.hh
G4EmStandardPhysicsGS
Definition:
G4EmStandardPhysicsGS.hh:52
G4VModularPhysicsList::SetVerboseLevel
void SetVerboseLevel(G4int value)
Definition:
G4VModularPhysicsList.cc:379
PhysicsList::~PhysicsList
~PhysicsList()
Definition:
PhysicsList.cc:65
G4EmStandardPhysicsSS
Definition:
G4EmStandardPhysicsSS.hh:50
G4EmStandardPhysics_option3.hh
PhysicsList::AddStepMax
void AddStepMax()
Definition:
PhysicsList.cc:172
G4EmStandardPhysics_option3
Definition:
G4EmStandardPhysics_option3.hh:52
G4EmExtraPhysics.hh
G4ParticleDefinition::IsShortLived
G4bool IsShortLived() const
Definition:
G4ParticleDefinition.hh:196
G4HadronInelasticQBBC
Definition:
G4HadronInelasticQBBC.hh:48
PhysicsList::fDecayPhysicsList
G4VPhysicsConstructor * fDecayPhysicsList
Definition:
PhysicsList.hh:75
G4Electron.hh
PhysListEmStandard
Definition:
PhysListEmStandard.hh:40
G4VUserPhysicsList::AddTransportation
void AddTransportation()
Definition:
G4VUserPhysicsList.cc:956
PhysicsList::PhysicsList
PhysicsList()
Definition:
PhysicsList.cc:43
G4DecayPhysics
Definition:
G4DecayPhysics.hh:49
G4EmStandardPhysics_option2.hh
PhysicsList::fEmPhysicsList
G4VPhysicsConstructor * fEmPhysicsList
Definition:
PhysicsList.hh:73
G4VPhysicsConstructor::ConstructProcess
virtual void ConstructProcess()=0
PhysicsList::fStepMaxProcess
G4StepLimiter * fStepMaxProcess
Definition:
PhysicsList.hh:76
G4EmLowEPPhysics.hh
G4endl
#define G4endl
Definition:
G4ios.hh:61
G4ProcessManager
Definition:
G4ProcessManager.hh:106
G4EmStandardPhysicsWVI
Definition:
G4EmStandardPhysicsWVI.hh:53
G4SystemOfUnits.hh
PhysicsList::fEmName
G4String fEmName
Definition:
PhysicsList.hh:72
PhysicsList::ConstructProcess
void ConstructProcess()
Definition:
PhysicsList.cc:170
G4EmPenelopePhysics
Definition:
G4EmPenelopePhysics.hh:36
G4EmStandardPhysicsGS.hh
mm
static const double mm
Definition:
G4SIunits.hh:114
G4EmProcessOptions.hh
theParticleIterator
#define theParticleIterator
Definition:
G4VUserPhysicsList.hh:153
G4StoppingPhysics
Definition:
G4StoppingPhysics.hh:63
PhysicsList::fGnucIsRegisted
G4bool fGnucIsRegisted
Definition:
PhysicsList.hh:91
G4VProcess::IsApplicable
virtual G4bool IsApplicable(const G4ParticleDefinition &)
Definition:
G4VProcess.hh:205
PhysicsList::fBicIsRegisted
G4bool fBicIsRegisted
Definition:
PhysicsList.hh:70
G4Gamma.hh
G4EmStandardPhysicsWVI.hh
G4VModularPhysicsList
Definition:
G4VModularPhysicsList.hh:90
G4String
Definition:
G4String.hh:45
PhysicsListMessenger
Definition:
PhysicsListMessenger.hh:44
G4EmStandardPhysics
Definition:
G4EmStandardPhysics.hh:52
geant4.10.02.p01
examples
extended
electromagnetic
TestEm9
src
PhysicsList.cc
Generated on Thu Mar 3 2016 14:40:25 for Geant4 by
1.8.8