ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
PhysicsList.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PhysicsList.cc
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
//
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
39
#include "
G4LossTableManager.hh
"
40
#include "
G4UnitsTable.hh
"
41
#include "
G4SystemOfUnits.hh
"
42
43
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
44
45
PhysicsList::PhysicsList
()
46
:
G4VModularPhysicsList
(),
47
fEmPhysicsList(0), fMessenger(0)
48
{
49
G4LossTableManager::Instance
();
50
SetDefaultCutValue
(1*
mm
);
51
52
fMessenger
=
new
PhysicsListMessenger
(
this
);
53
54
SetVerboseLevel
(1);
55
56
// EM physics
57
fEmName
=
G4String
(
"local"
);
58
fEmPhysicsList
=
new
PhysListEmStandard
(
fEmName
);
59
60
}
61
62
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
63
64
PhysicsList::~PhysicsList
()
65
{
66
delete
fMessenger
;
67
}
68
69
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
70
71
// Bosons
72
#include "
G4ChargedGeantino.hh
"
73
#include "
G4Geantino.hh
"
74
#include "
G4Gamma.hh
"
75
#include "
G4OpticalPhoton.hh
"
76
77
// leptons
78
#include "
G4MuonPlus.hh
"
79
#include "
G4MuonMinus.hh
"
80
#include "
G4NeutrinoMu.hh
"
81
#include "
G4AntiNeutrinoMu.hh
"
82
83
#include "
G4Electron.hh
"
84
#include "
G4Positron.hh
"
85
#include "
G4NeutrinoE.hh
"
86
#include "
G4AntiNeutrinoE.hh
"
87
88
// Mesons
89
#include "
G4PionPlus.hh
"
90
#include "
G4PionMinus.hh
"
91
#include "
G4PionZero.hh
"
92
#include "
G4Eta.hh
"
93
#include "
G4EtaPrime.hh
"
94
95
#include "
G4KaonPlus.hh
"
96
#include "
G4KaonMinus.hh
"
97
#include "
G4KaonZero.hh
"
98
#include "
G4AntiKaonZero.hh
"
99
#include "
G4KaonZeroLong.hh
"
100
#include "
G4KaonZeroShort.hh
"
101
102
// Baryons
103
#include "
G4Proton.hh
"
104
#include "
G4AntiProton.hh
"
105
#include "
G4Neutron.hh
"
106
#include "
G4AntiNeutron.hh
"
107
108
// Nuclei
109
#include "
G4Deuteron.hh
"
110
#include "
G4Triton.hh
"
111
#include "
G4Alpha.hh
"
112
#include "
G4GenericIon.hh
"
113
114
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
115
116
void
PhysicsList::ConstructParticle
()
117
{
118
// pseudo-particles
119
G4Geantino::GeantinoDefinition
();
120
G4ChargedGeantino::ChargedGeantinoDefinition
();
121
122
// gamma
123
G4Gamma::GammaDefinition
();
124
125
// optical photon
126
G4OpticalPhoton::OpticalPhotonDefinition
();
127
128
// leptons
129
G4Electron::ElectronDefinition
();
130
G4Positron::PositronDefinition
();
131
G4MuonPlus::MuonPlusDefinition
();
132
G4MuonMinus::MuonMinusDefinition
();
133
134
G4NeutrinoE::NeutrinoEDefinition
();
135
G4AntiNeutrinoE::AntiNeutrinoEDefinition
();
136
G4NeutrinoMu::NeutrinoMuDefinition
();
137
G4AntiNeutrinoMu::AntiNeutrinoMuDefinition
();
138
139
// mesons
140
G4PionPlus::PionPlusDefinition
();
141
G4PionMinus::PionMinusDefinition
();
142
G4PionZero::PionZeroDefinition
();
143
G4Eta::EtaDefinition
();
144
G4EtaPrime::EtaPrimeDefinition
();
145
G4KaonPlus::KaonPlusDefinition
();
146
G4KaonMinus::KaonMinusDefinition
();
147
G4KaonZero::KaonZeroDefinition
();
148
G4AntiKaonZero::AntiKaonZeroDefinition
();
149
G4KaonZeroLong::KaonZeroLongDefinition
();
150
G4KaonZeroShort::KaonZeroShortDefinition
();
151
152
// barions
153
G4Proton::ProtonDefinition
();
154
G4AntiProton::AntiProtonDefinition
();
155
G4Neutron::NeutronDefinition
();
156
G4AntiNeutron::AntiNeutronDefinition
();
157
158
// ions
159
G4Deuteron::DeuteronDefinition
();
160
G4Triton::TritonDefinition
();
161
G4Alpha::AlphaDefinition
();
162
G4GenericIon::GenericIonDefinition
();
163
}
164
165
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
166
167
void
PhysicsList::ConstructProcess
()
168
{
169
// Transportation
170
//
171
AddTransportation
();
172
173
// Electromagnetic physics list
174
//
175
fEmPhysicsList
->
ConstructProcess
();
176
177
// Em options
178
//
179
G4EmParameters
* param =
G4EmParameters::Instance
();
180
param->
SetIntegral
(
false
);
181
param->
SetStepFunction
(1., 1*
mm
);
182
param->
SetLossFluctuations
(
false
);
183
184
// step limitation (as a full process)
185
//
186
AddStepMax
();
187
}
188
189
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
190
191
#include "
G4EmStandardPhysics_option3.hh
"
192
#include "
G4EmStandardPhysicsWVI.hh
"
193
#include "
G4EmStandardPhysicsGS.hh
"
194
#include "
G4EmStandardPhysicsSS.hh
"
195
#include "
G4EmLivermorePolarizedPhysics.hh
"
196
#include "PhysListEm5DStandard.hh"
197
198
void
PhysicsList::AddPhysicsList
(
const
G4String
&
name
)
199
{
200
if
(
verboseLevel
>0) {
201
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
<<
G4endl
;
202
}
203
204
if
(name ==
fEmName
)
return
;
205
206
if
(name ==
"local"
) {
207
208
fEmName
=
name
;
209
delete
fEmPhysicsList
;
210
fEmPhysicsList
=
new
PhysListEmStandard
(name);
211
212
}
else
if
(name ==
"emstandard_opt3"
) {
213
214
fEmName
=
name
;
215
delete
fEmPhysicsList
;
216
fEmPhysicsList
=
new
G4EmStandardPhysics_option3
();
217
218
}
else
if
(name ==
"emstandardSS"
) {
219
220
fEmName
=
name
;
221
delete
fEmPhysicsList
;
222
fEmPhysicsList
=
new
G4EmStandardPhysicsSS
();
223
224
}
else
if
(name ==
"emstandardWVI"
) {
225
226
fEmName
=
name
;
227
delete
fEmPhysicsList
;
228
fEmPhysicsList
=
new
G4EmStandardPhysicsWVI
();
229
230
}
else
if
(name ==
"emstandardGS"
) {
231
232
fEmName
=
name
;
233
delete
fEmPhysicsList
;
234
fEmPhysicsList
=
new
G4EmStandardPhysicsGS
();
235
236
}
else
if
(name ==
"emstandard5D"
) {
237
fEmName
=
name
;
238
delete
fEmPhysicsList
;
239
fEmPhysicsList
=
new
PhysListEm5DStandard
();
240
241
}
else
if
(name ==
"emlivermorePola"
) {
242
fEmName
=
name
;
243
delete
fEmPhysicsList
;
244
fEmPhysicsList
=
new
G4EmLivermorePolarizedPhysics
();
245
246
}
else
{
247
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
248
<<
" is not defined"
249
<<
G4endl
;
250
}
251
}
252
253
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
254
255
#include "
G4ProcessManager.hh
"
256
#include "StepMax.hh"
257
258
void
PhysicsList::AddStepMax
()
259
{
260
// Step limitation seen as a process
261
StepMax
* stepMaxProcess =
new
StepMax
();
262
263
auto
particleIterator
=
GetParticleIterator
();
264
particleIterator
->reset();
265
while
((*
particleIterator
)()){
266
G4ParticleDefinition
*
particle
=
particleIterator
->value();
267
G4ProcessManager
* pmanager = particle->
GetProcessManager
();
268
269
if
(stepMaxProcess->
IsApplicable
(*particle) && pmanager)
270
{
271
pmanager ->
AddDiscreteProcess
(stepMaxProcess);
272
}
273
}
274
}
275
276
277
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
geant4
tree
geant4-10.6-release
examples
extended
electromagnetic
TestEm15
src
PhysicsList.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:50
using
1.8.2 with
ECCE GitHub integration