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