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
advanced
microbeam
src
examples/advanced/microbeam/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
// This example is provided by the Geant4-DNA collaboration
27
// Any report or published results obtained using the Geant4-DNA software
28
// shall cite the following Geant4-DNA collaboration publication:
29
// Med. Phys. 37 (2010) 4692-4708
30
// The Geant4-DNA web site is available at http://geant4-dna.org
31
//
32
// If you use this example, please cite the following publication:
33
// Rad. Prot. Dos. 133 (2009) 2-11
34
35
#include "PhysicsList.hh"
36
#include "PhysicsListMessenger.hh"
37
38
#include "
G4SystemOfUnits.hh
"
39
#include "
G4StepLimiter.hh
"
40
41
#include "
G4EmStandardPhysics.hh
"
42
#include "
G4EmStandardPhysics_option1.hh
"
43
#include "
G4EmStandardPhysics_option2.hh
"
44
#include "
G4EmStandardPhysics_option3.hh
"
45
#include "
G4EmStandardPhysics_option4.hh
"
46
#include "
G4EmLivermorePhysics.hh
"
47
#include "
G4EmPenelopePhysics.hh
"
48
#include "
G4DecayPhysics.hh
"
49
#include "
G4LossTableManager.hh
"
50
51
#include "
G4ProcessManager.hh
"
52
53
#include "
G4Gamma.hh
"
54
#include "
G4Electron.hh
"
55
#include "
G4Positron.hh
"
56
57
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
58
59
PhysicsList::PhysicsList
() :
G4VModularPhysicsList
()
60
{
61
G4LossTableManager::Instance
();
62
defaultCutValue
= 0.01*
micrometer
;
63
fCutForGamma =
defaultCutValue
;
64
fCutForElectron =
defaultCutValue
;
65
fCutForPositron =
defaultCutValue
;
66
67
fMessenger =
new
PhysicsListMessenger
(
this
);
68
69
SetVerboseLevel
(1);
70
71
// EM physics
72
fEmName =
G4String
(
"emlivermore"
);
73
74
fEmPhysicsList =
new
G4EmLivermorePhysics
();
75
76
// Deacy physics and all particles
77
fDecPhysicsList =
new
G4DecayPhysics
();
78
}
79
80
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
81
82
PhysicsList::~PhysicsList
()
83
{
84
delete
fMessenger;
85
delete
fEmPhysicsList;
86
delete
fDecPhysicsList;
87
}
88
89
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
90
91
void
PhysicsList::ConstructParticle
()
92
{
93
fDecPhysicsList->
ConstructParticle
();
94
}
95
96
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
97
98
void
PhysicsList::ConstructProcess
()
99
{
100
// transportation
101
AddTransportation
();
102
103
// electromagnetic physics list
104
fEmPhysicsList->
ConstructProcess
();
105
106
// decay physics list
107
fDecPhysicsList->
ConstructProcess
();
108
109
// step limitation (as a full process)
110
AddStepMax
();
111
112
}
113
114
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
115
116
void
PhysicsList::AddPhysicsList
(
const
G4String
&
name
)
117
{
118
if
(
verboseLevel
>1) {
119
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
<<
G4endl
;
120
}
121
122
if
(name == fEmName)
return
;
123
124
if
(name ==
"emstandard_opt0"
) {
125
126
fEmName =
name
;
127
delete
fEmPhysicsList;
128
fEmPhysicsList =
new
G4EmStandardPhysics
(1);
129
130
}
else
if
(name ==
"emstandard_opt1"
) {
131
132
fEmName =
name
;
133
delete
fEmPhysicsList;
134
fEmPhysicsList =
new
G4EmStandardPhysics_option1
();
135
136
}
else
if
(name ==
"emstandard_opt2"
) {
137
138
fEmName =
name
;
139
delete
fEmPhysicsList;
140
fEmPhysicsList =
new
G4EmStandardPhysics_option2
();
141
142
}
else
if
(name ==
"emstandard_opt3"
) {
143
144
fEmName =
name
;
145
delete
fEmPhysicsList;
146
fEmPhysicsList =
new
G4EmStandardPhysics_option3
();
147
148
}
else
if
(name ==
"emstandard_opt4"
) {
149
150
fEmName =
name
;
151
delete
fEmPhysicsList;
152
fEmPhysicsList =
new
G4EmStandardPhysics_option4
();
153
154
}
else
if
(name ==
"emlivermore"
) {
155
156
fEmName =
name
;
157
delete
fEmPhysicsList;
158
fEmPhysicsList =
new
G4EmLivermorePhysics
();
159
160
}
else
if
(name ==
"empenelope"
) {
161
162
fEmName =
name
;
163
delete
fEmPhysicsList;
164
fEmPhysicsList =
new
G4EmPenelopePhysics
();
165
166
}
167
}
168
169
170
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
171
172
void
PhysicsList::AddStepMax
()
173
{
174
// Step limitation seen as a process
175
176
fStepMaxProcess =
new
G4StepLimiter
();
177
178
theParticleIterator
->reset();
179
while
((*
theParticleIterator
)()){
180
G4ParticleDefinition
* particle =
theParticleIterator
->value();
181
G4ProcessManager
* pmanager = particle->
GetProcessManager
();
182
183
if
(fStepMaxProcess->
IsApplicable
(*particle) && pmanager)
184
{
185
pmanager ->
AddDiscreteProcess
(fStepMaxProcess);
186
}
187
}
188
}
189
190
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
191
192
void
PhysicsList::SetCuts
()
193
{
194
195
if
(
verboseLevel
>0){
196
G4cout
<<
"PhysicsList::SetCuts:"
;
197
G4cout
<<
"CutLength : "
<<
G4BestUnit
(
defaultCutValue
,
"Length"
) <<
G4endl
;
198
}
199
200
SetCutValue
(fCutForGamma,
"gamma"
);
201
SetCutValue
(fCutForElectron,
"e-"
);
202
SetCutValue
(fCutForPositron,
"e+"
);
203
204
if
(
verboseLevel
>0)
DumpCutValuesTable
();
205
}
206
207
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
208
209
void
PhysicsList::SetCutForGamma
(
G4double
cut)
210
{
211
fCutForGamma = cut;
212
SetParticleCuts
(fCutForGamma,
G4Gamma::Gamma
());
213
}
214
215
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
216
217
void
PhysicsList::SetCutForElectron
(
G4double
cut)
218
{
219
fCutForElectron = cut;
220
SetParticleCuts
(fCutForElectron,
G4Electron::Electron
());
221
}
222
223
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
224
225
void
PhysicsList::SetCutForPositron
(
G4double
cut)
226
{
227
fCutForPositron = cut;
228
SetParticleCuts
(fCutForPositron,
G4Positron::Positron
());
229
}
230
231
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
232
G4DecayPhysics.hh
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
G4VUserPhysicsList::SetCutValue
void SetCutValue(G4double aCut, const G4String &pname)
Definition:
G4VUserPhysicsList.cc:419
PhysicsList::SetCutForGamma
void SetCutForGamma(G4double)
Definition:
environments/g4py/examples/demos/TestEm0/g4lib/PhysicsList.cc:231
G4EmStandardPhysics_option2
Definition:
G4EmStandardPhysics_option2.hh:55
G4VUserPhysicsList::defaultCutValue
G4double defaultCutValue
Definition:
G4VUserPhysicsList.hh:361
G4ProcessManager::AddDiscreteProcess
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
PhysicsList::SetCutForPositron
void SetCutForPositron(G4double)
Definition:
environments/g4py/examples/demos/TestEm0/g4lib/PhysicsList.cc:247
G4EmPenelopePhysics.hh
name
const XML_Char * name
Definition:
include/expat.h:151
G4LossTableManager.hh
G4BestUnit
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
Definition:
G4SteppingVerbose.cc:53
G4ParticleDefinition
Definition:
G4ParticleDefinition.hh:111
G4EmStandardPhysics.hh
G4ParticleDefinition::GetProcessManager
G4ProcessManager * GetProcessManager() const
PhysicsList::SetCutForElectron
void SetCutForElectron(G4double)
Definition:
environments/g4py/examples/demos/TestEm0/g4lib/PhysicsList.cc:239
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
G4VUserPhysicsList::SetParticleCuts
void SetParticleCuts(G4double cut, G4ParticleDefinition *particle, G4Region *region=0)
Definition:
G4VUserPhysicsList.cc:463
G4VUserPhysicsList::DumpCutValuesTable
void DumpCutValuesTable(G4int flag=1)
Definition:
G4VUserPhysicsList.cc:805
G4cout
G4GLOB_DLL std::ostream G4cout
G4EmLivermorePhysics
Definition:
G4EmLivermorePhysics.hh:36
G4Positron.hh
G4ProcessManager.hh
G4StepLimiter.hh
G4StepLimiter
Definition:
G4StepLimiter.hh:45
G4VModularPhysicsList::SetVerboseLevel
void SetVerboseLevel(G4int value)
Definition:
G4VModularPhysicsList.cc:379
G4Gamma::Gamma
static G4Gamma * Gamma()
Definition:
G4Gamma.cc:86
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
G4EmStandardPhysics_option3
Definition:
G4EmStandardPhysics_option3.hh:52
G4Positron::Positron
static G4Positron * Positron()
Definition:
G4Positron.cc:94
G4Electron.hh
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
G4VPhysicsConstructor::ConstructProcess
virtual void ConstructProcess()=0
G4Electron::Electron
static G4Electron * Electron()
Definition:
G4Electron.cc:94
G4endl
#define G4endl
Definition:
G4ios.hh:61
G4ProcessManager
Definition:
G4ProcessManager.hh:106
G4double
double G4double
Definition:
G4Types.hh:76
G4SystemOfUnits.hh
PhysicsList::ConstructProcess
void ConstructProcess()
Definition:
environments/g4py/examples/demos/TestEm0/g4lib/PhysicsList.cc:170
G4EmPenelopePhysics
Definition:
G4EmPenelopePhysics.hh:36
python.hepunit.micrometer
int micrometer
Definition:
hepunit.py:34
theParticleIterator
#define theParticleIterator
Definition:
G4VUserPhysicsList.hh:153
G4VProcess::IsApplicable
virtual G4bool IsApplicable(const G4ParticleDefinition &)
Definition:
G4VProcess.hh:205
G4Gamma.hh
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:20 for Geant4.10 by
1.8.7