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 82293 2014-06-13 15:23:19Z 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 "
G4EmLivermorePhysics.hh
"
45
#include "
G4EmPenelopePhysics.hh
"
46
#include "
G4EmLowEPPhysics.hh
"
47
48
#include "
G4DecayPhysics.hh
"
49
#include "StepMax.hh"
50
51
#include "
G4LossTableManager.hh
"
52
#include "
G4ProcessManager.hh
"
53
54
#include "
G4UnitsTable.hh
"
55
#include "
G4SystemOfUnits.hh
"
56
57
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
58
59
PhysicsList::PhysicsList
()
60
:
G4VModularPhysicsList
(),fEmPhysicsList(0),
fDecay
(0),fMessenger(0)
61
{
62
SetVerboseLevel
(1);
63
fMessenger
=
new
PhysicsListMessenger
(
this
);
64
65
// EM physics
66
fEmName
=
"emstandard_opt0"
;
67
fEmPhysicsList
=
new
G4EmStandardPhysics
();
68
fDecay
=
new
G4DecayPhysics
();
69
70
G4LossTableManager::Instance
();
71
SetDefaultCutValue
(1*
mm
);
72
}
73
74
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
75
76
PhysicsList::~PhysicsList
()
77
{
78
delete
fMessenger
;
79
delete
fEmPhysicsList
;
80
delete
fDecay
;
81
}
82
83
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
84
85
void
PhysicsList::ConstructParticle
()
86
{
87
fEmPhysicsList
->
ConstructParticle
();
88
fDecay
->
ConstructParticle
();
89
}
90
91
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
92
93
void
PhysicsList::ConstructProcess
()
94
{
95
if
(
verboseLevel
> -1) {
96
G4cout
<<
"PhysicsList::ConstructProcess start"
<<
G4endl
;
97
}
98
// transportation
99
//
100
AddTransportation
();
101
102
// electromagnetic physics list
103
//
104
fEmPhysicsList
->
ConstructProcess
();
105
106
// decay process
107
//
108
fDecay
->
ConstructProcess
();
109
110
// step limitation (as a full process)
111
//
112
AddStepMax
();
113
}
114
115
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
116
117
void
PhysicsList::AddPhysicsList
(
const
G4String
&
name
)
118
{
119
if
(
verboseLevel
>0) {
120
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
<<
G4endl
;
121
}
122
123
if
(name ==
fEmName
)
return
;
124
125
if
(name ==
"local"
) {
126
127
fEmName
=
name
;
128
delete
fEmPhysicsList
;
129
fEmPhysicsList
=
new
PhysListEmStandard
(name);
130
131
}
else
if
(name ==
"emstandard_opt0"
) {
132
133
fEmName
=
name
;
134
delete
fEmPhysicsList
;
135
fEmPhysicsList
=
new
G4EmStandardPhysics
();
136
137
}
else
if
(name ==
"emstandard_opt1"
) {
138
139
fEmName
=
name
;
140
delete
fEmPhysicsList
;
141
fEmPhysicsList
=
new
G4EmStandardPhysics_option1
();
142
143
}
else
if
(name ==
"emstandard_opt2"
) {
144
145
fEmName
=
name
;
146
delete
fEmPhysicsList
;
147
fEmPhysicsList
=
new
G4EmStandardPhysics_option2
();
148
149
}
else
if
(name ==
"emstandard_opt3"
) {
150
151
fEmName
=
name
;
152
delete
fEmPhysicsList
;
153
fEmPhysicsList
=
new
G4EmStandardPhysics_option3
();
154
155
}
else
if
(name ==
"emstandard_opt4"
) {
156
157
fEmName
=
name
;
158
delete
fEmPhysicsList
;
159
fEmPhysicsList
=
new
G4EmStandardPhysics_option4
();
160
161
}
else
if
(name ==
"empenelope"
){
162
fEmName
=
name
;
163
delete
fEmPhysicsList
;
164
fEmPhysicsList
=
new
G4EmPenelopePhysics
();
165
166
}
else
if
(name ==
"emlivermore"
){
167
fEmName
=
name
;
168
delete
fEmPhysicsList
;
169
fEmPhysicsList
=
new
G4EmLivermorePhysics
();
170
171
}
else
if
(name ==
"emlowenergy"
){
172
fEmName
=
name
;
173
delete
fEmPhysicsList
;
174
fEmPhysicsList
=
new
G4EmLowEPPhysics
();
175
176
}
else
{
177
178
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
179
<<
" is not defined"
180
<<
G4endl
;
181
}
182
}
183
184
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
185
186
void
PhysicsList::AddStepMax
()
187
{
188
// Step limitation seen as a process
189
StepMax
* stepMaxProcess =
new
StepMax
();
190
191
theParticleIterator
->reset();
192
while
((*
theParticleIterator
)()){
193
G4ParticleDefinition
* particle =
theParticleIterator
->value();
194
G4ProcessManager
* pmanager = particle->
GetProcessManager
();
195
196
if
(stepMaxProcess->
IsApplicable
(*particle))
197
{
198
pmanager ->
AddDiscreteProcess
(stepMaxProcess);
199
}
200
}
201
}
202
203
//....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:114
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
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
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
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
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
mm
static const double mm
Definition:
G4SIunits.hh:102
theParticleIterator
#define theParticleIterator
Definition:
G4VUserPhysicsList.hh:153
G4VModularPhysicsList
Definition:
G4VModularPhysicsList.hh:90
G4String
Definition:
G4String.hh:45
PhysicsListMessenger
Definition:
PhysicsListMessenger.hh:44
G4EmStandardPhysics
Definition:
G4EmStandardPhysics.hh:52
source
examples
extended
electromagnetic
TestEm2
src
PhysicsList.cc
Generated on Fri Dec 12 2014 22:46:58 for Geant4 by
1.8.8