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