Geant4
9.6.p02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
geant4_9_6_p02
examples
extended
medical
fanoCavity
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
//
28
//
29
// $Id$
30
//
31
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33
34
#include "PhysicsList.hh"
35
#include "PhysicsListMessenger.hh"
36
37
#include "PhysListEmStandard_option0.hh"
38
#include "PhysListEmStandard_option3.hh"
39
#include "PhysListEmStandard_GS.hh"
40
#include "PhysListEmStandard_WVI.hh"
41
#include "PhysListEmStandard_SS.hh"
42
43
#include "StepMax.hh"
44
45
#include "
G4ParticleDefinition.hh
"
46
47
#include "
G4ProcessManager.hh
"
48
#include "
G4LossTableManager.hh
"
49
50
// Bosons
51
#include "
G4ChargedGeantino.hh
"
52
#include "
G4Geantino.hh
"
53
#include "
G4Gamma.hh
"
54
55
// leptons
56
#include "
G4Electron.hh
"
57
#include "
G4Positron.hh
"
58
59
// Hadrons
60
#include "
G4Proton.hh
"
61
62
#include "
G4SystemOfUnits.hh
"
63
64
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
65
66
PhysicsList::PhysicsList
(
DetectorConstruction
* det)
67
:
G4VModularPhysicsList
(), fDetector(det)
68
{
69
G4LossTableManager::Instance
();
70
fMessenger =
new
PhysicsListMessenger
(
this
);
71
72
// EM physics
73
fEmName =
G4String
(
"standard_opt3"
);
74
fEmPhysicsList =
new
PhysListEmStandard_option3
(fEmName,fDetector);
75
76
defaultCutValue
= 10*
km
;
77
78
SetVerboseLevel
(1);
79
80
G4LossTableManager::Instance
();
81
}
82
83
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
84
85
PhysicsList::~PhysicsList
()
86
{
87
delete
fEmPhysicsList;
88
delete
fMessenger;
89
}
90
91
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
92
93
void
PhysicsList::ConstructParticle
()
94
{
95
// pseudo-particles
96
G4Geantino::GeantinoDefinition
();
97
G4ChargedGeantino::ChargedGeantinoDefinition
();
98
99
// gamma
100
G4Gamma::GammaDefinition
();
101
102
// leptons
103
G4Electron::ElectronDefinition
();
104
G4Positron::PositronDefinition
();
105
106
// baryons
107
G4Proton::ProtonDefinition
();
108
}
109
110
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
111
112
void
PhysicsList::ConstructProcess
()
113
{
114
AddTransportation
();
115
fEmPhysicsList->
ConstructProcess
();
116
117
AddStepMax
();
118
}
119
120
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
121
122
void
PhysicsList::AddStepMax
()
123
{
124
// Step limitation seen as a process
125
StepMax
* stepMaxProcess =
new
StepMax
();
126
127
theParticleIterator
->
reset
();
128
while
((*
theParticleIterator
)()){
129
G4ParticleDefinition
* particle =
theParticleIterator
->
value
();
130
G4ProcessManager
* pmanager = particle->
GetProcessManager
();
131
132
if
(stepMaxProcess->
IsApplicable
(*particle) && !particle->
IsShortLived
())
133
{
134
pmanager ->
AddDiscreteProcess
(stepMaxProcess);
135
}
136
}
137
}
138
139
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
140
141
void
PhysicsList::AddPhysicsList
(
const
G4String
&
name
)
142
{
143
if
(
verboseLevel
>-1) {
144
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
<<
G4endl
;
145
}
146
147
if
(name == fEmName)
return
;
148
149
if
(name ==
"standard_opt0"
) {
150
151
fEmName =
name
;
152
delete
fEmPhysicsList;
153
fEmPhysicsList =
new
PhysListEmStandard_option0
(name,fDetector);
154
155
}
else
if
(name ==
"standard_opt3"
) {
156
157
fEmName =
name
;
158
delete
fEmPhysicsList;
159
fEmPhysicsList =
new
PhysListEmStandard_option3
(name,fDetector);
160
161
}
else
if
(name ==
"standard_GS"
) {
162
163
fEmName =
name
;
164
delete
fEmPhysicsList;
165
fEmPhysicsList =
new
PhysListEmStandard_GS
(name,fDetector);
166
167
}
else
if
(name ==
"standard_WVI"
) {
168
169
fEmName =
name
;
170
delete
fEmPhysicsList;
171
fEmPhysicsList =
new
PhysListEmStandard_WVI
(name,fDetector);
172
173
}
else
if
(name ==
"standard_SS"
) {
174
175
fEmName =
name
;
176
delete
fEmPhysicsList;
177
fEmPhysicsList =
new
PhysListEmStandard_SS
(name,fDetector);
178
}
else
{
179
180
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
181
<<
" is not defined"
182
<<
G4endl
;
183
}
184
}
185
186
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
187
188
#include "
G4UnitsTable.hh
"
189
190
void
PhysicsList::SetCuts
()
191
{
192
if
(
verboseLevel
>0){
193
G4cout
<<
"PhysicsList::SetCuts:"
;
194
G4cout
<<
"CutLength : "
<<
G4BestUnit
(
defaultCutValue
,
"Length"
) <<
G4endl
;
195
}
196
197
// set cut values for gamma at first and for e- second and next for e+,
198
// because some processes for e+/e- need cut values for gamma
199
SetCutValue
(
defaultCutValue
,
"gamma"
);
200
SetCutValue
(
defaultCutValue
,
"e-"
);
201
SetCutValue
(
defaultCutValue
,
"e+"
);
202
SetCutValue
(
defaultCutValue
,
"proton"
);
203
}
204
205
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Generated on Sat May 25 2013 14:31:57 for Geant4 by
1.8.4