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
//
26
// This example is provided by the Geant4-DNA collaboration
27
// Any report or published results obtained using the Geant4-DNA software
28
// shall cite the following Geant4-DNA collaboration publications:
29
// Phys. Med. 31 (2015) 861-874
30
// Med. Phys. 37 (2010) 4692-4708
31
// The Geant4-DNA web site is available at http://geant4-dna.org
32
//
35
36
#include "PhysicsList.hh"
37
#include "PhysicsListMessenger.hh"
38
39
#include "
G4EmDNAPhysics.hh
"
40
#include "
G4EmDNAPhysics_option1.hh
"
41
#include "
G4EmDNAPhysics_option2.hh
"
42
#include "
G4EmDNAPhysics_option3.hh
"
43
#include "
G4EmDNAPhysics_option4.hh
"
44
#include "
G4EmDNAPhysics_option5.hh
"
45
#include "
G4EmDNAPhysics_option6.hh
"
46
47
#include "
G4EmLivermorePhysics.hh
"
48
#include "
G4EmPenelopePhysics.hh
"
49
50
#include "
G4UserSpecialCuts.hh
"
51
#include "
G4StepLimiter.hh
"
52
53
// particles
54
55
#include "
G4BosonConstructor.hh
"
56
#include "
G4LeptonConstructor.hh
"
57
#include "
G4MesonConstructor.hh
"
58
#include "
G4BosonConstructor.hh
"
59
#include "
G4BaryonConstructor.hh
"
60
#include "
G4IonConstructor.hh
"
61
#include "
G4ShortLivedConstructor.hh
"
62
#include "
G4DNAGenericIonsManager.hh
"
63
64
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
65
66
PhysicsList::PhysicsList
() :
G4VModularPhysicsList
(),
67
fEmPhysicsList(0), fMessenger(0)
68
{
69
fMessenger
=
new
PhysicsListMessenger
(
this
);
70
71
SetVerboseLevel
(1);
72
73
// EM physics
74
fEmPhysicsList
=
new
G4EmDNAPhysics_option2
();
75
76
}
77
78
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
79
80
PhysicsList::~PhysicsList
()
81
{
82
delete
fMessenger
;
83
delete
fEmPhysicsList
;
84
}
85
86
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
87
88
void
PhysicsList::ConstructParticle
()
89
{
90
G4BosonConstructor
pBosonConstructor;
91
pBosonConstructor.
ConstructParticle
();
92
93
G4LeptonConstructor
pLeptonConstructor;
94
pLeptonConstructor.
ConstructParticle
();
95
96
G4MesonConstructor
pMesonConstructor;
97
pMesonConstructor.
ConstructParticle
();
98
99
G4BaryonConstructor
pBaryonConstructor;
100
pBaryonConstructor.
ConstructParticle
();
101
102
G4IonConstructor
pIonConstructor;
103
pIonConstructor.
ConstructParticle
();
104
105
G4ShortLivedConstructor
pShortLivedConstructor;
106
pShortLivedConstructor.
ConstructParticle
();
107
108
G4DNAGenericIonsManager
* genericIonsManager;
109
genericIonsManager=
G4DNAGenericIonsManager::Instance
();
110
genericIonsManager->
GetIon
(
"alpha++"
);
111
genericIonsManager->
GetIon
(
"alpha+"
);
112
genericIonsManager->
GetIon
(
"helium"
);
113
genericIonsManager->
GetIon
(
"hydrogen"
);
114
}
115
116
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
117
118
#include "
G4ProcessManager.hh
"
119
#include "
G4EmProcessOptions.hh
"
120
121
void
PhysicsList::ConstructProcess
()
122
{
123
// transportation
124
//
125
AddTransportation
();
126
127
// electromagnetic physics list
128
//
129
fEmPhysicsList
->
ConstructProcess
();
130
131
// tracking cut
132
//
133
AddTrackingCut
();
134
135
// maximum step size
136
//
137
AddMaxStepSize
();
138
139
}
140
141
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
142
143
void
PhysicsList::AddPhysicsList
(
const
G4String
&
name
)
144
{
145
if
(
verboseLevel
>-1) {
146
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
<<
G4endl
;
147
}
148
149
if
(name ==
fEmName
)
return
;
150
151
if
(name ==
"dna"
) {
152
fEmName
=
name
;
153
delete
fEmPhysicsList
;
154
fEmPhysicsList
=
new
G4EmDNAPhysics
();
155
156
}
else
if
(name ==
"dna_opt1"
) {
157
fEmName
=
name
;
158
delete
fEmPhysicsList
;
159
fEmPhysicsList
=
new
G4EmDNAPhysics_option1
();
160
161
}
else
if
(name ==
"dna_opt2"
) {
162
fEmName
=
name
;
163
delete
fEmPhysicsList
;
164
fEmPhysicsList
=
new
G4EmDNAPhysics_option2
();
165
166
}
else
if
(name ==
"dna_opt3"
) {
167
fEmName
=
name
;
168
delete
fEmPhysicsList
;
169
fEmPhysicsList
=
new
G4EmDNAPhysics_option3
();
170
171
}
else
if
(name ==
"dna_opt4"
) {
172
fEmName
=
name
;
173
delete
fEmPhysicsList
;
174
fEmPhysicsList
=
new
G4EmDNAPhysics_option4
();
175
176
}
else
if
(name ==
"dna_opt5"
) {
177
fEmName
=
name
;
178
delete
fEmPhysicsList
;
179
fEmPhysicsList
=
new
G4EmDNAPhysics_option5
();
180
181
}
else
if
(name ==
"dna_opt6"
) {
182
fEmName
=
name
;
183
delete
fEmPhysicsList
;
184
fEmPhysicsList
=
new
G4EmDNAPhysics_option6
();
185
186
}
else
if
(name ==
"liv"
) {
187
fEmName
=
name
;
188
delete
fEmPhysicsList
;
189
fEmPhysicsList
=
new
G4EmLivermorePhysics
();
190
191
}
else
if
(name ==
"pene"
) {
192
fEmName
=
name
;
193
delete
fEmPhysicsList
;
194
fEmPhysicsList
=
new
G4EmPenelopePhysics
();
195
196
}
else
{
197
198
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
199
<<
" is not defined"
200
<<
G4endl
;
201
}
202
}
203
204
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
205
206
void
PhysicsList::AddTrackingCut
()
207
{
208
209
G4PhysicsListHelper
* ph =
G4PhysicsListHelper::GetPhysicsListHelper
();
210
211
auto
particleIterator
=
GetParticleIterator
();
212
particleIterator
->reset();
213
while
((*
particleIterator
)())
214
{
215
G4ParticleDefinition
*
particle
=
particleIterator
->value();
216
G4String
particleName = particle->
GetParticleName
();
217
218
if
(particleName ==
"e-"
)
219
{
220
ph->
RegisterProcess
(
new
G4UserSpecialCuts
(), particle);
221
}
222
}
223
}
224
225
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
226
227
void
PhysicsList::AddMaxStepSize
()
228
{
229
230
G4PhysicsListHelper
* ph =
G4PhysicsListHelper::GetPhysicsListHelper
();
231
232
auto
particleIterator
=
GetParticleIterator
();
233
particleIterator
->reset();
234
while
((*
particleIterator
)())
235
{
236
G4ParticleDefinition
* particle =
particleIterator
->value();
237
G4String
particleName = particle->
GetParticleName
();
238
239
if
(particleName ==
"e-"
)
240
{
241
ph->
RegisterProcess
(
new
G4StepLimiter
(), particle);
242
}
243
}
244
}
245
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
geant4
tree
geant4-10.6-release
examples
extended
medical
dna
microyz
src
PhysicsList.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:50
using
1.8.2 with
ECCE GitHub integration