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
Par02PhysicsList.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file Par02PhysicsList.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
//
26
//
29
30
#include "
Par02PhysicsList.hh
"
31
#include "
globals.hh
"
32
#include "
G4ParticleDefinition.hh
"
33
#include "
G4ProcessManager.hh
"
34
#include "
G4ProcessVector.hh
"
35
#include "
G4ParticleTypes.hh
"
36
#include "
G4ParticleTable.hh
"
37
#include "
G4Material.hh
"
38
#include "
G4MaterialTable.hh
"
39
#include "
G4ios.hh
"
40
#include "
G4SystemOfUnits.hh
"
41
#include <iomanip>
42
#include "
G4FastSimulationManagerProcess.hh
"
43
44
#include "
G4Decay.hh
"
45
#include "
G4LeptonConstructor.hh
"
46
#include "
G4MesonConstructor.hh
"
47
#include "
G4BaryonConstructor.hh
"
48
#include "
G4IonConstructor.hh
"
49
50
#include "
G4ComptonScattering.hh
"
51
#include "
G4GammaConversion.hh
"
52
#include "
G4PhotoElectricEffect.hh
"
53
54
#include "
G4eMultipleScattering.hh
"
55
#include "
G4MuMultipleScattering.hh
"
56
#include "
G4hMultipleScattering.hh
"
57
58
#include "
G4eIonisation.hh
"
59
#include "
G4eBremsstrahlung.hh
"
60
#include "
G4eplusAnnihilation.hh
"
61
62
#include "
G4MuIonisation.hh
"
63
#include "
G4MuBremsstrahlung.hh
"
64
#include "
G4MuPairProduction.hh
"
65
66
#include "
G4hIonisation.hh
"
67
68
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
69
70
Par02PhysicsList::Par02PhysicsList
() :
G4VUserPhysicsList
() {
71
SetVerboseLevel
( 1 );
72
defaultCutValue
= 0.1*
m
;
73
}
74
75
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
76
77
Par02PhysicsList::~Par02PhysicsList
() {}
78
79
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
80
81
void
Par02PhysicsList::ConstructParticle
() {
82
// In this method, static member functions should be called for all particles
83
// which you want to use.
84
// This ensures that objects of these particle types will be created in the program.
85
ConstructBosons
();
86
ConstructLeptons
();
87
ConstructMesons
();
88
ConstructBaryons
();
89
ConstructIons
();
90
}
91
92
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
93
94
void
Par02PhysicsList::ConstructBosons
() {
95
G4Geantino::GeantinoDefinition
();
96
G4ChargedGeantino::ChargedGeantinoDefinition
();
97
G4Gamma::GammaDefinition
();
98
G4OpticalPhoton::OpticalPhotonDefinition
();
99
}
100
101
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
102
103
void
Par02PhysicsList::ConstructLeptons
() {
104
G4LeptonConstructor
pConstructor;
105
pConstructor.
ConstructParticle
();
106
}
107
108
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
109
110
void
Par02PhysicsList::ConstructMesons
() {
111
G4MesonConstructor
pConstructor;
112
pConstructor.
ConstructParticle
();
113
}
114
115
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
116
117
void
Par02PhysicsList::ConstructBaryons
() {
118
G4BaryonConstructor
pConstructor;
119
pConstructor.
ConstructParticle
();
120
}
121
122
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
123
124
void
Par02PhysicsList::ConstructIons
() {
125
G4IonConstructor
pConstructor;
126
pConstructor.
ConstructParticle
();
127
}
128
129
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
130
131
void
Par02PhysicsList::ConstructProcess
() {
132
AddTransportation
();
133
AddParameterisation
();
134
ConstructGeneral
();
135
}
136
137
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
138
139
void
Par02PhysicsList::AddTransportation
() {
140
//UseCoupledTransportation();
141
G4VUserPhysicsList::AddTransportation
();
142
}
143
144
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
145
146
void
Par02PhysicsList::ConstructGeneral
() {
147
G4Decay
* theDecayProcess =
new
G4Decay
();
148
auto
particleIterator
=
GetParticleIterator
();
149
particleIterator
->reset();
150
while
( (*
particleIterator
)() ) {
151
G4ParticleDefinition
*
particle
=
particleIterator
->value();
152
G4ProcessManager
* pmanager = particle->
GetProcessManager
();
153
if
( theDecayProcess->
IsApplicable
( *particle ) ) {
154
pmanager->
AddProcess
( theDecayProcess );
155
// set ordering for PostStepDoIt and AtRestDoIt
156
pmanager->
SetProcessOrdering
( theDecayProcess,
idxPostStep
);
157
pmanager->
SetProcessOrdering
( theDecayProcess,
idxAtRest
);
158
}
159
}
160
}
161
162
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
163
164
void
Par02PhysicsList::AddParameterisation
() {
165
G4FastSimulationManagerProcess
* fastSimProcess =
166
new
G4FastSimulationManagerProcess
(
"G4FSMP"
);
167
168
// Registers the fastSimProcess with all the particles as a discrete and
169
// continuous process (this works in all cases; in the case that parallel
170
// geometries are not used, as in this example, it would be enough to
171
// add it as a discrete process).
172
auto
particleIterator
=
GetParticleIterator
();
173
particleIterator
->reset();
174
while
( (*
particleIterator
)() ) {
175
G4ParticleDefinition
*
particle
=
particleIterator
->value();
176
G4ProcessManager
* pmanager = particle->
GetProcessManager
();
177
//pmanager->AddDiscreteProcess( fastSimProcess ); // No parallel geometry
178
pmanager->
AddProcess
( fastSimProcess, -1, 0, 0 );
// General
179
}
180
}
181
182
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
183
184
void
Par02PhysicsList::SetCuts
() {
185
if
(
verboseLevel
> 1 ) {
186
G4cout
<<
"Par02PhysicsList::SetCuts:"
;
187
}
188
SetCutsWithDefault
();
189
}
190
191
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
192
geant4
tree
geant4-10.6-release
examples
extended
parameterisations
Par02
src
Par02PhysicsList.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:10
using
1.8.2 with
ECCE GitHub integration