Geant4
10.01
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 82278 2014-06-13 14:42:11Z 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 "
G4DecayPhysics.hh
"
60
#include "
G4HadronElasticPhysics.hh
"
61
#include "
G4HadronInelasticQBBC.hh
"
62
#include "
G4IonPhysics.hh
"
63
#include "
G4EmExtraPhysics.hh
"
64
#include "
G4StoppingPhysics.hh
"
65
66
#include "
G4RegionStore.hh
"
67
#include "
G4ProcessManager.hh
"
68
#include "
G4ParticleTypes.hh
"
69
#include "
G4ParticleTable.hh
"
70
71
#include "
G4Gamma.hh
"
72
#include "
G4Electron.hh
"
73
#include "
G4Positron.hh
"
74
#include "
G4Proton.hh
"
75
76
#include "
G4UnitsTable.hh
"
77
#include "
G4SystemOfUnits.hh
"
78
#include "
G4LossTableManager.hh
"
79
#include "StepMax.hh"
80
81
#include "
G4EmProcessOptions.hh
"
82
83
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
84
85
PhysicsList::PhysicsList
() :
G4VModularPhysicsList
(),
86
fEmPhysicsList(0),
87
fDecayPhysicsList(0),
88
fStepMaxProcess(0),
89
fMessenger(0)
90
{
91
G4LossTableManager::Instance
();
92
SetDefaultCutValue
(1*
mm
);
93
94
fMessenger
=
new
PhysicsListMessenger
(
this
);
95
fStepMaxProcess
=
new
StepMax
();
96
97
// Initilise flags
98
99
SetVerboseLevel
(1);
100
101
fHelIsRegisted
=
false
;
102
fBicIsRegisted
=
false
;
103
fGnucIsRegisted
=
false
;
104
fStopIsRegisted
=
false
;
105
106
// EM physics
107
fEmName
=
G4String
(
"emstandard"
);
108
fEmPhysicsList
=
new
G4EmStandardPhysics
();
109
110
// Decay Physics is always defined
111
fDecayPhysicsList
=
new
G4DecayPhysics
();
112
}
113
114
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
115
116
PhysicsList::~PhysicsList
()
117
{
118
delete
fMessenger
;
119
delete
fDecayPhysicsList
;
120
delete
fEmPhysicsList
;
121
delete
fStepMaxProcess
;
122
for
(
size_t
i=0; i<
fHadronPhys
.size(); i++) {
123
delete
fHadronPhys
[i];
124
}
125
}
126
127
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
128
129
void
PhysicsList::ConstructParticle
()
130
{
131
fDecayPhysicsList
->
ConstructParticle
();
132
}
133
134
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
135
136
void
PhysicsList::ConstructProcess
()
137
{
138
AddTransportation
();
139
fEmPhysicsList
->
ConstructProcess
();
140
fDecayPhysicsList
->
ConstructProcess
();
141
for
(
size_t
i=0; i<
fHadronPhys
.size(); ++i) {
142
fHadronPhys
[i]->ConstructProcess();
143
}
144
AddStepMax
();
145
}
146
147
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
148
149
void
PhysicsList::AddPhysicsList
(
const
G4String
&
name
)
150
{
151
if
(
verboseLevel
> 1)
152
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
<<
G4endl
;
153
154
if
(name ==
fEmName
)
return
;
155
156
if
(name ==
"emstandard"
) {
157
fEmName
=
name
;
158
delete
fEmPhysicsList
;
159
fEmPhysicsList
=
new
G4EmStandardPhysics
();
160
if
(
verboseLevel
> 0)
161
G4cout
<<
"PhysicsList::Set "
<< name <<
" EM physics"
<<
G4endl
;
162
163
}
else
if
(name ==
"emstandard_opt1"
) {
164
fEmName
=
name
;
165
delete
fEmPhysicsList
;
166
fEmPhysicsList
=
new
G4EmStandardPhysics_option1
();
167
if
(
verboseLevel
> 0)
168
G4cout
<<
"PhysicsList::Set "
<< name <<
" EM physics"
<<
G4endl
;
169
170
}
else
if
(name ==
"emstandard_opt2"
) {
171
fEmName
=
name
;
172
delete
fEmPhysicsList
;
173
fEmPhysicsList
=
new
G4EmStandardPhysics_option2
();
174
if
(
verboseLevel
> 0)
175
G4cout
<<
"PhysicsList::Set "
<< name <<
" EM physics"
<<
G4endl
;
176
177
}
else
if
(name ==
"emstandard_opt3"
) {
178
fEmName
=
name
;
179
delete
fEmPhysicsList
;
180
fEmPhysicsList
=
new
G4EmStandardPhysics_option3
();
181
if
(
verboseLevel
> 0)
182
G4cout
<<
"PhysicsList::Set "
<< name <<
" EM physics"
<<
G4endl
;
183
184
}
else
if
(name ==
"emstandard_opt4"
) {
185
fEmName
=
name
;
186
delete
fEmPhysicsList
;
187
fEmPhysicsList
=
new
G4EmStandardPhysics_option4
();
188
if
(
verboseLevel
> 0)
189
G4cout
<<
"PhysicsList::Set "
<< name <<
" EM physics"
<<
G4endl
;
190
191
}
else
if
(name ==
"emstandard_local"
) {
192
fEmName
=
name
;
193
delete
fEmPhysicsList
;
194
fEmPhysicsList
=
new
PhysListEmStandard
();
195
if
(
verboseLevel
> 0)
196
G4cout
<<
"PhysicsList::Set "
<< name <<
" EM physics"
<<
G4endl
;
197
198
}
else
if
(name ==
"emlivermore"
) {
199
fEmName
=
name
;
200
delete
fEmPhysicsList
;
201
fEmPhysicsList
=
new
G4EmLivermorePhysics
();
202
203
}
else
if
(name ==
"empenelope"
) {
204
fEmName
=
name
;
205
delete
fEmPhysicsList
;
206
fEmPhysicsList
=
new
G4EmPenelopePhysics
();
207
208
}
else
if
(name ==
"emlowenergy"
) {
209
fEmName
=
name
;
210
delete
fEmPhysicsList
;
211
fEmPhysicsList
=
new
G4EmLowEPPhysics
();
212
213
}
else
if
(name ==
"elastic"
&& !
fHelIsRegisted
) {
214
fHadronPhys
.push_back(
new
G4HadronElasticPhysics
());
215
fHelIsRegisted
=
true
;
216
if
(
verboseLevel
> 0)
217
G4cout
<<
"PhysicsList::Add hadron elastic physics"
<<
G4endl
;
218
219
}
else
if
(name ==
"binary"
&& !
fBicIsRegisted
) {
220
fHadronPhys
.push_back(
new
G4HadronInelasticQBBC
());
221
fHadronPhys
.push_back(
new
G4IonPhysics
());
222
fBicIsRegisted
=
true
;
223
if
(
verboseLevel
> 0)
224
G4cout
<<
"PhysicsList::Add hadron inelastic physics from <QBBC>"
225
<<
G4endl
;
226
227
}
else
if
(name ==
"gamma_nuc"
&& !
fGnucIsRegisted
) {
228
fHadronPhys
.push_back(
new
G4EmExtraPhysics
());
229
fGnucIsRegisted
=
true
;
230
if
(
verboseLevel
> 0)
231
G4cout
<<
"PhysicsList::Add gamma- and electro-nuclear physics"
232
<<
G4endl
;
233
234
}
else
if
(name ==
"stopping"
&& !
fStopIsRegisted
) {
235
fHadronPhys
.push_back(
new
G4StoppingPhysics
());
236
fStopIsRegisted
=
true
;
237
if
(
verboseLevel
> 0)
238
G4cout
<<
"PhysicsList::Add stopping physics"
<<
G4endl
;
239
240
}
else
{
241
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
242
<<
" is not defined"
243
<<
G4endl
;
244
}
245
}
246
247
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
248
249
void
PhysicsList::AddStepMax
()
250
{
251
// Step limitation seen as a process
252
253
theParticleIterator
->reset();
254
while
((*
theParticleIterator
)()){
255
G4ParticleDefinition
* particle =
theParticleIterator
->value();
256
G4ProcessManager
* pmanager = particle->
GetProcessManager
();
257
258
if
(
fStepMaxProcess
->
IsApplicable
(*particle) && !particle->
IsShortLived
())
259
{
260
pmanager ->
AddDiscreteProcess
(
fStepMaxProcess
);
261
}
262
}
263
}
264
265
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
266
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:114
G4EmStandardPhysics_option2
Definition:
G4EmStandardPhysics_option2.hh:55
G4HadronElasticPhysics.hh
G4EmExtraPhysics
Definition:
G4EmExtraPhysics.hh:57
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
G4Proton.hh
G4Positron.hh
G4ProcessManager.hh
G4VModularPhysicsList::SetVerboseLevel
void SetVerboseLevel(G4int value)
Definition:
G4VModularPhysicsList.cc:379
PhysicsList::~PhysicsList
~PhysicsList()
Definition:
PhysicsList.cc:65
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:47
PhysicsList::fDecayPhysicsList
G4VPhysicsConstructor * fDecayPhysicsList
Definition:
PhysicsList.hh:75
G4Electron.hh
PhysListEmStandard
Definition:
PhysListEmStandard.hh:40
G4VUserPhysicsList::AddTransportation
void AddTransportation()
Definition:
G4VUserPhysicsList.cc:955
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
G4SystemOfUnits.hh
PhysicsList::fEmName
G4String fEmName
Definition:
PhysicsList.hh:72
PhysicsList::ConstructProcess
void ConstructProcess()
Definition:
PhysicsList.cc:170
G4EmPenelopePhysics
Definition:
G4EmPenelopePhysics.hh:36
mm
static const double mm
Definition:
G4SIunits.hh:102
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
G4VModularPhysicsList
Definition:
G4VModularPhysicsList.hh:90
G4String
Definition:
G4String.hh:45
PhysicsListMessenger
Definition:
PhysicsListMessenger.hh:44
G4EmStandardPhysics
Definition:
G4EmStandardPhysics.hh:52
source
examples
extended
electromagnetic
TestEm9
src
PhysicsList.cc
Generated on Fri Dec 12 2014 22:46:58 for Geant4 by
1.8.8