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
//
32
// ClassName: PhysicsList
33
//
34
// Description: EM physics with a possibility to add PAI model
35
//
36
// Author: V.Ivanchenko 01.09.2010
37
//
38
//----------------------------------------------------------------------------
39
//
40
41
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
42
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
43
44
#include "PhysicsList.hh"
45
#include "PhysicsListMessenger.hh"
46
47
#include "
G4EmStandardPhysics.hh
"
48
#include "
G4EmStandardPhysics_option1.hh
"
49
#include "
G4EmStandardPhysics_option2.hh
"
50
#include "
G4EmStandardPhysics_option3.hh
"
51
#include "
G4EmStandardPhysics_option4.hh
"
52
#include "
G4EmStandardPhysicsGS.hh
"
53
#include "
G4EmStandardPhysicsSS.hh
"
54
#include "
G4EmStandardPhysicsWVI.hh
"
55
#include "
G4EmLivermorePhysics.hh
"
56
#include "
G4EmPenelopePhysics.hh
"
57
#include "
G4EmLowEPPhysics.hh
"
58
#include "
G4DecayPhysics.hh
"
59
60
#include "
G4PAIModel.hh
"
61
#include "
G4PAIPhotModel.hh
"
62
63
#include "
G4Gamma.hh
"
64
#include "
G4Electron.hh
"
65
#include "
G4Positron.hh
"
66
#include "
G4Proton.hh
"
67
68
#include "
G4UnitsTable.hh
"
69
#include "
G4SystemOfUnits.hh
"
70
#include "
G4LossTableManager.hh
"
71
#include "
G4ProductionCutsTable.hh
"
72
#include "
G4EmConfigurator.hh
"
73
#include "
G4EmParameters.hh
"
74
75
#include "StepMax.hh"
76
77
#include "
G4ProcessManager.hh
"
78
#include "
G4ParticleTypes.hh
"
79
#include "
G4ParticleTable.hh
"
80
#include "DetectorConstruction.hh"
81
82
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
83
84
PhysicsList::PhysicsList
(
DetectorConstruction
* ptr)
85
:
G4VModularPhysicsList
(), fDetectorConstruction(ptr)
86
{
87
// set verbosity for zero to avoid double printout
88
// on physics verbosity should be restored to 1 when cuts
89
// are set
90
G4EmParameters::Instance
()->
SetVerbose
(0);
91
92
SetDefaultCutValue
(1*
mm
);
93
94
fMessenger
=
new
PhysicsListMessenger
(
this
);
95
96
// Decay Physics is always defined
97
fDecayPhysicsList
=
new
G4DecayPhysics
();
98
99
// EM physics
100
fEmName
=
G4String
(
"emstandard_opt0"
);
101
fEmPhysicsList
=
new
G4EmStandardPhysics
(0);
102
103
SetVerboseLevel
(1);
104
}
105
106
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
107
108
PhysicsList::~PhysicsList
()
109
{
110
delete
fMessenger
;
111
delete
fDecayPhysicsList
;
112
delete
fEmPhysicsList
;
113
}
114
115
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
116
117
void
PhysicsList::ConstructParticle
()
118
{
119
fDecayPhysicsList
->
ConstructParticle
();
120
}
121
122
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
123
124
void
PhysicsList::ConstructProcess
()
125
{
126
AddTransportation
();
127
fEmPhysicsList
->
ConstructProcess
();
128
fDecayPhysicsList
->
ConstructProcess
();
129
AddStepMax
();
130
}
131
132
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
133
134
void
PhysicsList::AddPhysicsList
(
const
G4String
&
name
)
135
{
136
if
(
verboseLevel
>1) {
137
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
<<
G4endl
;
138
}
139
140
if
(name ==
fEmName
) {
141
return
;
142
143
}
else
if
(name ==
"emstandard_opt0"
) {
144
145
fEmName
=
name
;
146
delete
fEmPhysicsList
;
147
fEmPhysicsList
=
new
G4EmStandardPhysics
(0);
148
149
}
else
if
(name ==
"emstandard_opt1"
) {
150
151
fEmName
=
name
;
152
delete
fEmPhysicsList
;
153
fEmPhysicsList
=
new
G4EmStandardPhysics_option1
(0);
154
155
}
else
if
(name ==
"emstandard_opt2"
) {
156
157
fEmName
=
name
;
158
delete
fEmPhysicsList
;
159
fEmPhysicsList
=
new
G4EmStandardPhysics_option2
(0);
160
161
}
else
if
(name ==
"emstandard_opt3"
) {
162
163
fEmName
=
name
;
164
delete
fEmPhysicsList
;
165
fEmPhysicsList
=
new
G4EmStandardPhysics_option3
(0);
166
167
}
else
if
(name ==
"emstandard_opt4"
) {
168
169
fEmName
=
name
;
170
delete
fEmPhysicsList
;
171
fEmPhysicsList
=
new
G4EmStandardPhysics_option4
(0);
172
173
}
else
if
(name ==
"emstandardWVI"
) {
174
175
fEmName
=
name
;
176
delete
fEmPhysicsList
;
177
fEmPhysicsList
=
new
G4EmStandardPhysicsWVI
(0);
178
179
}
else
if
(name ==
"emstandardSS"
) {
180
181
fEmName
=
name
;
182
delete
fEmPhysicsList
;
183
fEmPhysicsList
=
new
G4EmStandardPhysicsSS
(0);
184
185
}
else
if
(name ==
"emstandardGS"
) {
186
187
fEmName
=
name
;
188
delete
fEmPhysicsList
;
189
fEmPhysicsList
=
new
G4EmStandardPhysicsGS
(0);
190
191
}
else
if
(name ==
"pai"
) {
192
G4EmParameters::Instance
()->
AddPAIModel
(
"all"
,
"world"
,
"pai"
);
193
194
}
else
if
(name ==
"pai_photon"
) {
195
G4EmParameters::Instance
()->
AddPAIModel
(
"all"
,
"world"
,
"pai_photon"
);
196
197
}
else
if
(name ==
"emlivermore"
) {
198
199
fEmName
=
name
;
200
delete
fEmPhysicsList
;
201
fEmPhysicsList
=
new
G4EmLivermorePhysics
(0);
202
203
}
else
if
(name ==
"empenelope"
) {
204
205
fEmName
=
name
;
206
delete
fEmPhysicsList
;
207
fEmPhysicsList
=
new
G4EmPenelopePhysics
(0);
208
209
}
else
if
(name ==
"emlowenergy"
) {
210
211
fEmName
=
name
;
212
delete
fEmPhysicsList
;
213
fEmPhysicsList
=
new
G4EmLowEPPhysics
(0);
214
215
}
else
{
216
217
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
218
<<
" is not defined"
219
<<
G4endl
;
220
}
221
}
222
223
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
224
225
void
PhysicsList::AddStepMax
()
226
{
227
// Step limitation seen as a process
228
StepMax
* stepMaxProcess =
new
StepMax
(
fDetectorConstruction
);
229
230
auto
particleIterator
=
GetParticleIterator
();
231
particleIterator
->reset();
232
while
((*
particleIterator
)())
233
{
234
G4ParticleDefinition
*
particle
=
particleIterator
->value();
235
G4ProcessManager
* pmanager = particle->
GetProcessManager
();
236
237
if
(stepMaxProcess->
IsApplicable
(*particle))
238
{
239
pmanager->
AddDiscreteProcess
(stepMaxProcess);
240
}
241
}
242
}
243
244
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
245
246
void
PhysicsList::SetCuts
()
247
{
248
G4ProductionCutsTable::GetProductionCutsTable
()->
SetEnergyRange
(25.*
eV
,1
e5
);
249
if
(
verboseLevel
> 0 ) {
DumpCutValuesTable
(); }
250
}
251
252
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
253
geant4
tree
geant4-10.6-release
examples
extended
electromagnetic
TestEm8
src
PhysicsList.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:50
using
1.8.2 with
ECCE GitHub integration