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