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
novice
N02
src
ExN02PhysicsList.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: ExN02PhysicsList.cc 69899 2013-05-17 10:05:33Z gcosmo $
28
//
29
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
30
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
31
32
#include "
globals.hh
"
33
#include "ExN02PhysicsList.hh"
34
35
#include "
G4ProcessManager.hh
"
36
#include "
G4ParticleTypes.hh
"
37
#include "
G4SystemOfUnits.hh
"
38
#include "
G4IonConstructor.hh
"
39
40
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
41
42
ExN02PhysicsList::ExN02PhysicsList
():
G4VUserPhysicsList
()
43
{
44
defaultCutValue
= 1.0*
cm
;
45
SetVerboseLevel
(1);
46
}
47
48
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
49
50
ExN02PhysicsList::~ExN02PhysicsList
()
51
{}
52
53
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
54
55
void
ExN02PhysicsList::ConstructParticle
()
56
{
57
// In this method, static member functions should be called
58
// for all particles which you want to use.
59
// This ensures that objects of these particle types will be
60
// created in the program.
61
62
ConstructBosons
();
63
ConstructLeptons
();
64
ConstructMesons
();
65
ConstructBaryons
();
66
G4IonConstructor
pIonConstructor;
67
pIonConstructor.
ConstructParticle
();
68
}
69
70
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
71
72
void
ExN02PhysicsList::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
ExN02PhysicsList::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
ExN02PhysicsList::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
ExN02PhysicsList::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
ExN02PhysicsList::ConstructProcess
()
135
{
136
AddTransportation
();
137
ConstructEM
();
138
ConstructGeneral
();
139
AddStepMax
();
140
}
141
142
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
143
144
#include "
G4PhysicsListHelper.hh
"
145
146
#include "
G4ComptonScattering.hh
"
147
#include "
G4GammaConversion.hh
"
148
#include "
G4PhotoElectricEffect.hh
"
149
150
#include "
G4eMultipleScattering.hh
"
151
#include "
G4eIonisation.hh
"
152
#include "
G4eBremsstrahlung.hh
"
153
#include "
G4eplusAnnihilation.hh
"
154
155
#include "
G4MuMultipleScattering.hh
"
156
#include "
G4MuIonisation.hh
"
157
#include "
G4MuBremsstrahlung.hh
"
158
#include "
G4MuPairProduction.hh
"
159
160
#include "
G4hMultipleScattering.hh
"
161
#include "
G4hIonisation.hh
"
162
#include "
G4hBremsstrahlung.hh
"
163
#include "
G4hPairProduction.hh
"
164
165
#include "
G4ionIonisation.hh
"
166
167
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
168
169
void
ExN02PhysicsList::ConstructEM
()
170
{
171
G4PhysicsListHelper
* ph =
G4PhysicsListHelper::GetPhysicsListHelper
();
172
173
theParticleIterator
->
reset
();
174
while
( (*
theParticleIterator
)() ){
175
G4ParticleDefinition
* particle =
theParticleIterator
->
value
();
176
G4String
particleName = particle->
GetParticleName
();
177
178
if
(particleName ==
"gamma"
) {
179
// gamma
180
ph->
RegisterProcess
(
new
G4PhotoElectricEffect
, particle);
181
ph->
RegisterProcess
(
new
G4ComptonScattering
, particle);
182
ph->
RegisterProcess
(
new
G4GammaConversion
, particle);
183
184
}
else
if
(particleName ==
"e-"
) {
185
//electron
186
ph->
RegisterProcess
(
new
G4eMultipleScattering
, particle);
187
ph->
RegisterProcess
(
new
G4eIonisation
, particle);
188
ph->
RegisterProcess
(
new
G4eBremsstrahlung
, particle);
189
190
}
else
if
(particleName ==
"e+"
) {
191
//positron
192
ph->
RegisterProcess
(
new
G4eMultipleScattering
, particle);
193
ph->
RegisterProcess
(
new
G4eIonisation
, particle);
194
ph->
RegisterProcess
(
new
G4eBremsstrahlung
, particle);
195
ph->
RegisterProcess
(
new
G4eplusAnnihilation
, particle);
196
197
}
else
if
( particleName ==
"mu+"
||
198
particleName ==
"mu-"
) {
199
//muon
200
ph->
RegisterProcess
(
new
G4MuMultipleScattering
, particle);
201
ph->
RegisterProcess
(
new
G4MuIonisation
, particle);
202
ph->
RegisterProcess
(
new
G4MuBremsstrahlung
, particle);
203
ph->
RegisterProcess
(
new
G4MuPairProduction
, particle);
204
205
}
else
if
( particleName ==
"proton"
||
206
particleName ==
"pi-"
||
207
particleName ==
"pi+"
) {
208
//proton
209
ph->
RegisterProcess
(
new
G4hMultipleScattering
, particle);
210
ph->
RegisterProcess
(
new
G4hIonisation
, particle);
211
ph->
RegisterProcess
(
new
G4hBremsstrahlung
, particle);
212
ph->
RegisterProcess
(
new
G4hPairProduction
, particle);
213
214
}
else
if
( particleName ==
"alpha"
||
215
particleName ==
"He3"
) {
216
//alpha
217
ph->
RegisterProcess
(
new
G4hMultipleScattering
, particle);
218
ph->
RegisterProcess
(
new
G4ionIonisation
, particle);
219
220
}
else
if
( particleName ==
"GenericIon"
) {
221
//Ions
222
ph->
RegisterProcess
(
new
G4hMultipleScattering
, particle);
223
ph->
RegisterProcess
(
new
G4ionIonisation
, particle);
224
225
}
else
if
((!particle->
IsShortLived
()) &&
226
(particle->
GetPDGCharge
() != 0.0) &&
227
(particle->
GetParticleName
() !=
"chargedgeantino"
)) {
228
//all others charged particles except geantino
229
ph->
RegisterProcess
(
new
G4hMultipleScattering
, particle);
230
ph->
RegisterProcess
(
new
G4hIonisation
, particle);
231
}
232
}
233
}
234
235
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
236
237
#include "
G4Decay.hh
"
238
239
void
ExN02PhysicsList::ConstructGeneral
()
240
{
241
G4PhysicsListHelper
* ph =
G4PhysicsListHelper::GetPhysicsListHelper
();
242
243
// Add Decay Process
244
G4Decay
* theDecayProcess =
new
G4Decay
();
245
theParticleIterator
->
reset
();
246
while
( (*
theParticleIterator
)() ){
247
G4ParticleDefinition
* particle =
theParticleIterator
->
value
();
248
if
(theDecayProcess->
IsApplicable
(*particle)) {
249
ph->
RegisterProcess
(theDecayProcess, particle);
250
}
251
}
252
}
253
254
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
255
256
#include "
G4StepLimiter.hh
"
257
#include "
G4UserSpecialCuts.hh
"
258
259
void
ExN02PhysicsList::AddStepMax
()
260
{
261
// Step limitation seen as a process
262
G4StepLimiter
* stepLimiter =
new
G4StepLimiter
();
264
265
theParticleIterator
->
reset
();
266
while
((*
theParticleIterator
)()){
267
G4ParticleDefinition
* particle =
theParticleIterator
->
value
();
268
G4ProcessManager
* pmanager = particle->
GetProcessManager
();
269
270
if
(particle->
GetPDGCharge
() != 0.0)
271
{
272
pmanager ->
AddDiscreteProcess
(stepLimiter);
274
}
275
}
276
}
277
278
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
279
280
void
ExN02PhysicsList::SetCuts
()
281
{
282
//G4VUserPhysicsList::SetCutsWithDefault method sets
283
//the default cut value for all particle types
284
//
285
SetCutsWithDefault
();
286
287
if
(
verboseLevel
>0)
DumpCutValuesTable
();
288
}
289
290
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
291
Generated on Sat May 25 2013 14:32:59 for Geant4 by
1.8.4