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_DIRC_SMALL.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4_DIRC_SMALL.C
1
#ifndef MACRO_G4DIRC_SMALL_C
2
#define MACRO_G4DIRC_SMALL_C
3
4
#include <GlobalVariables.C>
5
6
#include <
g4detectors/PHG4CylinderSubsystem.h
>
7
#include <
g4detectors/PHG4SectorSubsystem.h
>
8
9
#include <
g4main/PHG4Reco.h
>
10
11
#include <cmath>
12
13
R__LOAD_LIBRARY
(libg4detectors.so)
14
15
23
namespace Enable
24
{
25
bool
DIRC_SMALL
=
false
;
26
bool
DIRC_SMALL_OVERLAPCHECK
=
false
;
27
}
// namespace Enable
28
29
namespace
G4DIRC_SMALL
30
{
31
double
radiator_R
= 49.90;
32
double
length
= 400;
33
double
z_shift
= -75;
//115
34
double
z_start
=
z_shift
+
length
/ 2.;
35
double
z_end
=
z_shift
-
length
/ 2.;
36
double
outer_skin_radius
= 58;
37
}
// namespace G4DIRC_SMALL
38
39
void
DIRCInit
()
40
{
41
BlackHoleGeometry::max_radius
=
std::max
(
BlackHoleGeometry::max_radius
,
G4DIRC_SMALL::outer_skin_radius
);
42
BlackHoleGeometry::max_z
=
std::max
(
BlackHoleGeometry::max_z
,
G4DIRC_SMALL::z_start
);
43
BlackHoleGeometry::min_z
=
std::min
(
BlackHoleGeometry::min_z
,
G4DIRC_SMALL::z_end
);
44
}
45
49
double
DIRCSetup
(
PHG4Reco
*g4Reco)
50
{
51
bool
OverlapCheck =
Enable::OVERLAPCHECK
||
Enable::DIRC_SMALL_OVERLAPCHECK
;
52
53
PHG4SectorSubsystem
*dirc;
54
dirc =
new
PHG4SectorSubsystem
(
"DIRC_SMALL"
);
55
dirc->
get_geometry
().
set_normal_polar_angle
(
M_PI
/ 2);
56
dirc->
get_geometry
().
set_normal_start
(49.90 *
PHG4Sector::Sector_Geometry::Unit_cm
());
57
dirc->
get_geometry
().
set_min_polar_angle
(atan2(
G4DIRC_SMALL::radiator_R
,
G4DIRC_SMALL::z_start
));
58
dirc->
get_geometry
().
set_max_polar_angle
(atan2(
G4DIRC_SMALL::radiator_R
,
G4DIRC_SMALL::z_end
));
59
dirc->
get_geometry
().
set_min_polar_edge
(
PHG4Sector::Sector_Geometry::FlatEdge
());
60
dirc->
get_geometry
().
set_max_polar_edge
(
PHG4Sector::Sector_Geometry::FlatEdge
());
61
dirc->
get_geometry
().
set_material
(
"Quartz"
);
62
dirc->
get_geometry
().
set_N_Sector
(7);
63
dirc->
OverlapCheck
(OverlapCheck);
64
dirc->
get_geometry
().
AddLayer
(
"Radiator"
,
"Quartz"
, 1.7 *
PHG4Sector::Sector_Geometry::Unit_cm
(),
true
);
65
g4Reco->
registerSubsystem
(dirc);
66
67
PHG4CylinderSubsystem
*cyl;
68
69
// The cylinder skins provide most of the strength
70
// and stiffness of the CST. The thickness of the inner
71
// and outer skins is 1.27 and 0.76 mm, respectively
72
73
// Inner skin:
74
cyl =
new
PHG4CylinderSubsystem
(
"DIRC_SMALL_CST_Inner_Skin"
, 10);
75
cyl->
set_double_param
(
"radius"
, 47.96);
76
cyl->
set_double_param
(
"length"
,
G4DIRC_SMALL::length
);
77
cyl->
set_string_param
(
"material"
,
"G4_Al"
);
78
cyl->
set_double_param
(
"thickness"
, 0.127);
79
cyl->
set_double_param
(
"place_x"
, 0.);
80
cyl->
set_double_param
(
"place_y"
, 0.);
81
cyl->
set_double_param
(
"place_z"
,
G4DIRC_SMALL::z_shift
);
82
cyl->
SetActive
(0);
83
cyl->
SuperDetector
(
"DIRC_SMALL"
);
84
cyl->
OverlapCheck
(OverlapCheck);
85
86
g4Reco->
registerSubsystem
(cyl);
87
88
// Outer skin:
89
cyl =
new
PHG4CylinderSubsystem
(
"DIRC_SMALL_CST_Outer_Skin"
, 11);
90
cyl->
set_double_param
(
"radius"
,
G4DIRC_SMALL::outer_skin_radius
- 0.076);
91
cyl->
set_double_param
(
"length"
,
G4DIRC_SMALL::length
);
92
cyl->
set_string_param
(
"material"
,
"G4_Al"
);
93
cyl->
set_double_param
(
"thickness"
, 0.076);
94
cyl->
set_double_param
(
"place_x"
, 0.);
95
cyl->
set_double_param
(
"place_y"
, 0.);
96
cyl->
set_double_param
(
"place_z"
,
G4DIRC_SMALL::z_shift
);
97
cyl->
SetActive
(0);
98
cyl->
SuperDetector
(
"DIRC_SMALL"
);
99
cyl->
OverlapCheck
(OverlapCheck);
100
101
g4Reco->
registerSubsystem
(cyl);
102
103
// Done
104
return
G4DIRC_SMALL::outer_skin_radius
;
105
}
106
#endif
g4lblvtx
blob
master
macros
auxiliary_studies
simplified_geometry
G4_DIRC_SMALL.C
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:55
using
1.8.2 with
EIC GitHub integration