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
persistency
P02
src
ExP02PhysicsList.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
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
34
35
#include "
globals.hh
"
36
#include "
ExP02PhysicsList.hh
"
37
38
#include "
G4ProcessManager.hh
"
39
#include "
G4ParticleTypes.hh
"
40
#include "
G4SystemOfUnits.hh
"
41
42
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
43
44
ExP02PhysicsList::ExP02PhysicsList
():
G4VUserPhysicsList
()
45
{
46
defaultCutValue
= 1.0*
cm
;
47
SetVerboseLevel
(1);
48
}
49
50
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
51
52
ExP02PhysicsList::~ExP02PhysicsList
()
53
{}
54
55
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
56
57
void
ExP02PhysicsList::ConstructParticle
()
58
{
59
// In this method, static member functions should be called
60
// for all particles which you want to use.
61
// This ensures that objects of these particle types will be
62
// created in the program.
63
64
ConstructBosons
();
65
ConstructLeptons
();
66
ConstructMesons
();
67
ConstructBaryons
();
68
}
69
70
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
71
72
void
ExP02PhysicsList::ConstructBosons
()
73
{
74
// pseudo-particles
75
G4Geantino::GeantinoDefinition
();
76
G4ChargedGeantino::ChargedGeantinoDefinition
();
77
78
// gamma
79
G4Gamma::GammaDefinition
();
80
}
81
82
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
83
84
void
ExP02PhysicsList::ConstructLeptons
()
85
{
86
// leptons
87
// e+/-
88
G4Electron::ElectronDefinition
();
89
G4Positron::PositronDefinition
();
90
// mu+/-
91
G4MuonPlus::MuonPlusDefinition
();
92
G4MuonMinus::MuonMinusDefinition
();
93
// nu_e
94
G4NeutrinoE::NeutrinoEDefinition
();
95
G4AntiNeutrinoE::AntiNeutrinoEDefinition
();
96
// nu_mu
97
G4NeutrinoMu::NeutrinoMuDefinition
();
98
G4AntiNeutrinoMu::AntiNeutrinoMuDefinition
();
99
}
100
101
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
102
103
void
ExP02PhysicsList::ConstructMesons
()
104
{
105
// mesons
106
// light mesons
107
G4PionPlus::PionPlusDefinition
();
108
G4PionMinus::PionMinusDefinition
();
109
G4PionZero::PionZeroDefinition
();
110
G4Eta::EtaDefinition
();
111
G4EtaPrime::EtaPrimeDefinition
();
112
G4KaonPlus::KaonPlusDefinition
();
113
G4KaonMinus::KaonMinusDefinition
();
114
G4KaonZero::KaonZeroDefinition
();
115
G4AntiKaonZero::AntiKaonZeroDefinition
();
116
G4KaonZeroLong::KaonZeroLongDefinition
();
117
G4KaonZeroShort::KaonZeroShortDefinition
();
118
}
119
120
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
121
122
void
ExP02PhysicsList::ConstructBaryons
()
123
{
124
// barions
125
G4Proton::ProtonDefinition
();
126
G4AntiProton::AntiProtonDefinition
();
127
128
G4Neutron::NeutronDefinition
();
129
G4AntiNeutron::AntiNeutronDefinition
();
130
}
131
132
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
133
134
void
ExP02PhysicsList::ConstructProcess
()
135
{
136
AddTransportation
();
137
ConstructEM
();
138
ConstructGeneral
();
139
}
140
141
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
142
143
#include "
G4ComptonScattering.hh
"
144
#include "
G4GammaConversion.hh
"
145
#include "
G4PhotoElectricEffect.hh
"
146
147
#include "
G4eMultipleScattering.hh
"
148
#include "
G4eIonisation.hh
"
149
#include "
G4eBremsstrahlung.hh
"
150
#include "
G4eplusAnnihilation.hh
"
151
152
#include "
G4MuMultipleScattering.hh
"
153
#include "
G4MuIonisation.hh
"
154
#include "
G4MuBremsstrahlung.hh
"
155
#include "
G4MuPairProduction.hh
"
156
157
#include "
G4hMultipleScattering.hh
"
158
#include "
G4hIonisation.hh
"
159
160
#include "
G4StepLimiter.hh
"
161
#include "
G4UserSpecialCuts.hh
"
162
163
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
164
165
void
ExP02PhysicsList::ConstructEM
()
166
{
167
theParticleIterator
->
reset
();
168
while
( (*
theParticleIterator
)() ){
169
G4ParticleDefinition
* particle =
theParticleIterator
->
value
();
170
G4ProcessManager
* pmanager = particle->
GetProcessManager
();
171
G4String
particleName = particle->
GetParticleName
();
172
173
if
(particleName ==
"gamma"
) {
174
// gamma
175
pmanager->
AddDiscreteProcess
(
new
G4PhotoElectricEffect
);
176
pmanager->
AddDiscreteProcess
(
new
G4ComptonScattering
);
177
pmanager->
AddDiscreteProcess
(
new
G4GammaConversion
);
178
179
}
else
if
(particleName ==
"e-"
) {
180
//electron
181
pmanager->
AddProcess
(
new
G4eMultipleScattering
,-1, 1,1);
182
pmanager->
AddProcess
(
new
G4eIonisation
, -1, 2,2);
183
pmanager->
AddProcess
(
new
G4eBremsstrahlung
, -1, 3,3);
184
185
}
else
if
(particleName ==
"e+"
) {
186
//positron
187
pmanager->
AddProcess
(
new
G4eMultipleScattering
,-1, 1,1);
188
pmanager->
AddProcess
(
new
G4eIonisation
, -1, 2,2);
189
pmanager->
AddProcess
(
new
G4eBremsstrahlung
, -1, 3,3);
190
pmanager->
AddProcess
(
new
G4eplusAnnihilation
, 0,-1,4);
191
192
}
else
if
( particleName ==
"mu+"
||
193
particleName ==
"mu-"
) {
194
//muon
195
pmanager->
AddProcess
(
new
G4MuMultipleScattering
,-1, 1,1);
196
pmanager->
AddProcess
(
new
G4MuIonisation
, -1, 2,2);
197
pmanager->
AddProcess
(
new
G4MuBremsstrahlung
, -1, 3,3);
198
pmanager->
AddProcess
(
new
G4MuPairProduction
, -1, 4,4);
199
200
}
else
if
((!particle->
IsShortLived
()) &&
201
(particle->
GetPDGCharge
() != 0.0) &&
202
(particle->
GetParticleName
() !=
"chargedgeantino"
)) {
203
//all others charged particles except geantino
204
pmanager->
AddProcess
(
new
G4hMultipleScattering
,-1, 1,1);
205
pmanager->
AddProcess
(
new
G4hIonisation
, -1, 2,2);
208
}
209
}
210
}
211
212
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
213
214
#include "
G4Decay.hh
"
215
void
ExP02PhysicsList::ConstructGeneral
()
216
{
217
// Add Decay Process
218
G4Decay
* theDecayProcess =
new
G4Decay
();
219
theParticleIterator
->
reset
();
220
while
( (*
theParticleIterator
)() ){
221
G4ParticleDefinition
* particle =
theParticleIterator
->
value
();
222
G4ProcessManager
* pmanager = particle->
GetProcessManager
();
223
if
(theDecayProcess->
IsApplicable
(*particle)) {
224
pmanager ->
AddProcess
(theDecayProcess);
225
// set ordering for PostStepDoIt and AtRestDoIt
226
pmanager ->
SetProcessOrdering
(theDecayProcess,
idxPostStep
);
227
pmanager ->
SetProcessOrdering
(theDecayProcess,
idxAtRest
);
228
}
229
}
230
}
231
232
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
233
234
void
ExP02PhysicsList::SetCuts
()
235
{
236
//G4VUserPhysicsList::SetCutsWithDefault method sets
237
//the default cut value for all particle types
238
//
239
SetCutsWithDefault
();
240
241
if
(
verboseLevel
>0)
DumpCutValuesTable
();
242
}
243
244
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
245
Generated on Sat May 25 2013 14:33:00 for Geant4 by
1.8.4