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
TestEm18
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
// $Id$
30
//
31
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33
34
#include "PhysicsList.hh"
35
#include "PhysicsListMessenger.hh"
36
37
#include "PhysListEmStandard.hh"
38
#include "PhysListEmLivermore.hh"
39
#include "PhysListEmPenelope.hh"
40
41
#include "
G4LossTableManager.hh
"
42
#include "
G4UnitsTable.hh
"
43
#include "
G4SystemOfUnits.hh
"
44
45
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
46
47
PhysicsList::PhysicsList
() :
G4VModularPhysicsList
()
48
{
49
G4LossTableManager::Instance
();
50
fMessenger =
new
PhysicsListMessenger
(
this
);
51
52
// EM physics
53
fEmName =
G4String
(
"standard"
);
54
fEmPhysicsList =
new
PhysListEmStandard
(fEmName);
55
56
defaultCutValue
= 1.*
mm
;
57
fCutForGamma =
defaultCutValue
;
58
fCutForElectron =
defaultCutValue
;
59
60
SetVerboseLevel
(1);
61
}
62
63
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
64
65
PhysicsList::~PhysicsList
()
66
{
67
delete
fEmPhysicsList;
68
delete
fMessenger;
69
}
70
71
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
72
73
void
PhysicsList::AddPhysicsList
(
const
G4String
&
name
)
74
{
75
if
(
verboseLevel
>1) {
76
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
<<
G4endl
;
77
}
78
79
if
(name == fEmName)
return
;
80
81
if
(name ==
"standard"
) {
82
83
fEmName =
name
;
84
delete
fEmPhysicsList;
85
fEmPhysicsList =
new
PhysListEmStandard
(name);
86
87
}
else
if
(name ==
"livermore"
) {
88
89
fEmName =
name
;
90
delete
fEmPhysicsList;
91
fEmPhysicsList =
new
PhysListEmLivermore
(name);
92
93
}
else
if
(name ==
"penelope"
) {
94
95
fEmName =
name
;
96
delete
fEmPhysicsList;
97
fEmPhysicsList =
new
PhysListEmPenelope
(name);
98
99
}
else
{
100
101
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
102
<<
" is not defined"
103
<<
G4endl
;
104
}
105
}
106
107
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
108
109
// Bosons
110
#include "
G4ChargedGeantino.hh
"
111
#include "
G4Geantino.hh
"
112
#include "
G4Gamma.hh
"
113
114
// leptons
115
#include "
G4Electron.hh
"
116
#include "
G4Positron.hh
"
117
118
#include "
G4MuonPlus.hh
"
119
#include "
G4MuonMinus.hh
"
120
121
// Mesons
122
#include "
G4PionPlus.hh
"
123
#include "
G4PionMinus.hh
"
124
125
#include "
G4KaonPlus.hh
"
126
#include "
G4KaonMinus.hh
"
127
128
// Baryons
129
#include "
G4Proton.hh
"
130
#include "
G4AntiProton.hh
"
131
#include "
G4Neutron.hh
"
132
#include "
G4AntiNeutron.hh
"
133
134
// Nuclei
135
#include "
G4Deuteron.hh
"
136
#include "
G4Triton.hh
"
137
#include "
G4Alpha.hh
"
138
#include "
G4GenericIon.hh
"
139
140
void
PhysicsList::ConstructParticle
()
141
{
142
// pseudo-particles
143
G4Geantino::GeantinoDefinition
();
144
G4ChargedGeantino::ChargedGeantinoDefinition
();
145
146
// gamma
147
G4Gamma::GammaDefinition
();
148
149
// leptons
150
G4Electron::ElectronDefinition
();
151
G4Positron::PositronDefinition
();
152
G4MuonPlus::MuonPlusDefinition
();
153
G4MuonMinus::MuonMinusDefinition
();
154
155
// mesons
156
G4PionPlus::PionPlusDefinition
();
157
G4PionMinus::PionMinusDefinition
();
158
G4KaonPlus::KaonPlusDefinition
();
159
G4KaonMinus::KaonMinusDefinition
();
160
161
// baryons
162
G4Proton::ProtonDefinition
();
163
G4AntiProton::AntiProtonDefinition
();
164
G4Neutron::NeutronDefinition
();
165
G4AntiNeutron::AntiNeutronDefinition
();
166
167
// ions
168
G4Deuteron::DeuteronDefinition
();
169
G4Triton::TritonDefinition
();
170
G4Alpha::AlphaDefinition
();
171
G4GenericIon::GenericIonDefinition
();
172
}
173
174
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
175
176
#include "
G4EmProcessOptions.hh
"
177
178
void
PhysicsList::ConstructProcess
()
179
{
180
AddTransportation
();
181
fEmPhysicsList->
ConstructProcess
();
182
AddStepMax
();
183
184
// Em options
185
//
186
G4EmProcessOptions
emOptions;
187
188
//physics tables
189
//
190
emOptions.
SetMinEnergy
(10*
eV
);
//default 100 eV
191
emOptions.
SetMaxEnergy
(10*
TeV
);
//default 100 TeV
192
emOptions.
SetDEDXBinning
(12*20);
//default=12*7
193
emOptions.
SetLambdaBinning
(12*20);
//default=12*7
194
195
//build CSDA range
196
//
197
emOptions.
SetBuildCSDARange
(
true
);
198
emOptions.
SetMaxEnergyForCSDARange
(10*
TeV
);
199
emOptions.
SetDEDXBinningForCSDARange
(12*20);
200
201
//ionization
202
//
203
emOptions.
SetSubCutoff
(
false
);
//default
204
}
205
206
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
207
208
#include "
G4ProcessManager.hh
"
209
#include "StepMax.hh"
210
211
void
PhysicsList::AddStepMax
()
212
{
213
// Step limitation seen as a process
214
StepMax
* stepMaxProcess =
new
StepMax
();
215
216
theParticleIterator
->
reset
();
217
while
((*
theParticleIterator
)()){
218
G4ParticleDefinition
* particle =
theParticleIterator
->
value
();
219
G4ProcessManager
* pmanager = particle->
GetProcessManager
();
220
221
if
(stepMaxProcess->
IsApplicable
(*particle) && !particle->
IsShortLived
())
222
{
223
pmanager ->
AddDiscreteProcess
(stepMaxProcess);
224
}
225
}
226
}
227
228
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
229
230
void
PhysicsList::SetCuts
()
231
{
232
if
(
verboseLevel
>0){
233
G4cout
<<
"PhysicsList::SetCuts:"
;
234
G4cout
<<
"CutLength : "
<<
G4BestUnit
(
defaultCutValue
,
"Length"
) <<
G4endl
;
235
}
236
237
// set cut values for gamma at first and for e- second and next for e+,
238
// because some processes for e+/e- need cut values for gamma
239
SetCutValue
(fCutForGamma,
"gamma"
);
240
SetCutValue
(fCutForElectron,
"e-"
);
241
SetCutValue
(fCutForElectron,
"e+"
);
242
243
if
(
verboseLevel
>0)
DumpCutValuesTable
();
244
}
245
246
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
247
248
void
PhysicsList::SetCutForGamma
(
G4double
cut)
249
{
250
fCutForGamma = cut;
251
SetParticleCuts
(fCutForGamma,
G4Gamma::Gamma
());
252
}
253
254
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
255
256
void
PhysicsList::SetCutForElectron
(
G4double
cut)
257
{
258
fCutForElectron = cut;
259
SetParticleCuts
(fCutForElectron,
G4Electron::Electron
());
260
SetParticleCuts
(fCutForElectron,
G4Positron::Positron
());
261
}
262
263
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Generated on Sat May 25 2013 14:31:57 for Geant4 by
1.8.4