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 90968 2015-06-12 08:11:52Z gcosmo $
30
//
31
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33
34
#include "PhysicsList.hh"
35
#include "PhysicsListMessenger.hh"
36
37
#include "PhysListEmStandard.hh"
38
39
#include "
G4EmStandardPhysics.hh
"
40
#include "
G4EmStandardPhysics_option1.hh
"
41
#include "
G4EmStandardPhysics_option2.hh
"
42
#include "
G4EmStandardPhysics_option3.hh
"
43
#include "
G4EmStandardPhysics_option4.hh
"
44
#include "
G4EmStandardPhysicsWVI.hh
"
45
#include "
G4EmStandardPhysicsGS.hh
"
46
#include "
G4EmStandardPhysicsSS.hh
"
47
#include "
G4EmLivermorePhysics.hh
"
48
#include "
G4EmPenelopePhysics.hh
"
49
#include "
G4EmLowEPPhysics.hh
"
50
51
#include "
G4DecayPhysics.hh
"
52
#include "StepMax.hh"
53
54
#include "
G4LossTableManager.hh
"
55
#include "
G4ProcessManager.hh
"
56
57
#include "
G4UnitsTable.hh
"
58
#include "
G4SystemOfUnits.hh
"
59
60
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
61
62
PhysicsList::PhysicsList
()
63
:
G4VModularPhysicsList
(),fEmPhysicsList(0),
fDecay
(0),fMessenger(0)
64
{
65
SetVerboseLevel
(1);
66
fMessenger
=
new
PhysicsListMessenger
(
this
);
67
68
// EM physics
69
fEmName
=
"emstandard_opt0"
;
70
fEmPhysicsList
=
new
G4EmStandardPhysics
();
71
fDecay
=
new
G4DecayPhysics
();
72
73
G4LossTableManager::Instance
();
74
SetDefaultCutValue
(1*
mm
);
75
}
76
77
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
78
79
PhysicsList::~PhysicsList
()
80
{
81
delete
fMessenger
;
82
delete
fEmPhysicsList
;
83
delete
fDecay
;
84
}
85
86
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
87
88
void
PhysicsList::ConstructParticle
()
89
{
90
fEmPhysicsList
->
ConstructParticle
();
91
fDecay
->
ConstructParticle
();
92
}
93
94
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
95
96
void
PhysicsList::ConstructProcess
()
97
{
98
if
(
verboseLevel
> -1) {
99
G4cout
<<
"PhysicsList::ConstructProcess start"
<<
G4endl
;
100
}
101
// transportation
102
//
103
AddTransportation
();
104
105
// electromagnetic physics list
106
//
107
fEmPhysicsList
->
ConstructProcess
();
108
109
// decay process
110
//
111
fDecay
->
ConstructProcess
();
112
113
// step limitation (as a full process)
114
//
115
AddStepMax
();
116
}
117
118
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
119
120
void
PhysicsList::AddPhysicsList
(
const
G4String
&
name
)
121
{
122
if
(
verboseLevel
>0) {
123
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
<<
G4endl
;
124
}
125
126
if
(name ==
fEmName
)
return
;
127
128
if
(name ==
"local"
) {
129
130
fEmName
=
name
;
131
delete
fEmPhysicsList
;
132
fEmPhysicsList
=
new
PhysListEmStandard
(name);
133
134
}
else
if
(name ==
"emstandard_opt0"
) {
135
136
fEmName
=
name
;
137
delete
fEmPhysicsList
;
138
fEmPhysicsList
=
new
G4EmStandardPhysics
();
139
140
}
else
if
(name ==
"emstandard_opt1"
) {
141
142
fEmName
=
name
;
143
delete
fEmPhysicsList
;
144
fEmPhysicsList
=
new
G4EmStandardPhysics_option1
();
145
146
}
else
if
(name ==
"emstandard_opt2"
) {
147
148
fEmName
=
name
;
149
delete
fEmPhysicsList
;
150
fEmPhysicsList
=
new
G4EmStandardPhysics_option2
();
151
152
}
else
if
(name ==
"emstandard_opt3"
) {
153
154
fEmName
=
name
;
155
delete
fEmPhysicsList
;
156
fEmPhysicsList
=
new
G4EmStandardPhysics_option3
();
157
158
}
else
if
(name ==
"emstandard_opt4"
) {
159
160
fEmName
=
name
;
161
delete
fEmPhysicsList
;
162
fEmPhysicsList
=
new
G4EmStandardPhysics_option4
();
163
164
}
else
if
(name ==
"emstandardWVI"
) {
165
166
fEmName
=
name
;
167
delete
fEmPhysicsList
;
168
fEmPhysicsList
=
new
G4EmStandardPhysicsWVI
();
169
170
}
else
if
(name ==
"emstandardGS"
) {
171
172
fEmName
=
name
;
173
delete
fEmPhysicsList
;
174
fEmPhysicsList
=
new
G4EmStandardPhysicsGS
();
175
176
}
else
if
(name ==
"emstandardSS"
) {
177
178
fEmName
=
name
;
179
delete
fEmPhysicsList
;
180
fEmPhysicsList
=
new
G4EmStandardPhysicsSS
();
181
182
}
else
if
(name ==
"empenelope"
){
183
fEmName
=
name
;
184
delete
fEmPhysicsList
;
185
fEmPhysicsList
=
new
G4EmPenelopePhysics
();
186
187
}
else
if
(name ==
"emlivermore"
){
188
fEmName
=
name
;
189
delete
fEmPhysicsList
;
190
fEmPhysicsList
=
new
G4EmLivermorePhysics
();
191
192
}
else
if
(name ==
"emlowenergy"
){
193
fEmName
=
name
;
194
delete
fEmPhysicsList
;
195
fEmPhysicsList
=
new
G4EmLowEPPhysics
();
196
197
}
else
{
198
199
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
200
<<
" is not defined"
201
<<
G4endl
;
202
}
203
}
204
205
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
206
207
void
PhysicsList::AddStepMax
()
208
{
209
// Step limitation seen as a process
210
StepMax
* stepMaxProcess =
new
StepMax
();
211
212
theParticleIterator
->reset();
213
while
((*
theParticleIterator
)()){
214
G4ParticleDefinition
* particle =
theParticleIterator
->value();
215
G4ProcessManager
* pmanager = particle->
GetProcessManager
();
216
217
if
(stepMaxProcess->
IsApplicable
(*particle))
218
{
219
pmanager ->
AddDiscreteProcess
(stepMaxProcess);
220
}
221
}
222
}
223
224
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4DecayPhysics.hh
G4VUserPhysicsList::SetDefaultCutValue
void SetDefaultCutValue(G4double newCutValue)
Definition:
G4VUserPhysicsList.cc:367
G4EmStandardPhysics_option4.hh
PhysicsList::ConstructParticle
void ConstructParticle()
Definition:
PhysicsList.cc:117
G4EmLivermorePhysics.hh
G4LossTableManager::Instance
static G4LossTableManager * Instance()
Definition:
G4LossTableManager.cc:112
G4EmStandardPhysics_option2
Definition:
G4EmStandardPhysics_option2.hh:55
name
G4String name
Definition:
TRTMaterials.hh:40
G4ProcessManager::AddDiscreteProcess
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
G4UnitsTable.hh
PhysicsList::fDecay
G4VPhysicsConstructor * fDecay
Definition:
PhysicsList.hh:66
G4EmPenelopePhysics.hh
G4LossTableManager.hh
G4ParticleDefinition
Definition:
G4ParticleDefinition.hh:111
G4EmStandardPhysics.hh
G4ParticleDefinition::GetProcessManager
G4ProcessManager * GetProcessManager() const
G4EmStandardPhysics_option1.hh
PhysicsList::fMessenger
PhysicsListMessenger * fMessenger
Definition:
PhysicsList.hh:78
G4EmStandardPhysics_option1
Definition:
G4EmStandardPhysics_option1.hh:54
PhysicsList::AddPhysicsList
void AddPhysicsList(const G4String &name)
Definition:
PhysicsList.cc:191
G4VModularPhysicsList::verboseLevel
G4int verboseLevel
Definition:
G4VModularPhysicsList.hh:146
G4EmStandardPhysics_option4
Definition:
G4EmStandardPhysics_option4.hh:53
G4VPhysicsConstructor::ConstructParticle
virtual void ConstructParticle()=0
StepMax
Definition:
StepMax.hh:46
G4EmLowEPPhysics
Definition:
G4EmLowEPPhysics.hh:35
G4cout
G4GLOB_DLL std::ostream G4cout
G4EmLivermorePhysics
Definition:
G4EmLivermorePhysics.hh:36
G4EmStandardPhysicsSS.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
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
StepMax::IsApplicable
virtual G4bool IsApplicable(const G4ParticleDefinition &)
Definition:
StepMax.cc:51
PhysicsList::fEmPhysicsList
G4VPhysicsConstructor * fEmPhysicsList
Definition:
PhysicsList.hh:73
G4VPhysicsConstructor::ConstructProcess
virtual void ConstructProcess()=0
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
fDecay
Definition:
G4ProcessType.hh:51
G4EmStandardPhysicsGS.hh
mm
static const double mm
Definition:
G4SIunits.hh:114
theParticleIterator
#define theParticleIterator
Definition:
G4VUserPhysicsList.hh:153
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
TestEm2
src
PhysicsList.cc
Generated on Thu Mar 3 2016 14:40:24 for Geant4 by
1.8.8