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
//
32
//
33
// PhysicsList
34
//
35
// Created: 31.04.2006 V.Ivanchenko
36
//
37
// Modified:
38
// 04.06.2006 Adoptation of Hadr01 (V.Ivanchenko)
39
// 26.04.2007 Physics according to 8.3 Physics List (V.Ivanchenko)
40
// 16.10.2012 Renamed used classes (A.Ribon)
41
//
43
//
44
45
#include "PhysicsList.hh"
46
#include "PhysicsListMessenger.hh"
47
48
#include "
G4DecayPhysics.hh
"
49
#include "
G4EmStandardPhysics.hh
"
50
#include "
G4EmStandardPhysics_option1.hh
"
51
#include "
G4EmStandardPhysics_option2.hh
"
52
#include "
G4EmStandardPhysics_option3.hh
"
53
#include "
G4EmStandardPhysics_option4.hh
"
54
#include "
G4EmStandardPhysicsGS.hh
"
55
#include "
G4EmLivermorePhysics.hh
"
56
#include "
G4EmPenelopePhysics.hh
"
57
#include "
G4HadronElasticPhysics.hh
"
58
#include "
G4HadronElasticPhysicsXS.hh
"
59
#include "
G4HadronElasticPhysicsHP.hh
"
60
#include "
G4HadronHElasticPhysics.hh
"
61
#include "
G4ChargeExchangePhysics.hh
"
62
#include "
G4NeutronTrackingCut.hh
"
63
#include "
G4NeutronCrossSectionXS.hh
"
64
#include "
G4StoppingPhysics.hh
"
65
#include "
G4IonBinaryCascadePhysics.hh
"
66
#include "
G4IonPhysics.hh
"
67
#include "
G4IonPhysicsXS.hh
"
68
#include "
G4IonElasticPhysics.hh
"
69
#include "
G4EmExtraPhysics.hh
"
70
#include "
G4EmParameters.hh
"
71
#include "
G4PhysListFactoryMessenger.hh
"
72
73
#include "
G4HadronPhysicsFTFP_BERT.hh
"
74
#include "
G4HadronPhysicsFTFP_BERT_HP.hh
"
75
#include "
G4HadronPhysicsFTFP_BERT_TRV.hh
"
76
#include "
G4HadronPhysicsFTF_BIC.hh
"
77
#include "
G4HadronInelasticQBBC.hh
"
78
#include "
G4HadronPhysicsQGSP_BERT.hh
"
79
#include "
G4HadronPhysicsQGSP_BERT_HP.hh
"
80
#include "
G4HadronPhysicsQGSP_BIC.hh
"
81
#include "
G4HadronPhysicsQGSP_BIC_HP.hh
"
82
#include "
G4HadronPhysicsQGSP_FTFP_BERT.hh
"
83
#include "
G4HadronPhysicsQGS_BIC.hh
"
84
#include "
G4RadioactiveDecayPhysics.hh
"
85
86
#include "
G4ProcessManager.hh
"
87
#include "
G4ParticleTypes.hh
"
88
#include "
G4ParticleTable.hh
"
89
#include "
G4Gamma.hh
"
90
#include "
G4Electron.hh
"
91
#include "
G4Positron.hh
"
92
#include "
G4Proton.hh
"
93
94
#include "
G4SystemOfUnits.hh
"
95
96
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
97
98
PhysicsList::PhysicsList
() :
G4VModularPhysicsList
()
99
{
100
SetDefaultCutValue
(0.7*
CLHEP::mm
);
101
102
verboseLevel
= 1;
103
104
fMessenger
=
new
PhysicsListMessenger
(
this
);
105
fFactMessenger
=
new
G4PhysListFactoryMessenger
(
this
);
106
107
// Particles
108
fParticleList
=
new
G4DecayPhysics
(
verboseLevel
);
109
110
// EM physics
111
fEmPhysicsList
=
new
G4EmStandardPhysics
(
verboseLevel
);
112
}
113
114
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
115
116
PhysicsList::~PhysicsList
()
117
{
118
delete
fMessenger
;
119
delete
fParticleList
;
120
delete
fEmPhysicsList
;
121
for
(
size_t
i=0; i<
fHadronPhys
.size(); i++) {
122
delete
fHadronPhys
[i];
123
}
124
}
125
126
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
127
128
void
PhysicsList::ConstructParticle
()
129
{
130
fParticleList
->
ConstructParticle
();
131
}
132
133
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
134
135
void
PhysicsList::ConstructProcess
()
136
{
137
AddTransportation
();
138
fEmPhysicsList
->
ConstructProcess
();
139
fParticleList
->
ConstructProcess
();
140
for
(
size_t
i=0; i<
fHadronPhys
.size(); i++) {
141
fHadronPhys
[i]->ConstructProcess();
142
}
143
}
144
145
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
146
147
void
PhysicsList::AddPhysicsList
(
const
G4String
&
name
)
148
{
149
if
(
verboseLevel
>0) {
150
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
<<
G4endl
;
151
}
152
if
(name ==
"emstandard_opt0"
) {
153
154
delete
fEmPhysicsList
;
155
fEmPhysicsList
=
new
G4EmStandardPhysics
(
verboseLevel
);
156
157
}
else
if
(name ==
"emstandard_opt1"
) {
158
159
delete
fEmPhysicsList
;
160
fEmPhysicsList
=
new
G4EmStandardPhysics_option1
(
verboseLevel
);
161
162
}
else
if
(name ==
"emstandard_opt2"
) {
163
164
delete
fEmPhysicsList
;
165
fEmPhysicsList
=
new
G4EmStandardPhysics_option2
(
verboseLevel
);
166
167
}
else
if
(name ==
"emstandard_opt3"
) {
168
169
delete
fEmPhysicsList
;
170
fEmPhysicsList
=
new
G4EmStandardPhysics_option3
(
verboseLevel
);
171
172
}
else
if
(name ==
"emstandard_opt4"
) {
173
174
delete
fEmPhysicsList
;
175
fEmPhysicsList
=
new
G4EmStandardPhysics_option4
(
verboseLevel
);
176
177
}
else
if
(name ==
"emstandardGS"
) {
178
179
delete
fEmPhysicsList
;
180
fEmPhysicsList
=
new
G4EmStandardPhysicsGS
(
verboseLevel
);
181
182
}
else
if
(name ==
"FTFP_BERT_EMV"
) {
183
184
AddPhysicsList
(
"FTFP_BERT"
);
185
AddPhysicsList
(
"emstandard_opt1"
);
186
187
}
else
if
(name ==
"FTFP_BERT_EMX"
) {
188
189
AddPhysicsList
(
"FTFP_BERT"
);
190
AddPhysicsList
(
"emstandard_opt2"
);
191
192
}
else
if
(name ==
"FTFP_BERT_EMY"
) {
193
194
AddPhysicsList
(
"FTFP_BERT"
);
195
AddPhysicsList
(
"emstandard_opt3"
);
196
197
}
else
if
(name ==
"FTFP_BERT_EMZ"
) {
198
199
AddPhysicsList
(
"FTFP_BERT"
);
200
AddPhysicsList
(
"emstandard_opt4"
);
201
202
}
else
if
(name ==
"FTFP_BERT"
) {
203
204
SetBuilderList0
(
false
);
205
fHadronPhys
.push_back(
new
G4HadronPhysicsFTFP_BERT
(
verboseLevel
));
206
207
}
else
if
(name ==
"FTFP_BERT_TRV"
) {
208
209
AddPhysicsList
(
"emstandardGS"
);
210
G4EmParameters::Instance
()->
SetMscStepLimitType
(
fUseSafety
);
211
212
SetBuilderList1
(
false
);
213
fHadronPhys
.push_back(
new
G4HadronPhysicsFTFP_BERT_TRV
(
verboseLevel
));
214
215
}
else
if
(name ==
"FTF_BIC"
) {
216
217
SetBuilderList0
(
false
);
218
fHadronPhys
.push_back(
new
G4HadronPhysicsFTF_BIC
(
verboseLevel
));
219
220
}
else
if
(name ==
"QBBC"
) {
221
222
AddPhysicsList
(
"emstandard_opt0"
);
223
SetBuilderList2
();
224
fHadronPhys
.push_back(
new
G4HadronInelasticQBBC
(
verboseLevel
));
225
226
}
else
if
(name ==
"QGSP_BERT"
) {
227
228
SetBuilderList0
(
false
);
229
fHadronPhys
.push_back(
new
G4HadronPhysicsQGSP_BERT
(
verboseLevel
));
230
231
}
else
if
(name ==
"QGSP_FTFP_BERT"
) {
232
233
SetBuilderList0
(
false
);
234
fHadronPhys
.push_back(
new
G4HadronPhysicsQGSP_FTFP_BERT
(
verboseLevel
));
235
236
}
else
if
(name ==
"QGSP_FTFP_BERT_EMV"
) {
237
238
AddPhysicsList
(
"QGSP_FTFP_BERT"
);
239
AddPhysicsList
(
"emstandard_opt1"
);
240
241
}
else
if
(name ==
"QGSP_BERT_EMV"
) {
242
243
AddPhysicsList
(
"QGSP_BERT"
);
244
AddPhysicsList
(
"emstandard_opt1"
);
245
246
}
else
if
(name ==
"QGSP_BERT_EMX"
) {
247
248
AddPhysicsList
(
"QGSP_BERT"
);
249
AddPhysicsList
(
"emstandard_opt2"
);
250
251
}
else
if
(name ==
"QGSP_BERT_HP"
) {
252
253
SetBuilderList0
(
true
);
254
fHadronPhys
.push_back(
new
G4HadronPhysicsQGSP_BERT_HP
(
verboseLevel
));
255
256
}
else
if
(name ==
"QGSP_BIC"
) {
257
258
SetBuilderList0
(
false
);
259
fHadronPhys
.push_back(
new
G4HadronPhysicsQGSP_BIC
(
verboseLevel
));
260
fHadronPhys
.push_back(
new
G4IonElasticPhysics
(
verboseLevel
));
261
262
}
else
if
(name ==
"QGSP_BIC_EMY"
) {
263
264
AddPhysicsList
(
"QGSP_BIC"
);
265
AddPhysicsList
(
"emstandard_opt3"
);
266
267
}
else
if
(name ==
"QGS_BIC"
) {
268
269
SetBuilderList0
(
false
);
270
fHadronPhys
.push_back(
new
G4HadronPhysicsQGS_BIC
(
verboseLevel
));
271
272
}
else
if
(name ==
"QGSP_BIC_HP"
) {
273
274
SetBuilderList0
(
true
);
275
fHadronPhys
.push_back(
new
G4HadronPhysicsQGSP_BIC_HP
(
verboseLevel
));
276
277
}
else
if
(name ==
"RadioactiveDecay"
) {
278
279
fHadronPhys
.push_back(
new
G4RadioactiveDecayPhysics
(
verboseLevel
));
280
281
}
else
{
282
283
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
284
<<
" is not defined"
285
<<
G4endl
;
286
}
287
}
288
289
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
290
291
void
PhysicsList::SetBuilderList0
(
G4bool
flagHP)
292
{
293
fHadronPhys
.push_back(
new
G4EmExtraPhysics
(
verboseLevel
));
294
if
(flagHP) {
295
fHadronPhys
.push_back(
new
G4HadronElasticPhysicsHP
(
verboseLevel
) );
296
}
else
{
297
fHadronPhys
.push_back(
new
G4HadronElasticPhysics
(
verboseLevel
) );
298
}
299
fHadronPhys
.push_back(
new
G4StoppingPhysics
(
verboseLevel
));
300
fHadronPhys
.push_back(
new
G4IonPhysics
(
verboseLevel
));
301
fHadronPhys
.push_back(
new
G4NeutronTrackingCut
(
verboseLevel
));
302
}
303
304
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
305
306
void
PhysicsList::SetBuilderList1
(
G4bool
flagHP)
307
{
308
fHadronPhys
.push_back(
new
G4EmExtraPhysics
(
verboseLevel
));
309
if
(flagHP) {
310
fHadronPhys
.push_back(
new
G4HadronElasticPhysicsHP
(
verboseLevel
) );
311
}
else
{
312
fHadronPhys
.push_back(
new
G4HadronHElasticPhysics
(
verboseLevel
) );
313
}
314
fHadronPhys
.push_back(
new
G4StoppingPhysics
(
verboseLevel
));
315
fHadronPhys
.push_back(
new
G4IonPhysics
(
verboseLevel
));
316
fHadronPhys
.push_back(
new
G4NeutronTrackingCut
(
verboseLevel
));
317
}
318
319
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
320
321
void
PhysicsList::SetBuilderList2
()
322
{
323
fHadronPhys
.push_back(
new
G4EmExtraPhysics
(
verboseLevel
));
324
fHadronPhys
.push_back(
new
G4HadronElasticPhysicsXS
(
verboseLevel
) );
325
fHadronPhys
.push_back(
new
G4StoppingPhysics
(
verboseLevel
));
326
fHadronPhys
.push_back(
new
G4IonPhysicsXS
(
verboseLevel
));
327
fHadronPhys
.push_back(
new
G4IonElasticPhysics
(
verboseLevel
));
328
fHadronPhys
.push_back(
new
G4NeutronTrackingCut
(
verboseLevel
));
329
}
330
331
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
332
333
void
PhysicsList::List
()
334
{
335
G4cout
<<
"### PhysicsLists available: FTFP_BERT FTFP_BERT_EMV "
336
<<
"FTFP_BERT_EMX FTFP_BERT_EMZ FTFP_BERT_TRV"
337
<<
G4endl
;
338
G4cout
<<
" FTF_BIC QBBC QGSP_BERT "
339
<<
"QGSP_BERT_EMV QGSP_BERT_EMX"
340
<<
G4endl
;
341
G4cout
<<
" QGSP_BERT_HP QGSP_FTFP_BERT "
342
<<
"QGSP_FTFP_BERT_EMV"
343
<<
G4endl
;
344
G4cout
<<
" QGS_BIC QGSP_BIC QGSP_BIC_EMY "
345
<<
"QGSP_BIC_HP"
346
<<
G4endl
;
347
}
348
349
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
350
geant4
tree
geant4-10.6-release
examples
extended
hadronic
Hadr01
src
PhysicsList.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:50
using
1.8.2 with
ECCE GitHub integration