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
electromagnetic
TestEm15
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
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
34
35
#include "PhysicsList.hh"
36
#include "PhysicsListMessenger.hh"
37
38
#include "PhysListEmStandard.hh"
39
40
#include "
G4LossTableManager.hh
"
41
#include "
G4UnitsTable.hh
"
42
#include "
G4SystemOfUnits.hh
"
43
44
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
45
46
PhysicsList::PhysicsList
()
47
:
G4VModularPhysicsList
()
48
{
49
G4LossTableManager::Instance
();
50
51
fCurrentDefaultCut = 1.0*
mm
;
52
fCutForGamma = fCurrentDefaultCut;
53
fCutForElectron = fCurrentDefaultCut;
54
fCutForPositron = fCurrentDefaultCut;
55
56
fMessenger =
new
PhysicsListMessenger
(
this
);
57
58
SetVerboseLevel
(1);
59
60
// EM physics
61
fEmName =
G4String
(
"standard"
);
62
fEmPhysicsList =
new
PhysListEmStandard
(fEmName);
63
64
}
65
66
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
67
68
PhysicsList::~PhysicsList
()
69
{
70
delete
fMessenger;
71
}
72
73
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
74
75
// Bosons
76
#include "
G4ChargedGeantino.hh
"
77
#include "
G4Geantino.hh
"
78
#include "
G4Gamma.hh
"
79
#include "
G4OpticalPhoton.hh
"
80
81
// leptons
82
#include "
G4MuonPlus.hh
"
83
#include "
G4MuonMinus.hh
"
84
#include "
G4NeutrinoMu.hh
"
85
#include "
G4AntiNeutrinoMu.hh
"
86
87
#include "
G4Electron.hh
"
88
#include "
G4Positron.hh
"
89
#include "
G4NeutrinoE.hh
"
90
#include "
G4AntiNeutrinoE.hh
"
91
92
// Mesons
93
#include "
G4PionPlus.hh
"
94
#include "
G4PionMinus.hh
"
95
#include "
G4PionZero.hh
"
96
#include "
G4Eta.hh
"
97
#include "
G4EtaPrime.hh
"
98
99
#include "
G4KaonPlus.hh
"
100
#include "
G4KaonMinus.hh
"
101
#include "
G4KaonZero.hh
"
102
#include "
G4AntiKaonZero.hh
"
103
#include "
G4KaonZeroLong.hh
"
104
#include "
G4KaonZeroShort.hh
"
105
106
// Baryons
107
#include "
G4Proton.hh
"
108
#include "
G4AntiProton.hh
"
109
#include "
G4Neutron.hh
"
110
#include "
G4AntiNeutron.hh
"
111
112
// Nuclei
113
#include "
G4Deuteron.hh
"
114
#include "
G4Triton.hh
"
115
#include "
G4Alpha.hh
"
116
#include "
G4GenericIon.hh
"
117
118
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
119
120
void
PhysicsList::ConstructParticle
()
121
{
122
// pseudo-particles
123
G4Geantino::GeantinoDefinition
();
124
G4ChargedGeantino::ChargedGeantinoDefinition
();
125
126
// gamma
127
G4Gamma::GammaDefinition
();
128
129
// optical photon
130
G4OpticalPhoton::OpticalPhotonDefinition
();
131
132
// leptons
133
G4Electron::ElectronDefinition
();
134
G4Positron::PositronDefinition
();
135
G4MuonPlus::MuonPlusDefinition
();
136
G4MuonMinus::MuonMinusDefinition
();
137
138
G4NeutrinoE::NeutrinoEDefinition
();
139
G4AntiNeutrinoE::AntiNeutrinoEDefinition
();
140
G4NeutrinoMu::NeutrinoMuDefinition
();
141
G4AntiNeutrinoMu::AntiNeutrinoMuDefinition
();
142
143
// mesons
144
G4PionPlus::PionPlusDefinition
();
145
G4PionMinus::PionMinusDefinition
();
146
G4PionZero::PionZeroDefinition
();
147
G4Eta::EtaDefinition
();
148
G4EtaPrime::EtaPrimeDefinition
();
149
G4KaonPlus::KaonPlusDefinition
();
150
G4KaonMinus::KaonMinusDefinition
();
151
G4KaonZero::KaonZeroDefinition
();
152
G4AntiKaonZero::AntiKaonZeroDefinition
();
153
G4KaonZeroLong::KaonZeroLongDefinition
();
154
G4KaonZeroShort::KaonZeroShortDefinition
();
155
156
// barions
157
G4Proton::ProtonDefinition
();
158
G4AntiProton::AntiProtonDefinition
();
159
G4Neutron::NeutronDefinition
();
160
G4AntiNeutron::AntiNeutronDefinition
();
161
162
// ions
163
G4Deuteron::DeuteronDefinition
();
164
G4Triton::TritonDefinition
();
165
G4Alpha::AlphaDefinition
();
166
G4GenericIon::GenericIonDefinition
();
167
}
168
169
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
170
171
#include "
G4EmProcessOptions.hh
"
172
173
void
PhysicsList::ConstructProcess
()
174
{
175
// Transportation
176
//
177
AddTransportation
();
178
179
// Electromagnetic physics list
180
//
181
fEmPhysicsList->
ConstructProcess
();
182
183
// Em options
184
//
185
G4EmProcessOptions
emOptions;
186
emOptions.
SetStepFunction
(1., 1*
mm
);
187
emOptions.
SetIntegral
(
false
);
188
emOptions.
SetLossFluctuations
(
false
);
189
190
// step limitation (as a full process)
191
//
192
AddStepMax
();
193
}
194
195
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
196
197
#include "
G4EmStandardPhysics_option3.hh
"
198
199
void
PhysicsList::AddPhysicsList
(
const
G4String
&
name
)
200
{
201
if
(
verboseLevel
>0) {
202
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
<<
G4endl
;
203
}
204
205
if
(name == fEmName)
return
;
206
207
if
(name ==
"standard"
) {
208
209
fEmName =
name
;
210
delete
fEmPhysicsList;
211
fEmPhysicsList =
new
PhysListEmStandard
(name);
212
213
}
else
if
(name ==
"emstandard_opt3"
) {
214
215
fEmName =
name
;
216
delete
fEmPhysicsList;
217
fEmPhysicsList =
new
G4EmStandardPhysics_option3
();
218
219
}
else
{
220
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
221
<<
" is not defined"
222
<<
G4endl
;
223
}
224
}
225
226
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
227
228
#include "
G4ProcessManager.hh
"
229
#include "StepMax.hh"
230
231
void
PhysicsList::AddStepMax
()
232
{
233
// Step limitation seen as a process
234
StepMax
* stepMaxProcess =
new
StepMax
();
235
236
theParticleIterator
->
reset
();
237
while
((*
theParticleIterator
)()){
238
G4ParticleDefinition
* particle =
theParticleIterator
->
value
();
239
G4ProcessManager
* pmanager = particle->
GetProcessManager
();
240
241
if
(stepMaxProcess->
IsApplicable
(*particle) && pmanager)
242
{
243
pmanager ->
AddDiscreteProcess
(stepMaxProcess);
244
}
245
}
246
}
247
248
249
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
250
251
#include "
G4Gamma.hh
"
252
#include "
G4Electron.hh
"
253
#include "
G4Positron.hh
"
254
255
void
PhysicsList::SetCuts
()
256
{
257
// set cut values for gamma at first and for e- second and next for e+,
258
// because some processes for e+/e- need cut values for gamma
259
SetCutValue
(fCutForGamma,
"gamma"
);
260
SetCutValue
(fCutForElectron,
"e-"
);
261
SetCutValue
(fCutForPositron,
"e+"
);
262
}
263
264
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
265
266
void
PhysicsList::SetCutForGamma
(
G4double
cut)
267
{
268
fCutForGamma = cut;
269
SetParticleCuts
(fCutForGamma,
G4Gamma::Gamma
());
270
}
271
272
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
273
274
void
PhysicsList::SetCutForElectron
(
G4double
cut)
275
{
276
fCutForElectron = cut;
277
SetParticleCuts
(fCutForElectron,
G4Electron::Electron
());
278
}
279
280
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
281
282
void
PhysicsList::SetCutForPositron
(
G4double
cut)
283
{
284
fCutForPositron = cut;
285
SetParticleCuts
(fCutForPositron,
G4Positron::Positron
());
286
}
287
288
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Generated on Sat May 25 2013 14:31:57 for Geant4 by
1.8.4