EIC Software
Reference for
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
G4_EndCap_Electron_JLeic.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4_EndCap_Electron_JLeic.C
1
#ifndef MACRO_G4ENDCAPELECTRON
2
#define MACRO_G4ENDCAPELECTRON
3
4
#include <GlobalVariables.C>
5
6
#include <
g4detectors/PHG4CylinderSubsystem.h
>
7
#include <
g4main/PHG4Reco.h
>
8
9
R__LOAD_LIBRARY
(libg4detectors.so)
10
11
namespace Enable
12
{
13
bool
ENDCAP_ELECTRON
=
false
;
14
}
15
16
namespace
G4ENDCAPELECTRON
17
{
18
double
outer_radius
= 244.;
// cm
19
double
size_z
= 60.;
20
double
place_z
= -400. / 2. -
size_z
/ 2.;
21
}
// namespace G4ENDCAPELECTRON
22
23
void
EndCap_ElectronInit
()
24
{
25
BlackHoleGeometry::max_radius
=
std::max
(
BlackHoleGeometry::max_radius
,
G4ENDCAPELECTRON::outer_radius
);
26
BlackHoleGeometry::min_z
=
std::min
(
BlackHoleGeometry::min_z
,
G4ENDCAPELECTRON::place_z
-
G4ENDCAPELECTRON::size_z
/ 2.);
27
}
28
29
void
EndCap_Electron
(
PHG4Reco
* g4Reco)
30
{
31
// here is our silicon:
32
double
inner_radius
= 20.;
// cm
33
PHG4CylinderSubsystem
* cyl =
new
PHG4CylinderSubsystem
(
"ECELECTRON"
, 0);
34
cyl->
set_double_param
(
"radius"
, inner_radius);
35
cyl->
set_string_param
(
"material"
,
"G4_Fe"
);
36
cyl->
set_double_param
(
"thickness"
,
G4ENDCAPELECTRON::outer_radius
- inner_radius);
37
cyl->
set_double_param
(
"length"
,
G4ENDCAPELECTRON::size_z
);
38
cyl->
set_double_param
(
"place_z"
,
G4ENDCAPELECTRON::place_z
);
39
cyl->
SetActive
();
40
cyl->
SuperDetector
(
"ECELECTRON"
);
41
g4Reco->
registerSubsystem
(cyl);
42
43
return
;
44
}
45
46
#endif // MACRO_G4ENDCAPELECTRON
fun4all_eicmacros
blob
master
common
G4_EndCap_Electron_JLeic.C
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:53
using
1.8.2 with
EIC GitHub integration