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
//
33
//
36
37
#include "PhysicsList.hh"
38
#include "PhysicsListMessenger.hh"
39
40
#include "
G4EmDNAPhysics.hh
"
41
#include "
G4EmDNAPhysics_option1.hh
"
42
#include "
G4EmDNAPhysics_option2.hh
"
43
#include "
G4EmDNAPhysics_option3.hh
"
44
#include "
G4EmDNAPhysics_option4.hh
"
45
#include "
G4EmDNAPhysics_option5.hh
"
46
#include "
G4EmDNAPhysics_option6.hh
"
47
#include "
G4EmDNAPhysics_option7.hh
"
48
49
#include "
G4UserSpecialCuts.hh
"
50
51
// particles
52
53
#include "
G4BosonConstructor.hh
"
54
#include "
G4LeptonConstructor.hh
"
55
#include "
G4MesonConstructor.hh
"
56
#include "
G4BosonConstructor.hh
"
57
#include "
G4BaryonConstructor.hh
"
58
#include "
G4IonConstructor.hh
"
59
#include "
G4ShortLivedConstructor.hh
"
60
#include "
G4DNAGenericIonsManager.hh
"
61
62
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
63
64
PhysicsList::PhysicsList
() :
G4VModularPhysicsList
(),
65
fEmPhysicsList(0), fMessenger(0)
66
{
67
fMessenger
=
new
PhysicsListMessenger
(
this
);
68
69
SetVerboseLevel
(1);
70
71
// EM physics
72
fEmPhysicsList
=
new
G4EmDNAPhysics
();
73
74
}
75
76
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
77
78
PhysicsList::~PhysicsList
()
79
{
80
delete
fMessenger
;
81
delete
fEmPhysicsList
;
82
}
83
84
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
85
86
void
PhysicsList::ConstructParticle
()
87
{
88
G4BosonConstructor
pBosonConstructor;
89
pBosonConstructor.
ConstructParticle
();
90
91
G4LeptonConstructor
pLeptonConstructor;
92
pLeptonConstructor.
ConstructParticle
();
93
94
G4MesonConstructor
pMesonConstructor;
95
pMesonConstructor.
ConstructParticle
();
96
97
G4BaryonConstructor
pBaryonConstructor;
98
pBaryonConstructor.
ConstructParticle
();
99
100
G4IonConstructor
pIonConstructor;
101
pIonConstructor.
ConstructParticle
();
102
103
G4ShortLivedConstructor
pShortLivedConstructor;
104
pShortLivedConstructor.
ConstructParticle
();
105
106
G4DNAGenericIonsManager
* genericIonsManager;
107
genericIonsManager=
G4DNAGenericIonsManager::Instance
();
108
genericIonsManager->
GetIon
(
"alpha++"
);
109
genericIonsManager->
GetIon
(
"alpha+"
);
110
genericIonsManager->
GetIon
(
"helium"
);
111
genericIonsManager->
GetIon
(
"hydrogen"
);
112
}
113
114
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
115
116
#include "
G4ProcessManager.hh
"
117
#include "
G4EmProcessOptions.hh
"
118
119
void
PhysicsList::ConstructProcess
()
120
{
121
// transportation
122
//
123
AddTransportation
();
124
125
// electromagnetic physics list
126
//
127
fEmPhysicsList
->
ConstructProcess
();
128
129
// tracking cut
130
//
131
AddTrackingCut
();
132
133
}
134
135
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
136
137
void
PhysicsList::AddPhysicsList
(
const
G4String
&
name
)
138
{
139
if
(
verboseLevel
>-1) {
140
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
<<
G4endl
;
141
}
142
143
if
(name ==
fEmName
)
return
;
144
145
if
(name ==
"dna"
) {
146
fEmName
=
name
;
147
delete
fEmPhysicsList
;
148
fEmPhysicsList
=
new
G4EmDNAPhysics
();
149
150
}
else
if
(name ==
"dna_opt1"
) {
151
fEmName
=
name
;
152
delete
fEmPhysicsList
;
153
fEmPhysicsList
=
new
G4EmDNAPhysics_option1
();
154
155
}
else
if
(name ==
"dna_opt2"
) {
156
fEmName
=
name
;
157
delete
fEmPhysicsList
;
158
fEmPhysicsList
=
new
G4EmDNAPhysics_option2
();
159
160
}
else
if
(name ==
"dna_opt3"
) {
161
fEmName
=
name
;
162
delete
fEmPhysicsList
;
163
fEmPhysicsList
=
new
G4EmDNAPhysics_option3
();
164
165
}
else
if
(name ==
"dna_opt4"
) {
166
fEmName
=
name
;
167
delete
fEmPhysicsList
;
168
fEmPhysicsList
=
new
G4EmDNAPhysics_option4
();
169
170
}
else
if
(name ==
"dna_opt5"
) {
171
fEmName
=
name
;
172
delete
fEmPhysicsList
;
173
fEmPhysicsList
=
new
G4EmDNAPhysics_option5
();
174
175
}
else
if
(name ==
"dna_opt6"
) {
176
fEmName
=
name
;
177
delete
fEmPhysicsList
;
178
fEmPhysicsList
=
new
G4EmDNAPhysics_option6
();
179
180
}
else
if
(name ==
"dna_opt7"
) {
181
fEmName
=
name
;
182
delete
fEmPhysicsList
;
183
fEmPhysicsList
=
new
G4EmDNAPhysics_option7
();
184
185
}
else
{
186
187
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
188
<<
" is not defined"
189
<<
G4endl
;
190
}
191
}
192
193
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
194
195
void
PhysicsList::AddTrackingCut
()
196
{
197
G4PhysicsListHelper
* ph =
G4PhysicsListHelper::GetPhysicsListHelper
();
198
199
auto
particleIterator
=
GetParticleIterator
();
200
particleIterator
->reset();
201
while
((*
particleIterator
)())
202
{
203
G4ParticleDefinition
*
particle
=
particleIterator
->value();
204
G4String
particleName = particle->
GetParticleName
();
205
206
if
(particleName ==
"e-"
)
207
ph->
RegisterProcess
(
new
G4UserSpecialCuts
(), particle);
208
}
209
}
210
211
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
geant4
tree
geant4-10.6-release
examples
extended
medical
dna
slowing
src
PhysicsList.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:51
using
1.8.2 with
ECCE GitHub integration