Geant4
10.02
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 92047 2015-08-14 07:23:37Z gcosmo $
30
//
31
//---------------------------------------------------------------------------
32
//
33
// ClassName: PhysicsList
34
//
35
// Description: EM physics with a possibility to add PAI model
36
//
37
// Author: V.Ivanchenko 01.09.2010
38
//
39
//----------------------------------------------------------------------------
40
//
41
42
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
43
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
44
45
#include "PhysicsList.hh"
46
#include "PhysicsListMessenger.hh"
47
48
#include "
G4EmStandardPhysics.hh
"
49
#include "
G4EmStandardPhysics_option1.hh
"
50
#include "
G4EmStandardPhysics_option2.hh
"
51
#include "
G4EmStandardPhysics_option3.hh
"
52
#include "
G4EmStandardPhysics_option4.hh
"
53
#include "
G4EmStandardPhysicsGS.hh
"
54
#include "
G4EmStandardPhysicsSS.hh
"
55
#include "
G4EmStandardPhysicsWVI.hh
"
56
#include "
G4EmLivermorePhysics.hh
"
57
#include "
G4EmPenelopePhysics.hh
"
58
#include "
G4EmLowEPPhysics.hh
"
59
#include "
G4DecayPhysics.hh
"
60
61
#include "
G4PAIModel.hh
"
62
#include "
G4PAIPhotModel.hh
"
63
64
#include "
G4Gamma.hh
"
65
#include "
G4Electron.hh
"
66
#include "
G4Positron.hh
"
67
#include "
G4Proton.hh
"
68
69
#include "
G4UnitsTable.hh
"
70
#include "
G4SystemOfUnits.hh
"
71
#include "
G4LossTableManager.hh
"
72
#include "
G4ProductionCutsTable.hh
"
73
#include "
G4EmConfigurator.hh
"
74
#include "
G4EmParameters.hh
"
75
76
#include "StepMax.hh"
77
78
#include "
G4ProcessManager.hh
"
79
#include "
G4ParticleTypes.hh
"
80
#include "
G4ParticleTable.hh
"
81
82
G4ThreadLocal
StepMax
*
PhysicsList::fStepMaxProcess
= 0;
83
84
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
85
86
PhysicsList::PhysicsList
() :
G4VModularPhysicsList
(),
87
fEmPhysicsList(0),
88
fDecayPhysicsList(0),
89
fMessenger(0)
90
{
91
// set verbosity for zero to avoid double printout
92
// on physics verbosity should be restored to 1 when cuts
93
// are set
94
G4EmParameters::Instance
()->
SetVerbose
(0);
95
96
SetDefaultCutValue
(1*
mm
);
97
98
fMessenger
=
new
PhysicsListMessenger
(
this
);
99
100
// Decay Physics is always defined
101
fDecayPhysicsList
=
new
G4DecayPhysics
();
102
103
// EM physics
104
fEmName
=
G4String
(
"emstandard_opt0"
);
105
fEmPhysicsList
=
new
G4EmStandardPhysics
(0);
106
107
SetVerboseLevel
(1);
108
}
109
110
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
111
112
PhysicsList::~PhysicsList
()
113
{
114
delete
fMessenger
;
115
delete
fDecayPhysicsList
;
116
delete
fEmPhysicsList
;
117
}
118
119
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
120
121
void
PhysicsList::ConstructParticle
()
122
{
123
fDecayPhysicsList
->
ConstructParticle
();
124
}
125
126
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
127
128
void
PhysicsList::ConstructProcess
()
129
{
130
AddTransportation
();
131
fEmPhysicsList
->
ConstructProcess
();
132
fDecayPhysicsList
->
ConstructProcess
();
133
AddStepMax
();
134
}
135
136
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
137
138
void
PhysicsList::AddPhysicsList
(
const
G4String
&
name
)
139
{
140
if
(
verboseLevel
>1) {
141
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
<<
G4endl
;
142
}
143
144
if
(name ==
fEmName
) {
145
return
;
146
147
}
else
if
(name ==
"emstandard_opt0"
) {
148
149
fEmName
=
name
;
150
delete
fEmPhysicsList
;
151
fEmPhysicsList
=
new
G4EmStandardPhysics
(0);
152
153
}
else
if
(name ==
"emstandard_opt1"
) {
154
155
fEmName
=
name
;
156
delete
fEmPhysicsList
;
157
fEmPhysicsList
=
new
G4EmStandardPhysics_option1
(0);
158
159
}
else
if
(name ==
"emstandard_opt2"
) {
160
161
fEmName
=
name
;
162
delete
fEmPhysicsList
;
163
fEmPhysicsList
=
new
G4EmStandardPhysics_option2
(0);
164
165
}
else
if
(name ==
"emstandard_opt3"
) {
166
167
fEmName
=
name
;
168
delete
fEmPhysicsList
;
169
fEmPhysicsList
=
new
G4EmStandardPhysics_option3
(0);
170
171
}
else
if
(name ==
"emstandard_opt4"
) {
172
173
fEmName
=
name
;
174
delete
fEmPhysicsList
;
175
fEmPhysicsList
=
new
G4EmStandardPhysics_option4
(0);
176
177
}
else
if
(name ==
"emstandardWVI"
) {
178
179
fEmName
=
name
;
180
delete
fEmPhysicsList
;
181
fEmPhysicsList
=
new
G4EmStandardPhysicsWVI
(0);
182
183
}
else
if
(name ==
"emstandardSS"
) {
184
185
fEmName
=
name
;
186
delete
fEmPhysicsList
;
187
fEmPhysicsList
=
new
G4EmStandardPhysicsSS
(0);
188
189
}
else
if
(name ==
"emstandardGS"
) {
190
191
fEmName
=
name
;
192
delete
fEmPhysicsList
;
193
fEmPhysicsList
=
new
G4EmStandardPhysicsGS
(0);
194
195
}
else
if
(name ==
"emlivermore"
) {
196
197
fEmName
=
name
;
198
delete
fEmPhysicsList
;
199
fEmPhysicsList
=
new
G4EmLivermorePhysics
(0);
200
201
}
else
if
(name ==
"empenelope"
) {
202
203
fEmName
=
name
;
204
delete
fEmPhysicsList
;
205
fEmPhysicsList
=
new
G4EmPenelopePhysics
(0);
206
207
}
else
if
(name ==
"emlowenergy"
) {
208
209
fEmName
=
name
;
210
delete
fEmPhysicsList
;
211
fEmPhysicsList
=
new
G4EmLowEPPhysics
(0);
212
213
}
else
{
214
215
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
216
<<
" is not defined"
217
<<
G4endl
;
218
}
219
}
220
221
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
222
223
void
PhysicsList::AddStepMax
()
224
{
225
// Step limitation seen as a process
226
fStepMaxProcess
=
new
StepMax
();
227
228
theParticleIterator
->reset();
229
while
((*
theParticleIterator
)())
230
{
231
G4ParticleDefinition
* particle =
theParticleIterator
->value();
232
G4ProcessManager
* pmanager = particle->
GetProcessManager
();
233
234
if
(
fStepMaxProcess
->
IsApplicable
(*particle))
235
{
236
pmanager->
AddDiscreteProcess
(
fStepMaxProcess
);
237
}
238
}
239
}
240
241
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
242
243
void
PhysicsList::SetCuts
()
244
{
245
G4ProductionCutsTable::GetProductionCutsTable
()->
SetEnergyRange
(100.*
eV
,1e5);
246
if
(
verboseLevel
> 0 ) {
DumpCutValuesTable
(); }
247
}
248
249
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
250
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
G4EmParameters::SetVerbose
void SetVerbose(G4int val)
Definition:
G4EmParameters.cc:637
G4ProductionCutsTable::SetEnergyRange
void SetEnergyRange(G4double lowedge, G4double highedge)
Definition:
G4ProductionCutsTable.cc:329
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
G4EmPenelopePhysics.hh
G4LossTableManager.hh
G4ParticleDefinition
Definition:
G4ParticleDefinition.hh:111
G4ThreadLocal
#define G4ThreadLocal
Definition:
tls.hh:89
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
G4EmConfigurator.hh
G4VModularPhysicsList::verboseLevel
G4int verboseLevel
Definition:
G4VModularPhysicsList.hh:146
G4EmStandardPhysics_option4
Definition:
G4EmStandardPhysics_option4.hh:53
G4ParticleTypes.hh
G4VPhysicsConstructor::ConstructParticle
virtual void ConstructParticle()=0
StepMax
Definition:
StepMax.hh:46
G4VUserPhysicsList::DumpCutValuesTable
void DumpCutValuesTable(G4int flag=1)
Definition:
G4VUserPhysicsList.cc:814
G4EmLowEPPhysics
Definition:
G4EmLowEPPhysics.hh:35
G4cout
G4GLOB_DLL std::ostream G4cout
G4ParticleTable.hh
G4EmLivermorePhysics
Definition:
G4EmLivermorePhysics.hh:36
G4EmStandardPhysicsSS.hh
G4Proton.hh
G4Positron.hh
G4ProcessManager.hh
G4EmParameters.hh
G4EmStandardPhysicsGS
Definition:
G4EmStandardPhysicsGS.hh:52
G4VModularPhysicsList::SetVerboseLevel
void SetVerboseLevel(G4int value)
Definition:
G4VModularPhysicsList.cc:379
PhysicsList::~PhysicsList
~PhysicsList()
Definition:
PhysicsList.cc:65
PhysicsList::SetCuts
void SetCuts()
Definition:
PhysicsList.cc:219
G4EmStandardPhysicsSS
Definition:
G4EmStandardPhysicsSS.hh:50
G4EmStandardPhysics_option3.hh
PhysicsList::AddStepMax
void AddStepMax()
Definition:
PhysicsList.cc:172
G4EmStandardPhysics_option3
Definition:
G4EmStandardPhysics_option3.hh:52
PhysicsList::fDecayPhysicsList
G4VPhysicsConstructor * fDecayPhysicsList
Definition:
PhysicsList.hh:75
G4ProductionCutsTable::GetProductionCutsTable
static G4ProductionCutsTable * GetProductionCutsTable()
Definition:
G4ProductionCutsTable.cc:63
G4PAIPhotModel.hh
eV
static const double eV
Definition:
G4SIunits.hh:212
G4Electron.hh
G4ProductionCutsTable.hh
G4VUserPhysicsList::AddTransportation
void AddTransportation()
Definition:
G4VUserPhysicsList.cc:956
PhysicsList::PhysicsList
PhysicsList()
Definition:
PhysicsList.cc:43
G4DecayPhysics
Definition:
G4DecayPhysics.hh:49
G4EmParameters::Instance
static G4EmParameters * Instance()
Definition:
G4EmParameters.cc:59
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
theParticleIterator
#define theParticleIterator
Definition:
G4VUserPhysicsList.hh:153
G4VProcess::IsApplicable
virtual G4bool IsApplicable(const G4ParticleDefinition &)
Definition:
G4VProcess.hh:205
G4PAIModel.hh
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
examples
extended
electromagnetic
TestEm8
src
PhysicsList.cc
Generated on Thu Dec 31 2015 10:42:47 for Geant4 by
1.8.8