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_PlugDoor_fsPHENIX.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4_PlugDoor_fsPHENIX.C
1
#ifndef MACRO_G4PLUGDOORFSPHENIX_C
2
#define MACRO_G4PLUGDOORFSPHENIX_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
double
place_z
= 335.9;
22
double
length
= 10.2;
23
double
inner_radius
= 2.1;
24
double
thickness
= 258.5;
25
}
// namespace G4PLUGDOOR
26
27
void
PlugDoorInit
()
28
{
29
BlackHoleGeometry::max_radius
=
std::max
(
BlackHoleGeometry::max_radius
,
G4PLUGDOOR::inner_radius
+
G4PLUGDOOR::thickness
);
30
BlackHoleGeometry::max_z
=
std::max
(
BlackHoleGeometry::max_z
,
G4PLUGDOOR::place_z
+
G4PLUGDOOR::length
/ 2.);
31
BlackHoleGeometry::min_z
=
std::min
(
BlackHoleGeometry::min_z
, -(
G4PLUGDOOR::place_z
+
G4PLUGDOOR::length
/ 2.));
32
}
33
34
void
PlugDoor
(
PHG4Reco
*g4Reco)
35
{
36
//----------------------------------------
37
// fsPHENIX forward flux return(s)
38
bool
OverlapCheck =
Enable::OVERLAPCHECK
||
Enable::PLUGDOOR_OVERLAPCHECK
;
39
bool
flux_door_active =
Enable::ABSORBER
||
Enable::PLUGDOOR_ABSORBER
;
40
41
const
string
material
(
"Steel_1006"
);
42
43
PHG4CylinderSubsystem
*flux_return_plus =
new
PHG4CylinderSubsystem
(
"FWDFLUXRET"
, 0);
44
flux_return_plus->
set_double_param
(
"length"
,
G4PLUGDOOR::length
);
45
flux_return_plus->
set_double_param
(
"radius"
,
G4PLUGDOOR::inner_radius
);
46
flux_return_plus->
set_double_param
(
"place_z"
,
G4PLUGDOOR::place_z
);
47
flux_return_plus->
set_double_param
(
"thickness"
,
G4PLUGDOOR::thickness
);
48
flux_return_plus->
set_string_param
(
"material"
, material);
49
flux_return_plus->
SetActive
(flux_door_active);
50
flux_return_plus->
SuperDetector
(
"FLUXRET_ETA_PLUS"
);
51
flux_return_plus->
OverlapCheck
(OverlapCheck);
52
g4Reco->
registerSubsystem
(flux_return_plus);
53
54
PHG4CylinderSubsystem
*flux_return_minus =
new
PHG4CylinderSubsystem
(
"FWDFLUXRET"
, 0);
55
flux_return_minus->
set_double_param
(
"length"
,
G4PLUGDOOR::length
);
56
flux_return_minus->
set_double_param
(
"radius"
,
G4PLUGDOOR::inner_radius
);
57
flux_return_minus->
set_double_param
(
"place_z"
, -
G4PLUGDOOR::place_z
);
58
flux_return_minus->
set_double_param
(
"thickness"
,
G4PLUGDOOR::thickness
);
59
flux_return_minus->
set_string_param
(
"material"
, material);
60
flux_return_minus->
SetActive
(flux_door_active);
61
flux_return_minus->
SuperDetector
(
"FLUXRET_ETA_MINUS"
);
62
flux_return_minus->
OverlapCheck
(OverlapCheck);
63
g4Reco->
registerSubsystem
(flux_return_minus);
64
65
return
;
66
}
67
#endif
fun4all_eicmacros
blob
master
common
G4_PlugDoor_fsPHENIX.C
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:53
using
1.8.2 with
EIC GitHub integration