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
G4_PlugDoor.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4_PlugDoor.C
1
#ifndef MACRO_G4PLUGDOOR_C
2
#define MACRO_G4PLUGDOOR_C
3
4
#include <
GlobalVariables.C
>
5
6
#include <
g4detectors/PHG4CylinderSubsystem.h
>
7
8
#include <
g4main/PHG4Reco.h
>
9
10
R__LOAD_LIBRARY
(libg4detectors.so)
11
12
namespace Enable
13
{
14
bool
PLUGDOOR
=
false
;
15
bool
PLUGDOOR_ABSORBER
=
false
;
16
bool
PLUGDOOR_OVERLAPCHECK
=
false
;
17
}
// namespace Enable
18
19
namespace
G4PLUGDOOR
20
{
21
// sPHENIX forward flux return(s)
22
// define via four corners in the engineering drawing
23
double
z_1
= 330.81;
24
double
z_2
= 360.81;
25
double
r_1
= 30;
26
double
r_2
= 263.5;
27
28
double
length
=
z_2
-
z_1
;
29
double
place_z
= (
z_1
+
z_2
) / 2.;
30
}
// namespace G4PLUGDOOR
31
32
void
PlugDoorInit
()
33
{
34
BlackHoleGeometry::max_radius
=
std::max
(
BlackHoleGeometry::max_radius
,
G4PLUGDOOR::r_2
);
35
BlackHoleGeometry::max_z
=
std::max
(
BlackHoleGeometry::max_z
,
G4PLUGDOOR::place_z
+
G4PLUGDOOR::length
/ 2.);
36
BlackHoleGeometry::min_z
=
std::min
(
BlackHoleGeometry::min_z
, -(
G4PLUGDOOR::place_z
+
G4PLUGDOOR::length
/ 2.));
37
}
38
void
PlugDoor
(
PHG4Reco
*g4Reco)
39
{
40
bool
OverlapCheck =
Enable::OVERLAPCHECK
||
Enable::PLUGDOOR_OVERLAPCHECK
;
41
const
bool
flux_door_active =
Enable::ABSORBER
||
Enable::PLUGDOOR_ABSORBER
;
42
43
const
string
material
(
"Steel_1006"
);
44
45
PHG4CylinderSubsystem
*flux_return_plus =
new
PHG4CylinderSubsystem
(
"FLUXRET_ETA_PLUS"
, 0);
46
flux_return_plus->
set_double_param
(
"length"
,
G4PLUGDOOR::length
);
47
flux_return_plus->
set_double_param
(
"radius"
,
G4PLUGDOOR::r_1
);
48
flux_return_plus->
set_double_param
(
"place_z"
,
G4PLUGDOOR::place_z
);
49
flux_return_plus->
set_double_param
(
"thickness"
,
G4PLUGDOOR::r_2
-
G4PLUGDOOR::r_1
);
50
flux_return_plus->
set_string_param
(
"material"
, material);
51
flux_return_plus->
SetActive
(flux_door_active);
52
// flux_return_plus->SuperDetector("FLUXRET_ETA_PLUS");
53
flux_return_plus->
OverlapCheck
(OverlapCheck);
54
g4Reco->
registerSubsystem
(flux_return_plus);
55
56
PHG4CylinderSubsystem
*flux_return_minus =
new
PHG4CylinderSubsystem
(
"FLUXRET_ETA_MINUS"
, 0);
57
flux_return_minus->
set_double_param
(
"length"
,
G4PLUGDOOR::length
);
58
flux_return_minus->
set_double_param
(
"radius"
,
G4PLUGDOOR::r_1
);
59
flux_return_minus->
set_double_param
(
"place_z"
, -
G4PLUGDOOR::place_z
);
60
flux_return_minus->
set_double_param
(
"thickness"
,
G4PLUGDOOR::r_2
-
G4PLUGDOOR::r_1
);
61
flux_return_minus->
set_string_param
(
"material"
, material);
62
flux_return_minus->
SetActive
(flux_door_active);
63
// flux_return_minus->SuperDetector("FLUXRET_ETA_MINUS");
64
flux_return_minus->
OverlapCheck
(OverlapCheck);
65
g4Reco->
registerSubsystem
(flux_return_minus);
66
67
return
;
68
}
69
#endif
macros
blob
master
common
G4_PlugDoor.C
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:58
using
1.8.2 with
ECCE GitHub integration