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_Hadron_JLeic.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4_EndCap_Hadron_JLeic.C
1
#ifndef MACRO_G4ENDCAPHADRON
2
#define MACRO_G4ENDCAPHADRON
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_HADRON
=
false
;
14
}
15
16
namespace
G4ENDCAPHADRON
17
{
18
double
outer_radius
= 243.;
// cm
19
double
length
= 250.;
20
double
place_z
= 400. / 2. +
length
/ 2. + 170.;
21
}
// namespace G4ENDCAPHADRON
22
23
void
EndCap_HadronInit
()
24
{
25
BlackHoleGeometry::max_radius
=
std::max
(
BlackHoleGeometry::max_radius
,
G4ENDCAPHADRON::outer_radius
);
26
BlackHoleGeometry::max_z
=
std::max
(
BlackHoleGeometry::max_z
,
G4ENDCAPHADRON::place_z
+
G4ENDCAPHADRON::length
/ 2.);
27
}
28
29
void
EndCap_Hadron
(
PHG4Reco
*g4Reco)
30
{
31
double
hadron_inner_radius = 80.;
// cm
32
PHG4CylinderSubsystem
*mothervol =
new
PHG4CylinderSubsystem
(
"EndCapHadronContainer"
, 0);
33
mothervol->
set_color
(0.3, 0, 3., 0.1);
34
mothervol->
set_double_param
(
"radius"
, 20.);
35
mothervol->
set_string_param
(
"material"
,
"G4_AIR"
);
36
mothervol->
set_double_param
(
"thickness"
,
G4ENDCAPHADRON::outer_radius
- 20.);
37
mothervol->
set_double_param
(
"length"
,
G4ENDCAPHADRON::length
);
38
mothervol->
set_double_param
(
"place_z"
,
G4ENDCAPHADRON::place_z
);
39
g4Reco->
registerSubsystem
(mothervol);
40
double
size_z
= 2.;
41
double
gap
= 2.;
42
double
z_start
= size_z / 2. - 250. / 2.;
43
int
nlayer = 25;
44
for
(
int
i = 0; i < nlayer; i++)
45
{
46
PHG4CylinderSubsystem
*cyl =
new
PHG4CylinderSubsystem
(
"ECHADRON"
, i);
47
cyl->
SetMotherSubsystem
(mothervol);
48
cyl->
set_color
(0.6, 0, 0.6, 1);
49
cyl->
set_double_param
(
"radius"
, hadron_inner_radius);
50
cyl->
set_string_param
(
"material"
,
"G4_Fe"
);
51
cyl->
set_double_param
(
"thickness"
,
G4ENDCAPHADRON::outer_radius
- hadron_inner_radius);
52
cyl->
set_double_param
(
"length"
, size_z);
53
cyl->
set_double_param
(
"place_z"
, z_start);
54
cyl->
SetActive
();
55
cyl->
SuperDetector
(
"ECHADRON"
);
56
z_start += gap +
size_z
;
57
g4Reco->
registerSubsystem
(cyl);
58
}
59
return
;
60
}
61
#endif // MACRO_G4ENDCAPHADRON
fun4all_eicmacros
blob
master
common
G4_EndCap_Hadron_JLeic.C
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:53
using
1.8.2 with
EIC GitHub integration