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
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
31
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32
33
#include "PhysicsList.hh"
34
#include "PhysicsListMessenger.hh"
35
36
#include "PhysListEmStandard.hh"
37
#include "PhysListEm5DStandard.hh"
38
#include "
PhysListEm19DStandard.hh
"
39
40
#include "
G4EmStandardPhysics.hh
"
41
#include "
G4EmStandardPhysics_option1.hh
"
42
#include "
G4EmStandardPhysics_option2.hh
"
43
#include "
G4EmStandardPhysics_option3.hh
"
44
#include "
G4EmStandardPhysics_option4.hh
"
45
#include "
G4EmStandardPhysicsWVI.hh
"
46
#include "
G4EmStandardPhysicsGS.hh
"
47
#include "
G4EmStandardPhysicsSS.hh
"
48
49
#include "
G4EmLivermorePhysics.hh
"
50
#include "
G4EmPenelopePhysics.hh
"
51
#include "
G4EmLowEPPhysics.hh
"
52
53
#include "
G4EmDNAPhysics.hh
"
54
#include "
G4EmDNAPhysics_option2.hh
"
55
#include "
G4EmDNAPhysics_option4.hh
"
56
#include "
G4EmDNAPhysics_option6.hh
"
57
58
#include "
G4HadronElasticPhysics.hh
"
59
60
#include "
G4DecayPhysics.hh
"
61
#include "StepMax.hh"
62
63
#include "
G4UnitsTable.hh
"
64
#include "
G4SystemOfUnits.hh
"
65
66
#include "
G4ParticleDefinition.hh
"
67
#include "
G4ProcessManager.hh
"
68
69
// particles
70
71
#include "
G4BosonConstructor.hh
"
72
#include "
G4LeptonConstructor.hh
"
73
#include "
G4MesonConstructor.hh
"
74
#include "
G4BosonConstructor.hh
"
75
#include "
G4BaryonConstructor.hh
"
76
#include "
G4IonConstructor.hh
"
77
#include "
G4ShortLivedConstructor.hh
"
78
#include "
G4DNAGenericIonsManager.hh
"
79
80
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
81
82
PhysicsList::PhysicsList
() :
G4VModularPhysicsList
(),
83
fHadPhysicsList(nullptr)
84
{
85
fMessenger
=
new
PhysicsListMessenger
(
this
);
86
SetVerboseLevel
(1);
87
88
// EM physics
89
fEmName
=
G4String
(
"emstandard_opt4"
);
90
fEmPhysicsList
=
new
G4EmStandardPhysics_option4
();
91
92
// Decay physics
93
fDecayPhysics
=
new
G4DecayPhysics
(1);
94
95
SetDefaultCutValue
(1*
mm
);
96
}
97
98
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
99
100
PhysicsList::~PhysicsList
()
101
{
102
delete
fEmPhysicsList
;
103
delete
fMessenger
;
104
}
105
106
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
107
108
void
PhysicsList::ConstructParticle
()
109
{
110
G4BosonConstructor
pBosonConstructor;
111
pBosonConstructor.
ConstructParticle
();
112
113
G4LeptonConstructor
pLeptonConstructor;
114
pLeptonConstructor.
ConstructParticle
();
115
116
G4MesonConstructor
pMesonConstructor;
117
pMesonConstructor.
ConstructParticle
();
118
119
G4BaryonConstructor
pBaryonConstructor;
120
pBaryonConstructor.
ConstructParticle
();
121
122
G4IonConstructor
pIonConstructor;
123
pIonConstructor.
ConstructParticle
();
124
125
G4ShortLivedConstructor
sLivedConstructor;
126
sLivedConstructor.
ConstructParticle
();
127
128
// Geant4-DNA
129
130
G4DNAGenericIonsManager
* genericIonsManager;
131
genericIonsManager=
G4DNAGenericIonsManager::Instance
();
132
genericIonsManager->
GetIon
(
"alpha++"
);
133
genericIonsManager->
GetIon
(
"alpha+"
);
134
genericIonsManager->
GetIon
(
"helium"
);
135
genericIonsManager->
GetIon
(
"hydrogen"
);
136
}
137
138
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
139
140
void
PhysicsList::ConstructProcess
()
141
{
142
AddTransportation
();
143
fEmPhysicsList
->
ConstructProcess
();
144
fDecayPhysics
->
ConstructProcess
();
145
if
(
fHadPhysicsList
) {
fHadPhysicsList
->
ConstructProcess
(); }
146
AddStepMax
();
147
}
148
149
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
150
151
void
PhysicsList::AddStepMax
()
152
{
153
// Step limitation seen as a process
154
StepMax
* stepMaxProcess =
new
StepMax
(
fMessenger
);
155
156
auto
particleIterator
=
GetParticleIterator
();
157
particleIterator
->reset();
158
while
((*
particleIterator
)()){
159
G4ParticleDefinition
*
particle
=
particleIterator
->value();
160
G4ProcessManager
* pmanager = particle->
GetProcessManager
();
161
162
if
(stepMaxProcess->
IsApplicable
(*particle))
163
{
164
pmanager ->
AddDiscreteProcess
(stepMaxProcess);
165
}
166
}
167
}
168
169
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
170
171
void
PhysicsList::AddPhysicsList
(
const
G4String
&
name
)
172
{
173
if
(
verboseLevel
>-1) {
174
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
<<
G4endl
;
175
}
176
177
if
(name ==
fEmName
)
return
;
178
179
if
(name ==
"local"
) {
180
181
fEmName
=
name
;
182
delete
fEmPhysicsList
;
183
fEmPhysicsList
=
new
PhysListEmStandard
(name);
184
185
}
else
if
(name ==
"emstandard_opt0"
) {
186
187
fEmName
=
name
;
188
delete
fEmPhysicsList
;
189
fEmPhysicsList
=
new
G4EmStandardPhysics
();
190
191
}
else
if
(name ==
"emstandard_opt1"
) {
192
193
fEmName
=
name
;
194
delete
fEmPhysicsList
;
195
fEmPhysicsList
=
new
G4EmStandardPhysics_option1
();
196
197
}
else
if
(name ==
"emstandard_opt2"
) {
198
199
fEmName
=
name
;
200
delete
fEmPhysicsList
;
201
fEmPhysicsList
=
new
G4EmStandardPhysics_option2
();
202
203
}
else
if
(name ==
"emstandard_opt3"
) {
204
205
fEmName
=
name
;
206
delete
fEmPhysicsList
;
207
fEmPhysicsList
=
new
G4EmStandardPhysics_option3
();
208
209
}
else
if
(name ==
"emstandard_opt4"
) {
210
211
fEmName
=
name
;
212
delete
fEmPhysicsList
;
213
fEmPhysicsList
=
new
G4EmStandardPhysics_option4
();
214
215
}
else
if
(name ==
"emstandardATIMA"
) {
216
217
fEmName
=
name
;
218
delete
fEmPhysicsList
;
219
fEmPhysicsList
=
new
PhysListEm19DStandard
();
220
221
}
else
if
(name ==
"emstandardSS"
) {
222
223
fEmName
=
name
;
224
delete
fEmPhysicsList
;
225
fEmPhysicsList
=
new
G4EmStandardPhysicsSS
();
226
227
}
else
if
(name ==
"emstandard5D"
) {
228
229
fEmName
=
name
;
230
delete
fEmPhysicsList
;
231
fEmPhysicsList
=
new
PhysListEm5DStandard
();
232
233
}
else
if
(name ==
"emstandardWVI"
) {
234
235
fEmName
=
name
;
236
delete
fEmPhysicsList
;
237
fEmPhysicsList
=
new
G4EmStandardPhysicsWVI
();
238
239
}
else
if
(name ==
"emstandardGS"
) {
240
241
fEmName
=
name
;
242
delete
fEmPhysicsList
;
243
fEmPhysicsList
=
new
G4EmStandardPhysicsGS
();
244
245
}
else
if
(name ==
"empenelope"
) {
246
fEmName
=
name
;
247
delete
fEmPhysicsList
;
248
fEmPhysicsList
=
new
G4EmPenelopePhysics
();
249
250
}
else
if
(name ==
"emlowenergy"
) {
251
fEmName
=
name
;
252
delete
fEmPhysicsList
;
253
fEmPhysicsList
=
new
G4EmLowEPPhysics
();
254
255
}
else
if
(name ==
"emlivermore"
) {
256
fEmName
=
name
;
257
delete
fEmPhysicsList
;
258
fEmPhysicsList
=
new
G4EmLivermorePhysics
();
259
260
}
else
if
(name ==
"dna"
) {
261
fEmName
=
name
;
262
delete
fEmPhysicsList
;
263
fEmPhysicsList
=
new
G4EmDNAPhysics
();
264
265
}
else
if
(name ==
"dna_opt2"
) {
266
fEmName
=
name
;
267
delete
fEmPhysicsList
;
268
fEmPhysicsList
=
new
G4EmDNAPhysics_option2
();
269
270
}
else
if
(name ==
"dna_opt4"
) {
271
fEmName
=
name
;
272
delete
fEmPhysicsList
;
273
fEmPhysicsList
=
new
G4EmDNAPhysics_option4
();
274
275
}
else
if
(name ==
"dna_opt6"
) {
276
fEmName
=
name
;
277
delete
fEmPhysicsList
;
278
fEmPhysicsList
=
new
G4EmDNAPhysics_option6
();
279
280
}
else
if
(name ==
"had_elastic"
&& !
fHadPhysicsList
) {
281
fHadPhysicsList
=
new
G4HadronElasticPhysics
();
282
283
}
else
{
284
285
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
286
<<
" is not defined"
287
<<
G4endl
;
288
}
289
}
290
291
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
geant4
tree
geant4-10.6-release
examples
extended
electromagnetic
TestEm5
src
PhysicsList.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:50
using
1.8.2 with
ECCE GitHub integration