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