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
analysis
shared
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
//
30
// $Id$
31
//
32
//
33
34
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
35
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
36
37
#include "PhysicsList.hh"
38
39
#include "
G4ProcessManager.hh
"
40
41
#include "
G4BosonConstructor.hh
"
42
#include "
G4LeptonConstructor.hh
"
43
#include "
G4MesonConstructor.hh
"
44
#include "
G4BosonConstructor.hh
"
45
#include "
G4BaryonConstructor.hh
"
46
#include "
G4IonConstructor.hh
"
47
#include "
G4SystemOfUnits.hh
"
48
49
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
50
51
PhysicsList::PhysicsList
():
G4VUserPhysicsList
()
52
{
53
defaultCutValue
= 1.0*
mm
;
54
SetVerboseLevel
(1);
55
}
56
57
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
58
59
PhysicsList::~PhysicsList
()
60
{}
61
62
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
63
64
void
PhysicsList::ConstructParticle
()
65
{
66
// In this method, static member functions should be called
67
// for all particles which you want to use.
68
// This ensures that objects of these particle types will be
69
// created in the program.
70
71
G4BosonConstructor
pBosonConstructor;
72
pBosonConstructor.
ConstructParticle
();
73
74
G4LeptonConstructor
pLeptonConstructor;
75
pLeptonConstructor.
ConstructParticle
();
76
77
G4MesonConstructor
pMesonConstructor;
78
pMesonConstructor.
ConstructParticle
();
79
80
G4BaryonConstructor
pBaryonConstructor;
81
pBaryonConstructor.
ConstructParticle
();
82
83
G4IonConstructor
pIonConstructor;
84
pIonConstructor.
ConstructParticle
();
85
}
86
87
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
88
89
void
PhysicsList::ConstructProcess
()
90
{
91
AddTransportation
();
92
ConstructEM();
93
ConstructDecay();
94
}
95
96
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
97
98
#include "
G4PhysicsListHelper.hh
"
99
100
#include "
G4ComptonScattering.hh
"
101
#include "
G4GammaConversion.hh
"
102
#include "
G4PhotoElectricEffect.hh
"
103
104
#include "
G4eMultipleScattering.hh
"
105
#include "
G4eIonisation.hh
"
106
#include "
G4eBremsstrahlung.hh
"
107
#include "
G4eplusAnnihilation.hh
"
108
109
#include "
G4MuMultipleScattering.hh
"
110
#include "
G4MuIonisation.hh
"
111
#include "
G4MuBremsstrahlung.hh
"
112
#include "
G4MuPairProduction.hh
"
113
114
#include "
G4hMultipleScattering.hh
"
115
#include "
G4hIonisation.hh
"
116
#include "
G4hBremsstrahlung.hh
"
117
#include "
G4hPairProduction.hh
"
118
119
#include "
G4ionIonisation.hh
"
120
121
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
122
123
void
PhysicsList::ConstructEM()
124
{
125
G4PhysicsListHelper
* ph =
G4PhysicsListHelper::GetPhysicsListHelper
();
126
127
theParticleIterator
->
reset
();
128
while
( (*
theParticleIterator
)() ){
129
G4ParticleDefinition
* particle =
theParticleIterator
->
value
();
130
G4String
particleName = particle->
GetParticleName
();
131
132
if
(particleName ==
"gamma"
) {
133
// gamma
134
ph->
RegisterProcess
(
new
G4PhotoElectricEffect
, particle);
135
ph->
RegisterProcess
(
new
G4ComptonScattering
, particle);
136
ph->
RegisterProcess
(
new
G4GammaConversion
, particle);
137
138
}
else
if
(particleName ==
"e-"
) {
139
//electron
140
ph->
RegisterProcess
(
new
G4eMultipleScattering
, particle);
141
ph->
RegisterProcess
(
new
G4eIonisation
, particle);
142
ph->
RegisterProcess
(
new
G4eBremsstrahlung
, particle);
143
144
}
else
if
(particleName ==
"e+"
) {
145
//positron
146
ph->
RegisterProcess
(
new
G4eMultipleScattering
, particle);
147
ph->
RegisterProcess
(
new
G4eIonisation
, particle);
148
ph->
RegisterProcess
(
new
G4eBremsstrahlung
, particle);
149
ph->
RegisterProcess
(
new
G4eplusAnnihilation
, particle);
150
151
}
else
if
( particleName ==
"mu+"
||
152
particleName ==
"mu-"
) {
153
//muon
154
ph->
RegisterProcess
(
new
G4MuMultipleScattering
, particle);
155
ph->
RegisterProcess
(
new
G4MuIonisation
, particle);
156
ph->
RegisterProcess
(
new
G4MuBremsstrahlung
, particle);
157
ph->
RegisterProcess
(
new
G4MuPairProduction
, particle);
158
159
}
else
if
( particleName ==
"proton"
||
160
particleName ==
"pi-"
||
161
particleName ==
"pi+"
) {
162
//proton
163
ph->
RegisterProcess
(
new
G4hMultipleScattering
, particle);
164
ph->
RegisterProcess
(
new
G4hIonisation
, particle);
165
ph->
RegisterProcess
(
new
G4hBremsstrahlung
, particle);
166
ph->
RegisterProcess
(
new
G4hPairProduction
, particle);
167
168
}
else
if
( particleName ==
"alpha"
||
169
particleName ==
"He3"
) {
170
//alpha
171
ph->
RegisterProcess
(
new
G4hMultipleScattering
, particle);
172
ph->
RegisterProcess
(
new
G4ionIonisation
, particle);
173
174
}
else
if
( particleName ==
"GenericIon"
) {
175
//Ions
176
ph->
RegisterProcess
(
new
G4hMultipleScattering
, particle);
177
ph->
RegisterProcess
(
new
G4ionIonisation
, particle);
178
179
}
else
if
((!particle->
IsShortLived
()) &&
180
(particle->
GetPDGCharge
() != 0.0) &&
181
(particle->
GetParticleName
() !=
"chargedgeantino"
)) {
182
//all others charged particles except geantino
183
ph->
RegisterProcess
(
new
G4hMultipleScattering
, particle);
184
ph->
RegisterProcess
(
new
G4hIonisation
, particle);
185
}
186
}
187
}
188
189
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
190
191
#include "
G4Decay.hh
"
192
193
void
PhysicsList::ConstructDecay()
194
{
195
G4PhysicsListHelper
* ph =
G4PhysicsListHelper::GetPhysicsListHelper
();
196
197
// Add Decay Process
198
G4Decay
* theDecayProcess =
new
G4Decay
();
199
theParticleIterator
->
reset
();
200
while
( (*
theParticleIterator
)() ){
201
G4ParticleDefinition
* particle =
theParticleIterator
->
value
();
202
if
(theDecayProcess->
IsApplicable
(*particle)) {
203
ph->
RegisterProcess
(theDecayProcess, particle);
204
}
205
}
206
}
207
208
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
209
210
void
PhysicsList::SetCuts
()
211
{
212
if
(
verboseLevel
>0){
213
G4cout
<<
"PhysicsList::SetCuts:"
;
214
G4cout
<<
"CutLength : "
<<
G4BestUnit
(
defaultCutValue
,
"Length"
) <<
G4endl
;
215
}
216
217
// set cut values for gamma at first and for e- second and next for e+,
218
// because some processes for e+/e- need cut values for gamma
219
//
220
SetCutValue
(
defaultCutValue
,
"gamma"
);
221
SetCutValue
(
defaultCutValue
,
"e-"
);
222
SetCutValue
(
defaultCutValue
,
"e+"
);
223
SetCutValue
(
defaultCutValue
,
"proton"
);
224
225
if
(
verboseLevel
>0)
DumpCutValuesTable
();
226
}
227
228
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
229
Generated on Sat May 25 2013 14:31:57 for Geant4 by
1.8.4