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