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
// Med. Phys. 37 (2010) 4692-4708
30
// Phys. Med. 31 (2015) 861-874
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
#include "
G4EmDNAPhysics_option7.hh
"
47
#include "
G4EmStandardPhysics_option3.hh
"
48
#include "
G4DecayPhysics.hh
"
49
#include "
G4RadioactiveDecayPhysics.hh
"
50
51
#include "
G4UnitsTable.hh
"
52
#include "
G4SystemOfUnits.hh
"
53
#include "
G4UserSpecialCuts.hh
"
54
55
// particles
56
57
#include "
G4BosonConstructor.hh
"
58
#include "
G4LeptonConstructor.hh
"
59
#include "
G4MesonConstructor.hh
"
60
#include "
G4BosonConstructor.hh
"
61
#include "
G4BaryonConstructor.hh
"
62
#include "
G4IonConstructor.hh
"
63
#include "
G4ShortLivedConstructor.hh
"
64
#include "
G4DNAGenericIonsManager.hh
"
65
66
// decay
67
68
#include "
G4RadioactiveDecay.hh
"
69
#include "
G4SystemOfUnits.hh
"
70
#include "
G4NuclideTable.hh
"
71
#include "
G4LossTableManager.hh
"
72
#include "
G4UAtomicDeexcitation.hh
"
73
#include "
G4NuclearLevelData.hh
"
74
#include "
G4DeexPrecoParameters.hh
"
75
#include "
G4NuclideTable.hh
"
76
#include "
G4GenericIon.hh
"
77
78
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
79
80
PhysicsList::PhysicsList
() :
G4VModularPhysicsList
(),
81
fEmPhysicsList(0), fMessenger(0)
82
{
83
fMessenger
=
new
PhysicsListMessenger
(
this
);
84
85
SetVerboseLevel
(1);
86
87
// EM physics
88
fEmPhysicsList
=
new
G4EmDNAPhysics
();
89
90
// ***Decay physics from rad01 example***
91
//
92
93
//add new units for radioActive decays
94
//
95
const
G4double
minute = 60*
second
;
96
const
G4double
hour = 60*minute;
97
const
G4double
day = 24*hour;
98
const
G4double
year = 365*day;
99
new
G4UnitDefinition
(
"minute"
,
"min"
,
"Time"
, minute);
100
new
G4UnitDefinition
(
"hour"
,
"h"
,
"Time"
, hour);
101
new
G4UnitDefinition
(
"day"
,
"d"
,
"Time"
, day);
102
new
G4UnitDefinition
(
"year"
,
"y"
,
"Time"
, year);
103
104
// mandatory for G4NuclideTable
105
//
106
G4NuclideTable::GetInstance
()->
SetThresholdOfHalfLife
(0.1*
picosecond
);
107
G4NuclideTable::GetInstance
()->
SetLevelTolerance
(1.0*
eV
);
108
109
//read new PhotonEvaporation data set
110
//
111
G4DeexPrecoParameters
* deex =
112
G4NuclearLevelData::GetInstance
()->
GetParameters
();
113
114
deex->
SetCorrelatedGamma
(
false
);
115
116
deex->
SetStoreAllLevels
(
true
);
117
118
deex->
SetMaxLifeTime
119
(
G4NuclideTable::GetInstance
()->GetThresholdOfHalfLife()/std::log(2.));
120
121
}
122
123
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
124
125
PhysicsList::~PhysicsList
()
126
{
127
delete
fMessenger
;
128
delete
fEmPhysicsList
;
129
130
}
131
132
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
133
134
void
PhysicsList::ConstructParticle
()
135
{
136
G4BosonConstructor
pBosonConstructor;
137
pBosonConstructor.
ConstructParticle
();
138
139
G4LeptonConstructor
pLeptonConstructor;
140
pLeptonConstructor.
ConstructParticle
();
141
142
G4MesonConstructor
pMesonConstructor;
143
pMesonConstructor.
ConstructParticle
();
144
145
G4BaryonConstructor
pBaryonConstructor;
146
pBaryonConstructor.
ConstructParticle
();
147
148
G4IonConstructor
pIonConstructor;
149
pIonConstructor.
ConstructParticle
();
150
151
G4ShortLivedConstructor
pShortLivedConstructor;
152
pShortLivedConstructor.
ConstructParticle
();
153
154
155
G4DNAGenericIonsManager
* genericIonsManager;
156
genericIonsManager=
G4DNAGenericIonsManager::Instance
();
157
genericIonsManager->
GetIon
(
"alpha++"
);
158
genericIonsManager->
GetIon
(
"alpha+"
);
159
genericIonsManager->
GetIon
(
"helium"
);
160
genericIonsManager->
GetIon
(
"hydrogen"
);
161
}
162
163
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
164
165
#include "
G4ProcessManager.hh
"
166
#include "
G4EmProcessOptions.hh
"
167
168
void
PhysicsList::ConstructProcess
()
169
{
170
// transportation
171
//
172
AddTransportation
();
173
174
// electromagnetic physics list
175
//
176
fEmPhysicsList
->
ConstructProcess
();
177
178
// tracking cut
179
//
180
AddTrackingCut
();
181
182
// decay
183
//
184
185
G4RadioactiveDecay
* radioactiveDecay =
new
G4RadioactiveDecay
();
186
187
G4bool
ARMflag =
true
;
188
radioactiveDecay->
SetARM
(ARMflag);
//Atomic Rearangement
189
190
// need to initialize atomic deexcitation
191
//
192
G4LossTableManager
* man =
G4LossTableManager::Instance
();
193
G4VAtomDeexcitation
* deex = man->
AtomDeexcitation
();
194
if
(!deex) {
195
G4EmParameters::Instance
()->
SetAugerCascade
(ARMflag);
196
deex =
new
G4UAtomicDeexcitation
();
197
deex->
InitialiseAtomicDeexcitation
();
198
man->
SetAtomDeexcitation
(deex);
199
}
200
201
// register radioactiveDecay
202
//
203
G4PhysicsListHelper
* ph =
G4PhysicsListHelper::GetPhysicsListHelper
();
204
ph->
RegisterProcess
(radioactiveDecay,
G4GenericIon::GenericIon
());
205
206
//printout
207
//
208
G4cout
<<
"\n Set atomic relaxation mode "
<< ARMflag <<
G4endl
;
209
}
210
211
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
212
213
void
PhysicsList::AddPhysicsList
(
const
G4String
&
name
)
214
{
215
if
(
verboseLevel
>-1) {
216
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
<<
G4endl
;
217
}
218
219
if
(name ==
fEmName
)
return
;
220
221
if
(name ==
"dna"
) {
222
fEmName
=
name
;
223
delete
fEmPhysicsList
;
224
fEmPhysicsList
=
new
G4EmDNAPhysics
();
225
226
}
else
if
(name ==
"dna_opt1"
) {
227
fEmName
=
name
;
228
delete
fEmPhysicsList
;
229
fEmPhysicsList
=
new
G4EmDNAPhysics_option1
();
230
}
231
else
if
(name ==
"dna_opt2"
) {
232
fEmName
=
name
;
233
delete
fEmPhysicsList
;
234
fEmPhysicsList
=
new
G4EmDNAPhysics_option2
();
235
}
236
else
if
(name ==
"dna_opt3"
) {
237
fEmName
=
name
;
238
delete
fEmPhysicsList
;
239
fEmPhysicsList
=
new
G4EmDNAPhysics_option3
();
240
}
241
else
if
(name ==
"dna_opt4"
) {
242
fEmName
=
name
;
243
delete
fEmPhysicsList
;
244
fEmPhysicsList
=
new
G4EmDNAPhysics_option4
();
245
}
246
else
if
(name ==
"dna_opt5"
) {
247
fEmName
=
name
;
248
delete
fEmPhysicsList
;
249
fEmPhysicsList
=
new
G4EmDNAPhysics_option5
();
250
}
251
else
if
(name ==
"dna_opt6"
) {
252
fEmName
=
name
;
253
delete
fEmPhysicsList
;
254
fEmPhysicsList
=
new
G4EmDNAPhysics_option6
();
255
}
256
else
if
(name ==
"dna_opt7"
) {
257
fEmName
=
name
;
258
delete
fEmPhysicsList
;
259
fEmPhysicsList
=
new
G4EmDNAPhysics_option7
();
260
}
261
else
if
(name ==
"std_opt3"
) {
262
fEmName
=
name
;
263
delete
fEmPhysicsList
;
264
fEmPhysicsList
=
new
G4EmStandardPhysics_option3
();
265
}
266
else
{
267
G4cout
<<
"PhysicsList::AddPhysicsList: <"
<< name <<
">"
268
<<
" is not defined"
269
<<
G4endl
;
270
}
271
}
272
273
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
274
275
void
PhysicsList::AddTrackingCut
()
276
{
277
G4PhysicsListHelper
* ph =
G4PhysicsListHelper::GetPhysicsListHelper
();
278
279
auto
particleIterator
=
GetParticleIterator
();
280
particleIterator
->reset();
281
while
( (*
particleIterator
)() )
282
{
283
G4ParticleDefinition
*
particle
=
particleIterator
->value();
284
G4String
particleName = particle->
GetParticleName
();
285
286
if
(particleName ==
"e-"
)
287
ph->
RegisterProcess
(
new
G4UserSpecialCuts
(), particle);
288
}
289
}
290
291
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
292
293
void
PhysicsList::SetCuts
()
294
{
295
296
// SetCutsWithDefault();
297
298
// or
299
300
defaultCutValue
= 1. *
nm
;
301
SetCutValue
(
defaultCutValue
,
"gamma"
);
302
SetCutValue
(
defaultCutValue
,
"e-"
);
303
SetCutValue
(
defaultCutValue
,
"e+"
);
304
305
G4double
lowLimit = 10. *
eV
;
306
G4double
highLimit = 100. *
GeV
;
307
308
G4ProductionCutsTable::GetProductionCutsTable
()->
SetEnergyRange
(lowLimit,
309
highLimit);
310
311
// print cuts
312
if
(
verboseLevel
>0)
DumpCutValuesTable
();
313
314
}
315
geant4
tree
geant4-10.6-release
examples
extended
medical
dna
svalue
src
PhysicsList.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:51
using
1.8.2 with
ECCE GitHub integration