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
STCyclotronPhysicsList.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file STCyclotronPhysicsList.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
// Author: F. Poignant, floriane.poignant@gmail.com
27
//
28
29
#include "
STCyclotronPhysicsList.hh
"
30
#include "
G4Proton.hh
"
31
#include "
G4Neutron.hh
"
32
#include "
G4Electron.hh
"
33
#include "
G4Positron.hh
"
34
#include "
G4Gamma.hh
"
35
#include "
G4Deuteron.hh
"
36
37
//Physic Lists (contained inside the Geant 4 distribution)
38
#include "
G4EmStandardPhysics_option3.hh
"
39
#include "
G4DecayPhysics.hh
"
40
#include "
G4Decay.hh
"
41
#include "
G4StepLimiter.hh
"
42
#include "
G4LossTableManager.hh
"
43
#include "
G4UnitsTable.hh
"
44
#include "
G4SystemOfUnits.hh
"
45
#include "
G4ProcessManager.hh
"
46
#include "
G4Region.hh
"
47
#include "
G4RegionStore.hh
"
48
49
#include "
G4EmExtraPhysics.hh
"
50
#include "
G4EmParameters.hh
"
51
#include "
G4NuclideTable.hh
"
52
53
#include "
G4HadronPhysicsQGSP_BERT.hh
"
54
#include "
G4HadronPhysicsQGSP_BIC.hh
"
55
#include "
G4HadronPhysicsQGSP_BIC_HP.hh
"
56
#include "
G4HadronPhysicsQGSP_BIC_AllHP.hh
"
57
#include "
G4RadioactiveDecayPhysics.hh
"
58
//#include "QGSP_BIC_HP.hh"
59
#include "
G4PhysListFactory.hh
"
60
#include "
G4DeexPrecoParameters.hh
"
61
#include "
G4NuclideTable.hh
"
62
63
STCyclotronPhysicsList::STCyclotronPhysicsList
(
STCyclotronDetectorConstruction
* det)
64
:
G4VModularPhysicsList
(){
65
66
//add new units for radioActive decays
67
68
new
G4UnitDefinition
(
"millielectronVolt"
,
"meV"
,
"Energy"
, 1.
e
-3*
eV
);
69
const
G4double
minute = 60*
second
;
70
const
G4double
hour = 60*minute;
71
const
G4double
day = 24*hour;
72
const
G4double
year = 365*day;
73
new
G4UnitDefinition
(
"minute"
,
"min"
,
"Time"
, minute);
74
new
G4UnitDefinition
(
"hour"
,
"h"
,
"Time"
, hour);
75
new
G4UnitDefinition
(
"day"
,
"d"
,
"Time"
, day);
76
new
G4UnitDefinition
(
"year"
,
"y"
,
"Time"
, year);
77
78
// Mandatory for G4NuclideTable
79
// Half-life threshold must be set small or many short-lived isomers
80
// will not be assigned life times (default to 0)
81
G4NuclideTable::GetInstance
()->
SetThresholdOfHalfLife
(0.1*
second
);
82
G4NuclideTable::GetInstance
()->
SetLevelTolerance
(1.0*
eV
);
83
84
//---
85
fDetector
= det;
86
87
G4LossTableManager::Instance
();
88
89
defaultCutValue
= 0.1*
mm
;
90
fCutForGamma
=
defaultCutValue
;
91
fCutForElectron
=
defaultCutValue
;
92
fCutForPositron
=
defaultCutValue
;
93
94
fThickness_foil
=
defaultCutValue
;
95
fThickness_target
=
defaultCutValue
;
96
97
fCutTargetProton
=
fThickness_target
;
98
fCutTargetElectron
=
fThickness_target
;
99
fCutTargetPositron
=
fThickness_target
;
100
fCutTargetGamma
=
fThickness_target
;
101
fCutTargetNeutron
=
fThickness_target
;
102
103
fCutFoilProton
=
fThickness_foil
;
104
fCutFoilElectron
=
fThickness_foil
;
105
fCutFoilPositron
=
fThickness_foil
;
106
fCutFoilGamma
=
fThickness_foil
;
107
fCutFoilNeutron
=
fThickness_foil
;
108
109
//EM physics
110
fEmPhysicsList
=
new
G4EmStandardPhysics_option3
(0);
111
fEmName
=
G4String
(
"emstandard_opt3"
);
112
113
//Decay physics and all particles
114
fDecPhysicsList
=
new
G4DecayPhysics
(0);
115
fRaddecayList
=
new
G4RadioactiveDecayPhysics
(0);
116
117
//Hadron physics
118
fHadPhysicsList
=
new
G4HadronPhysicsQGSP_BIC_AllHP
(0);
119
//fHadPhysicsList = new G4HadronPhysicsQGSP_BIC(0);
120
121
122
123
124
125
}
126
127
STCyclotronPhysicsList::~STCyclotronPhysicsList
()
128
{
129
130
delete
fEmPhysicsList
;
131
delete
fDecPhysicsList
;
132
delete
fRaddecayList
;
133
delete
fHadPhysicsList
;
134
135
136
}
137
138
void
STCyclotronPhysicsList::ConstructParticle
()
139
{
140
141
G4Proton::ProtonDefinition
();
142
G4Gamma::GammaDefinition
();
143
G4Electron::ElectronDefinition
();
144
G4Positron::PositronDefinition
();
145
G4Neutron::NeutronDefinition
();
146
G4Deuteron::DeuteronDefinition
();
147
148
fDecPhysicsList
->
ConstructParticle
();
149
150
151
}
152
153
void
STCyclotronPhysicsList::ConstructProcess
()
154
{
155
// Define transportation process
156
157
158
AddTransportation
();
159
160
//electromagnetic physics list
161
fEmPhysicsList
->
ConstructProcess
();
162
//em_config.AddModels();
163
164
//decay physics list
165
fDecPhysicsList
->
ConstructProcess
();
166
fRaddecayList
->
ConstructProcess
();
167
168
//hadronic physics lists
169
fHadPhysicsList
->
ConstructProcess
();
170
171
//Get the value of the fThickness of foil and target
172
fThickness_foil
=
fDetector
->
GetFoilThickness
()*
mm
;
173
fThickness_target
=
fDetector
->
GetTargetThickness
()*
mm
;
174
175
//Update the cuts with the 1/2 of the thickness of the foil/target
176
//SetCuts();
177
178
SetCutTarget
(0.01,
fThickness_target
/2.,
fThickness_target
/2.,
fThickness_target
/2.,
fThickness_target
/2.);
179
180
181
182
}
183
184
void
STCyclotronPhysicsList::SetCuts
()
185
{
186
187
if
(
verboseLevel
>0){
188
G4cout
<<
"PhysicsList::SetCuts:"
;
189
G4cout
<<
"CutLength : "
<<
G4BestUnit
(
defaultCutValue
,
"Length"
) <<
G4endl
;
190
}
191
192
// set cut values for gamma at first and for e- second and next for e+,
193
// because some processes for e+/e- need cut values for gamma
194
SetCutValue
(
fCutForGamma
,
"gamma"
);
195
SetCutValue
(
fCutForElectron
,
"e-"
);
196
SetCutValue
(
fCutForPositron
,
"e+"
);
197
198
// Set cuts for detector
199
SetCutFoil
(0.1,
fThickness_foil
/2.,
fThickness_foil
/2.,
fThickness_foil
/2.,
fThickness_foil
/2.);
200
SetCutTarget
(0.01,
fThickness_target
/2.,
fThickness_target
/2.,
fThickness_target
/2.,
fThickness_target
/2.);
201
if
(
verboseLevel
>0)
DumpCutValuesTable
();
202
}
203
204
void
STCyclotronPhysicsList::SetCutForGamma
(
G4double
cut)
205
{
206
fCutForGamma
= cut;
207
SetParticleCuts
(
fCutForGamma
,
G4Gamma::Gamma
());
208
}
209
210
void
STCyclotronPhysicsList::SetCutForElectron
(
G4double
cut)
211
{
212
fCutForElectron
= cut;
213
SetParticleCuts
(
fCutForElectron
,
G4Electron::Electron
());
214
}
215
216
void
STCyclotronPhysicsList::SetCutForPositron
(
G4double
cut)
217
{
218
fCutForPositron
= cut;
219
SetParticleCuts
(
fCutForPositron
,
G4Positron::Positron
());
220
}
221
222
void
STCyclotronPhysicsList::SetCutTarget
(
G4double
cutProton,
G4double
cutElectron,
G4double
cutPositron,
G4double
cutGamma,
G4double
cutNeutron){
223
224
fCutTargetProton
= cutProton*
mm
;
225
fCutTargetElectron
= cutElectron*
mm
;
226
fCutTargetPositron
= cutPositron*
mm
;
227
fCutTargetGamma
= cutGamma*
mm
;
228
fCutTargetNeutron
= cutNeutron*
mm
;
229
230
G4String
regionNameTarget =
"Target"
;
231
G4Region
* regionTarget =
G4RegionStore::GetInstance
()->
GetRegion
(regionNameTarget);
232
233
G4ProductionCuts
* cutsTarget =
new
G4ProductionCuts
;
234
cutsTarget -> SetProductionCut(
fCutTargetGamma
,
G4ProductionCuts::GetIndex
(
"gamma"
));
235
cutsTarget -> SetProductionCut(
fCutTargetElectron
,
G4ProductionCuts::GetIndex
(
"e-"
));
236
cutsTarget -> SetProductionCut(
fCutTargetPositron
,
G4ProductionCuts::GetIndex
(
"e+"
));
237
cutsTarget -> SetProductionCut(
fCutTargetProton
,
G4ProductionCuts::GetIndex
(
"proton"
));
238
cutsTarget->
SetProductionCut
(
fCutTargetProton
,
G4ProductionCuts::GetIndex
(
"deuteron"
));
239
cutsTarget -> SetProductionCut(
fCutTargetNeutron
,
G4ProductionCuts::GetIndex
(
"neutron"
));
240
241
regionTarget -> SetProductionCuts(cutsTarget);
242
243
}
244
245
void
STCyclotronPhysicsList::SetCutFoil
(
G4double
cutProton,
G4double
cutElectron,
G4double
cutPositron,
G4double
cutGamma,
G4double
cutNeutron){
246
247
fCutFoilProton
= cutProton*
mm
;
248
fCutFoilElectron
= cutElectron*
mm
;
249
fCutFoilPositron
= cutPositron*
mm
;
250
fCutFoilGamma
= cutGamma*
mm
;
251
fCutFoilNeutron
= cutNeutron*
mm
;
252
253
G4RegionStore::GetInstance
()->
GetRegion
(
"Foil"
);
254
G4String
regionNameFoil =
"Foil"
;
255
G4Region
* regionFoil =
G4RegionStore::GetInstance
()->
GetRegion
(regionNameFoil);
256
257
G4ProductionCuts
* cutsFoil =
new
G4ProductionCuts
;
258
cutsFoil -> SetProductionCut(
fCutFoilGamma
,
G4ProductionCuts::GetIndex
(
"gamma"
));
259
cutsFoil -> SetProductionCut(
fCutFoilElectron
,
G4ProductionCuts::GetIndex
(
"e-"
));
260
cutsFoil -> SetProductionCut(
fCutFoilPositron
,
G4ProductionCuts::GetIndex
(
"e+"
));
261
cutsFoil -> SetProductionCut(
fCutFoilProton
,
G4ProductionCuts::GetIndex
(
"proton"
));
262
cutsFoil->
SetProductionCut
(
fCutFoilProton
,
G4ProductionCuts::GetIndex
(
"deuteron"
));
263
cutsFoil -> SetProductionCut(
fCutFoilNeutron
,
G4ProductionCuts::GetIndex
(
"neutron"
));
264
265
regionFoil -> SetProductionCuts(cutsFoil);
266
267
}
268
geant4
tree
geant4-10.6-release
examples
advanced
STCyclotron
src
STCyclotronPhysicsList.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:00
using
1.8.2 with
ECCE GitHub integration