Geant4.10
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
geant4.10.00.p01
examples
extended
electromagnetic
TestEm2
src
examples/extended/electromagnetic/TestEm2/src/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
//
26
/// \file electromagnetic/TestEm2/src/PhysicsList.cc
27
/// \brief Implementation of the PhysicsList class
28
//
29
// $Id: PhysicsList.cc 75118 2013-10-28 09:40:24Z 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
47
#include "
G4DecayPhysics.hh
"
48
#include "StepMax.hh"
49
50
#include "
G4LossTableManager.hh
"
51
#include "
G4ProcessManager.hh
"
52
53
#include "
G4UnitsTable.hh
"
54
#include "
G4SystemOfUnits.hh
"
55
56
#include "
G4Threading.hh
"
57
58
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
59
60
PhysicsList::PhysicsList
()
61
:
G4VModularPhysicsList
(),fEmPhysicsList(0),fMessenger(0)
62
{
63
G4LossTableManager::Instance
();
64
SetDefaultCutValue
(1*
mm
);
65
66
fMessenger =
new
PhysicsListMessenger
(
this
);
67
SetVerboseLevel
(1);
68
69
// EM physics
70
fEmName =
"emstandard_opt0"
;
71
fEmPhysicsList =
new
G4EmStandardPhysics
();
72
fDecay =
new
G4DecayPhysics
();
73
}
74
75
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
76
77
PhysicsList::~PhysicsList
()
78
{
79
delete
fMessenger;
80
delete
fEmPhysicsList;
81
delete
fDecay;
82
}
83
84
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
85
86
void
PhysicsList::ConstructParticle
()
87
{
88
fEmPhysicsList->
ConstructParticle
();
89
fDecay->
ConstructParticle
();
90
}
91
92
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
93
94
void
PhysicsList::ConstructProcess
()
95
{
96
if
(
verboseLevel
>-1) {
97
G4cout
<<
"PhysicsList::ConstructProcess start"
<<
G4endl
;
98
}
99
// transportation
100
//
101
AddTransportation
();
102
103
// electromagnetic physics list
104
//
105
fEmPhysicsList->
ConstructProcess
();
106
107
// decay process
108
//
109
fDecay->
ConstructProcess
();
110
111
// step limitation (as a full process)
112
//
113
AddStepMax
();
114
}
115
116
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
117
118
void
PhysicsList::AddPhysicsList
(
const
G4String
&
name
)
119
{
120
if
(
verboseLevel
>0) {
121
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
<<
G4endl
;
122
}
123
124
if
(name == fEmName)
return
;
125
126
if
(name ==
"local"
) {
127
128
fEmName =
name
;
129
delete
fEmPhysicsList;
130
fEmPhysicsList =
new
PhysListEmStandard
(name);
131
132
}
else
if
(name ==
"emstandard_opt0"
) {
133
134
fEmName =
name
;
135
delete
fEmPhysicsList;
136
fEmPhysicsList =
new
G4EmStandardPhysics
();
137
138
}
else
if
(name ==
"emstandard_opt1"
) {
139
140
fEmName =
name
;
141
delete
fEmPhysicsList;
142
fEmPhysicsList =
new
G4EmStandardPhysics_option1
();
143
144
}
else
if
(name ==
"emstandard_opt2"
) {
145
146
fEmName =
name
;
147
delete
fEmPhysicsList;
148
fEmPhysicsList =
new
G4EmStandardPhysics_option2
();
149
150
}
else
if
(name ==
"emstandard_opt3"
) {
151
152
fEmName =
name
;
153
delete
fEmPhysicsList;
154
fEmPhysicsList =
new
G4EmStandardPhysics_option3
();
155
156
}
else
if
(name ==
"emstandard_opt4"
) {
157
158
fEmName =
name
;
159
delete
fEmPhysicsList;
160
fEmPhysicsList =
new
G4EmStandardPhysics_option4
();
161
162
}
else
if
(name ==
"empenelope"
){
163
fEmName =
name
;
164
delete
fEmPhysicsList;
165
fEmPhysicsList =
new
G4EmPenelopePhysics
();
166
167
}
else
if
(name ==
"emlivermore"
){
168
fEmName =
name
;
169
delete
fEmPhysicsList;
170
fEmPhysicsList =
new
G4EmLivermorePhysics
();
171
172
}
else
{
173
174
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
175
<<
" is not defined"
176
<<
G4endl
;
177
}
178
}
179
180
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
181
182
void
PhysicsList::AddStepMax
()
183
{
184
// Step limitation seen as a process
185
StepMax
* stepMaxProcess =
new
StepMax
();
186
187
theParticleIterator
->reset();
188
while
((*
theParticleIterator
)()){
189
G4ParticleDefinition
* particle =
theParticleIterator
->value();
190
G4ProcessManager
* pmanager = particle->
GetProcessManager
();
191
192
if
(stepMaxProcess->
IsApplicable
(*particle))
193
{
194
pmanager ->
AddDiscreteProcess
(stepMaxProcess);
195
}
196
}
197
}
198
199
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
200
201
void
PhysicsList::SetCuts
()
202
{
203
#ifdef G4MULTITHREADED
204
if
(
G4Threading::IsWorkerThread
()) {
205
if
(
verboseLevel
>1) {
DumpCutValuesTable
(); }
206
}
else
{
207
if
(
verboseLevel
>0) {
DumpCutValuesTable
(); }
208
}
209
#else
210
if
(
verboseLevel
>0) {
DumpCutValuesTable
(); }
211
#endif
212
}
213
214
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4DecayPhysics.hh
G4VUserPhysicsList::SetDefaultCutValue
void SetDefaultCutValue(G4double newCutValue)
Definition:
G4VUserPhysicsList.cc:367
G4EmStandardPhysics_option4.hh
PhysicsList::ConstructParticle
void ConstructParticle()
Definition:
environments/g4py/examples/demos/TestEm0/g4lib/PhysicsList.cc:117
G4EmLivermorePhysics.hh
G4LossTableManager::Instance
static G4LossTableManager * Instance()
Definition:
G4LossTableManager.cc:112
G4EmStandardPhysics_option2
Definition:
G4EmStandardPhysics_option2.hh:55
G4ProcessManager::AddDiscreteProcess
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
G4UnitsTable.hh
G4EmPenelopePhysics.hh
name
const XML_Char * name
Definition:
include/expat.h:151
G4LossTableManager.hh
G4ParticleDefinition
Definition:
G4ParticleDefinition.hh:111
G4EmStandardPhysics.hh
G4ParticleDefinition::GetProcessManager
G4ProcessManager * GetProcessManager() const
G4EmStandardPhysics_option1.hh
G4EmStandardPhysics_option1
Definition:
G4EmStandardPhysics_option1.hh:54
PhysicsList::AddPhysicsList
void AddPhysicsList(const G4String &name)
Definition:
environments/g4py/examples/demos/TestEm0/g4lib/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:
electromagnetic/TestEm1/include/StepMax.hh:46
G4VUserPhysicsList::DumpCutValuesTable
void DumpCutValuesTable(G4int flag=1)
Definition:
G4VUserPhysicsList.cc:805
G4cout
G4GLOB_DLL std::ostream G4cout
G4Threading.hh
G4EmLivermorePhysics
Definition:
G4EmLivermorePhysics.hh:36
G4ProcessManager.hh
python.hepunit.mm
mm
Definition:
hepunit.py:46
G4VModularPhysicsList::SetVerboseLevel
void SetVerboseLevel(G4int value)
Definition:
G4VModularPhysicsList.cc:379
PhysicsList::~PhysicsList
~PhysicsList()
Definition:
environments/g4py/examples/demos/TestEm0/g4lib/PhysicsList.cc:65
PhysicsList::SetCuts
void SetCuts()
Definition:
environments/g4py/examples/demos/TestEm0/g4lib/PhysicsList.cc:219
G4EmStandardPhysics_option3.hh
PhysicsList::AddStepMax
void AddStepMax()
Definition:
examples/advanced/microbeam/src/PhysicsList.cc:172
G4Threading::IsWorkerThread
G4bool IsWorkerThread()
Definition:
G4Threading.cc:104
G4EmStandardPhysics_option3
Definition:
G4EmStandardPhysics_option3.hh:52
PhysListEmStandard
Definition:
environments/g4py/examples/demos/TestEm0/g4lib/PhysListEmStandard.hh:40
G4VUserPhysicsList::AddTransportation
void AddTransportation()
Definition:
G4VUserPhysicsList.cc:947
PhysicsList::PhysicsList
PhysicsList()
Definition:
environments/g4py/examples/demos/TestEm0/g4lib/PhysicsList.cc:43
G4DecayPhysics
Definition:
G4DecayPhysics.hh:49
G4EmStandardPhysics_option2.hh
StepMax::IsApplicable
virtual G4bool IsApplicable(const G4ParticleDefinition &)
Definition:
electromagnetic/TestEm1/src/StepMax.cc:51
G4VPhysicsConstructor::ConstructProcess
virtual void ConstructProcess()=0
G4endl
#define G4endl
Definition:
G4ios.hh:61
G4ProcessManager
Definition:
G4ProcessManager.hh:106
G4SystemOfUnits.hh
PhysicsList::ConstructProcess
void ConstructProcess()
Definition:
environments/g4py/examples/demos/TestEm0/g4lib/PhysicsList.cc:170
G4EmPenelopePhysics
Definition:
G4EmPenelopePhysics.hh:36
theParticleIterator
#define theParticleIterator
Definition:
G4VUserPhysicsList.hh:153
G4VModularPhysicsList
Definition:
G4VModularPhysicsList.hh:90
G4String
Definition:
examples/extended/parallel/TopC/ParN02/AnnotatedFiles/G4String.hh:45
PhysicsListMessenger
Definition:
environments/g4py/examples/demos/TestEm0/g4lib/PhysicsListMessenger.hh:44
G4EmStandardPhysics
Definition:
G4EmStandardPhysics.hh:52
Generated on Wed Apr 30 2014 15:55:21 for Geant4.10 by
1.8.7