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 "PhysListEmLivermore.hh"
38
#include "PhysListEmPenelope.hh"
39
40
#include "
G4LossTableManager.hh
"
41
#include "
G4UnitsTable.hh
"
42
#include "
G4SystemOfUnits.hh
"
43
44
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
45
46
PhysicsList::PhysicsList
() :
G4VModularPhysicsList
(),
47
fMessenger(0),
48
fEmPhysicsList(0)
49
{
50
G4LossTableManager::Instance
();
51
fMessenger
=
new
PhysicsListMessenger
(
this
);
52
53
// EM physics
54
fEmName
=
G4String
(
"standard"
);
55
fEmPhysicsList
=
new
PhysListEmStandard
(
fEmName
);
56
57
SetDefaultCutValue
(1.*
mm
);
58
59
SetVerboseLevel
(1);
60
}
61
62
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
63
64
PhysicsList::~PhysicsList
()
65
{
66
delete
fEmPhysicsList
;
67
delete
fMessenger
;
68
}
69
70
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
71
72
void
PhysicsList::AddPhysicsList
(
const
G4String
&
name
)
73
{
74
if
(
verboseLevel
>1) {
75
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
<<
G4endl
;
76
}
77
78
if
(name ==
fEmName
)
return
;
79
80
if
(name ==
"standard"
) {
81
82
fEmName
=
name
;
83
delete
fEmPhysicsList
;
84
fEmPhysicsList
=
new
PhysListEmStandard
(name);
85
86
}
else
if
(name ==
"livermore"
) {
87
88
fEmName
=
name
;
89
delete
fEmPhysicsList
;
90
fEmPhysicsList
=
new
PhysListEmLivermore
(name);
91
92
}
else
if
(name ==
"penelope"
) {
93
94
fEmName
=
name
;
95
delete
fEmPhysicsList
;
96
fEmPhysicsList
=
new
PhysListEmPenelope
(name);
97
98
}
else
{
99
100
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
101
<<
" is not defined"
102
<<
G4endl
;
103
}
104
}
105
106
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
107
108
// Bosons
109
#include "
G4ChargedGeantino.hh
"
110
#include "
G4Geantino.hh
"
111
#include "
G4Gamma.hh
"
112
113
// leptons
114
#include "
G4Electron.hh
"
115
#include "
G4Positron.hh
"
116
117
#include "
G4MuonPlus.hh
"
118
#include "
G4MuonMinus.hh
"
119
120
// Mesons
121
#include "
G4PionPlus.hh
"
122
#include "
G4PionMinus.hh
"
123
124
#include "
G4KaonPlus.hh
"
125
#include "
G4KaonMinus.hh
"
126
127
// Baryons
128
#include "
G4Proton.hh
"
129
#include "
G4AntiProton.hh
"
130
#include "
G4Neutron.hh
"
131
#include "
G4AntiNeutron.hh
"
132
133
// Nuclei
134
#include "
G4Deuteron.hh
"
135
#include "
G4Triton.hh
"
136
#include "
G4Alpha.hh
"
137
#include "
G4GenericIon.hh
"
138
139
void
PhysicsList::ConstructParticle
()
140
{
141
// pseudo-particles
142
G4Geantino::GeantinoDefinition
();
143
G4ChargedGeantino::ChargedGeantinoDefinition
();
144
145
// gamma
146
G4Gamma::GammaDefinition
();
147
148
// leptons
149
G4Electron::ElectronDefinition
();
150
G4Positron::PositronDefinition
();
151
G4MuonPlus::MuonPlusDefinition
();
152
G4MuonMinus::MuonMinusDefinition
();
153
154
// mesons
155
G4PionPlus::PionPlusDefinition
();
156
G4PionMinus::PionMinusDefinition
();
157
G4KaonPlus::KaonPlusDefinition
();
158
G4KaonMinus::KaonMinusDefinition
();
159
160
// baryons
161
G4Proton::ProtonDefinition
();
162
G4AntiProton::AntiProtonDefinition
();
163
G4Neutron::NeutronDefinition
();
164
G4AntiNeutron::AntiNeutronDefinition
();
165
166
// ions
167
G4Deuteron::DeuteronDefinition
();
168
G4Triton::TritonDefinition
();
169
G4Alpha::AlphaDefinition
();
170
G4GenericIon::GenericIonDefinition
();
171
}
172
173
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
174
175
void
PhysicsList::ConstructProcess
()
176
{
177
AddTransportation
();
178
fEmPhysicsList
->
ConstructProcess
();
179
AddStepMax
();
180
}
181
182
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
183
184
#include "
G4ProcessManager.hh
"
185
#include "StepMax.hh"
186
187
void
PhysicsList::AddStepMax
()
188
{
189
// Step limitation seen as a process
190
StepMax
* stepMaxProcess =
new
StepMax
();
191
192
auto
particleIterator
=
GetParticleIterator
();
193
particleIterator
->reset();
194
while
((*
particleIterator
)()){
195
G4ParticleDefinition
*
particle
=
particleIterator
->value();
196
G4ProcessManager
* pmanager = particle->
GetProcessManager
();
197
198
if
(stepMaxProcess->
IsApplicable
(*particle) && !particle->
IsShortLived
())
199
{
200
pmanager ->
AddDiscreteProcess
(stepMaxProcess);
201
}
202
}
203
}
204
205
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
geant4
tree
geant4-10.6-release
examples
extended
electromagnetic
TestEm18
src
PhysicsList.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:50
using
1.8.2 with
ECCE GitHub integration