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