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