Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
G4_CEmc_Albedo.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4_CEmc_Albedo.C
1
#ifndef MACRO_G4CEMCALBEDO_C
2
#define MACRO_G4CEMCALBEDO_C
3
4
#include <
GlobalVariables.C
>
5
6
#include <
g4detectors/PHG4CylinderSubsystem.h
>
7
8
#include <
g4main/PHG4Reco.h
>
9
10
namespace
Enable
11
{
12
bool
CEMCALBEDO
=
false
;
13
bool
CEMCALBEDO_ABSORBER
=
false
;
14
}
// namespace Enable
15
16
namespace
G4CEMCALBEDO
17
{
18
double
teflon_cylinder_thickness
= 1.5;
19
double
inner_radius
= 95. -
teflon_cylinder_thickness
;
// inner radius emc, 1.5cm electronics subtracted
20
double
albedo_thickness
= 2.;
21
}
// namespace G4CEMCALBEDO
22
23
void
CEmcAlbedoInit
()
24
{
25
BlackHoleGeometry::max_z
= std::max(
BlackHoleGeometry::max_z
, 149.47);
26
BlackHoleGeometry::min_z
=
std::min
(
BlackHoleGeometry::min_z
, -149.47);
27
BlackHoleGeometry::max_radius
= std::max(
BlackHoleGeometry::max_radius
,
G4CEMCALBEDO::inner_radius
+
G4CEMCALBEDO::teflon_cylinder_thickness
+
G4CEMCALBEDO::albedo_thickness
);
28
}
29
30
void
CEmcAlbedo
(
PHG4Reco
*g4Reco)
31
{
32
bool
AbsorberActive =
Enable::ABSORBER
||
Enable::CEMCALBEDO_ABSORBER
;
33
PHG4CylinderSubsystem
*cyl =
new
PHG4CylinderSubsystem
(
"CEMC_ELECTRONICS"
, 0);
34
cyl->
SuperDetector
(
"CEMC_MOCKUP"
);
35
cyl->
set_double_param
(
"radius"
,
G4CEMCALBEDO::inner_radius
);
36
cyl->
set_string_param
(
"material"
,
"G4_TEFLON"
);
37
cyl->
set_double_param
(
"thickness"
,
G4CEMCALBEDO::teflon_cylinder_thickness
);
38
if
(AbsorberActive) cyl->
SetActive
();
39
g4Reco->
registerSubsystem
(cyl);
40
cyl =
new
PHG4CylinderSubsystem
(
"CEMC_ALBEDO"
, 1);
41
cyl->
SuperDetector
(
"CEMC_MOCKUP"
);
42
cyl->
set_double_param
(
"radius"
,
G4CEMCALBEDO::inner_radius
+
G4CEMCALBEDO::teflon_cylinder_thickness
);
43
cyl->
set_string_param
(
"material"
,
"Spacal_W_Epoxy"
);
44
cyl->
set_double_param
(
"thickness"
,
G4CEMCALBEDO::albedo_thickness
);
45
if
(AbsorberActive) cyl->
SetActive
();
46
g4Reco->
registerSubsystem
(cyl);
47
}
48
#endif
macros
blob
master
common
G4_CEmc_Albedo.C
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:26
using
1.8.2 with
sPHENIX GitHub integration