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
TestEm0
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
#include "
G4EmStandardPhysics.hh
"
40
#include "
G4EmStandardPhysics_option1.hh
"
41
#include "
G4EmStandardPhysics_option2.hh
"
42
#include "
G4EmStandardPhysics_option3.hh
"
43
#include "
G4EmStandardPhysics_option4.hh
"
44
#include "
G4EmLivermorePhysics.hh
"
45
#include "
G4EmPenelopePhysics.hh
"
46
47
#include "
G4LossTableManager.hh
"
48
#include "
G4UnitsTable.hh
"
49
#include "
G4SystemOfUnits.hh
"
50
51
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
52
53
PhysicsList::PhysicsList
()
54
:
G4VModularPhysicsList
(),fCutForGamma(0),fCutForElectron(0),fCutForPositron(0),
55
fCurrentDefaultCut(0),fEmPhysicsList(0),fEmName(
"local"
),fMessenger(0)
56
{
57
G4LossTableManager::Instance
();
58
59
fCurrentDefaultCut = 1.0*
mm
;
60
fCutForGamma = fCurrentDefaultCut;
61
fCutForElectron = fCurrentDefaultCut;
62
fCutForPositron = fCurrentDefaultCut;
63
64
fMessenger =
new
PhysicsListMessenger
(
this
);
65
66
SetVerboseLevel
(1);
67
68
// EM physics
69
fEmName =
G4String
(
"local"
);
70
fEmPhysicsList =
new
PhysListEmStandard
(fEmName);
71
72
//add new units for cross sections
73
//
74
new
G4UnitDefinition
(
"mm2/g"
,
"mm2/g"
,
"Surface/Mass"
,
mm2
/
g
);
75
new
G4UnitDefinition
(
"um2/mg"
,
"um2/mg"
,
"Surface/Mass"
, um*um/
mg
);
76
}
77
78
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
79
80
PhysicsList::~PhysicsList
()
81
{
82
delete
fMessenger;
83
}
84
85
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
86
87
// Bosons
88
#include "
G4ChargedGeantino.hh
"
89
#include "
G4Geantino.hh
"
90
#include "
G4Gamma.hh
"
91
#include "
G4OpticalPhoton.hh
"
92
93
// leptons
94
#include "
G4MuonPlus.hh
"
95
#include "
G4MuonMinus.hh
"
96
#include "
G4NeutrinoMu.hh
"
97
#include "
G4AntiNeutrinoMu.hh
"
98
99
#include "
G4Electron.hh
"
100
#include "
G4Positron.hh
"
101
#include "
G4NeutrinoE.hh
"
102
#include "
G4AntiNeutrinoE.hh
"
103
104
// Mesons
105
#include "
G4PionPlus.hh
"
106
#include "
G4PionMinus.hh
"
107
#include "
G4PionZero.hh
"
108
#include "
G4Eta.hh
"
109
#include "
G4EtaPrime.hh
"
110
111
#include "
G4KaonPlus.hh
"
112
#include "
G4KaonMinus.hh
"
113
#include "
G4KaonZero.hh
"
114
#include "
G4AntiKaonZero.hh
"
115
#include "
G4KaonZeroLong.hh
"
116
#include "
G4KaonZeroShort.hh
"
117
118
// Baryons
119
#include "
G4Proton.hh
"
120
#include "
G4AntiProton.hh
"
121
#include "
G4Neutron.hh
"
122
#include "
G4AntiNeutron.hh
"
123
124
// Nuclei
125
#include "
G4Deuteron.hh
"
126
#include "
G4Triton.hh
"
127
#include "
G4Alpha.hh
"
128
#include "
G4GenericIon.hh
"
129
130
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
131
132
void
PhysicsList::ConstructParticle
()
133
{
134
// pseudo-particles
135
G4Geantino::GeantinoDefinition
();
136
G4ChargedGeantino::ChargedGeantinoDefinition
();
137
138
// gamma
139
G4Gamma::GammaDefinition
();
140
141
// optical photon
142
G4OpticalPhoton::OpticalPhotonDefinition
();
143
144
// leptons
145
G4Electron::ElectronDefinition
();
146
G4Positron::PositronDefinition
();
147
G4MuonPlus::MuonPlusDefinition
();
148
G4MuonMinus::MuonMinusDefinition
();
149
150
G4NeutrinoE::NeutrinoEDefinition
();
151
G4AntiNeutrinoE::AntiNeutrinoEDefinition
();
152
G4NeutrinoMu::NeutrinoMuDefinition
();
153
G4AntiNeutrinoMu::AntiNeutrinoMuDefinition
();
154
155
// mesons
156
G4PionPlus::PionPlusDefinition
();
157
G4PionMinus::PionMinusDefinition
();
158
G4PionZero::PionZeroDefinition
();
159
G4Eta::EtaDefinition
();
160
G4EtaPrime::EtaPrimeDefinition
();
161
G4KaonPlus::KaonPlusDefinition
();
162
G4KaonMinus::KaonMinusDefinition
();
163
G4KaonZero::KaonZeroDefinition
();
164
G4AntiKaonZero::AntiKaonZeroDefinition
();
165
G4KaonZeroLong::KaonZeroLongDefinition
();
166
G4KaonZeroShort::KaonZeroShortDefinition
();
167
168
// barions
169
G4Proton::ProtonDefinition
();
170
G4AntiProton::AntiProtonDefinition
();
171
G4Neutron::NeutronDefinition
();
172
G4AntiNeutron::AntiNeutronDefinition
();
173
174
// ions
175
G4Deuteron::DeuteronDefinition
();
176
G4Triton::TritonDefinition
();
177
G4Alpha::AlphaDefinition
();
178
G4GenericIon::GenericIonDefinition
();
179
}
180
181
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
182
183
#include "
G4EmProcessOptions.hh
"
184
185
void
PhysicsList::ConstructProcess
()
186
{
187
// Transportation
188
//
189
AddTransportation
();
190
191
// Electromagnetic physics list
192
//
193
fEmPhysicsList->
ConstructProcess
();
194
195
// Em options
196
//
197
// Main options and setting parameters are shown here.
198
// Several of them have default values.
199
//
200
G4EmProcessOptions
emOptions;
201
202
//physics tables
203
//
204
//emOptions.SetMinEnergy(100*eV); //default
205
//emOptions.SetMaxEnergy(100*TeV); //default
206
//emOptions.SetDEDXBinning(12*20); //default=12*7
207
//emOptions.SetLambdaBinning(12*20); //default=12*7
208
209
emOptions.
SetBuildCSDARange
(
true
);
210
emOptions.
SetMaxEnergyForCSDARange
(10*
GeV
);
211
//emOptions.SetDEDXBinningForCSDARange(12*20);
212
213
//emOptions.SetSplineFlag(true); //default
214
215
emOptions.
SetVerbose
(0);
216
}
217
218
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
219
220
void
PhysicsList::AddPhysicsList
(
const
G4String
&
name
)
221
{
222
if
(
verboseLevel
>0) {
223
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
<<
G4endl
;
224
}
225
226
if
(name == fEmName)
return
;
227
228
if
(name ==
"local"
) {
229
230
fEmName =
name
;
231
delete
fEmPhysicsList;
232
fEmPhysicsList =
new
PhysListEmStandard
(name);
233
234
}
else
if
(name ==
"emstandard_opt0"
){
235
fEmName =
name
;
236
delete
fEmPhysicsList;
237
fEmPhysicsList =
new
G4EmStandardPhysics
();
238
239
}
else
if
(name ==
"emstandard_opt1"
){
240
fEmName =
name
;
241
delete
fEmPhysicsList;
242
fEmPhysicsList =
new
G4EmStandardPhysics_option1
();
243
244
}
else
if
(name ==
"emstandard_opt2"
){
245
fEmName =
name
;
246
delete
fEmPhysicsList;
247
fEmPhysicsList =
new
G4EmStandardPhysics_option2
();
248
249
}
else
if
(name ==
"emstandard_opt3"
){
250
fEmName =
name
;
251
delete
fEmPhysicsList;
252
fEmPhysicsList =
new
G4EmStandardPhysics_option3
();
253
254
}
else
if
(name ==
"emstandard_opt4"
){
255
fEmName =
name
;
256
delete
fEmPhysicsList;
257
fEmPhysicsList =
new
G4EmStandardPhysics_option4
();
258
259
}
else
if
(name ==
"empenelope"
){
260
fEmName =
name
;
261
delete
fEmPhysicsList;
262
fEmPhysicsList =
new
G4EmPenelopePhysics
();
263
264
}
else
if
(name ==
"emlivermore"
){
265
fEmName =
name
;
266
delete
fEmPhysicsList;
267
fEmPhysicsList =
new
G4EmLivermorePhysics
();
268
269
}
else
{
270
271
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
272
<<
" is not defined"
273
<<
G4endl
;
274
}
275
}
276
277
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
278
279
#include "
G4Gamma.hh
"
280
#include "
G4Electron.hh
"
281
#include "
G4Positron.hh
"
282
283
void
PhysicsList::SetCuts
()
284
{
285
// fixe lower limit for cut
286
G4ProductionCutsTable::GetProductionCutsTable
()->
SetEnergyRange
(100*
eV
, 1*
GeV
);
287
288
// set cut values for gamma at first and for e- second and next for e+,
289
// because some processes for e+/e- need cut values for gamma
290
SetCutValue
(fCutForGamma,
"gamma"
);
291
SetCutValue
(fCutForElectron,
"e-"
);
292
SetCutValue
(fCutForPositron,
"e+"
);
293
DumpCutValuesTable
();
294
}
295
296
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
297
298
void
PhysicsList::SetCutForGamma
(
G4double
cut)
299
{
300
fCutForGamma = cut;
301
SetParticleCuts
(fCutForGamma,
G4Gamma::Gamma
());
302
}
303
304
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
305
306
void
PhysicsList::SetCutForElectron
(
G4double
cut)
307
{
308
fCutForElectron = cut;
309
SetParticleCuts
(fCutForElectron,
G4Electron::Electron
());
310
}
311
312
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
313
314
void
PhysicsList::SetCutForPositron
(
G4double
cut)
315
{
316
fCutForPositron = cut;
317
SetParticleCuts
(fCutForPositron,
G4Positron::Positron
());
318
}
319
320
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Generated on Sat May 25 2013 14:31:57 for Geant4 by
1.8.4