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_CTD_JLeic.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4_CTD_JLeic.C
1
#ifndef MACRO_G4CTD_JLEIC
2
#define MACRO_G4CTD_JLEIC
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
CTD
=
false
;
14
}
15
16
namespace
G4CTD
17
{
18
double
outer_radius
= 80.;
19
double
size_z
= 340.;
20
}
// namespace G4CTD
21
22
void
CTDInit
()
23
{
24
BlackHoleGeometry::max_radius
=
std::max
(
BlackHoleGeometry::max_radius
,
G4CTD::outer_radius
);
25
BlackHoleGeometry::max_z
=
std::max
(
BlackHoleGeometry::max_z
,
G4CTD::size_z
/ 2.);
26
BlackHoleGeometry::min_z
=
std::min
(
BlackHoleGeometry::min_z
, -
G4CTD::size_z
/ 2.);
27
}
28
29
double
CTD
(
PHG4Reco
* g4Reco,
30
double
radius
)
31
{
32
// here is our silicon:
33
double
shift_z = 0;
// shift z from GlobalVariables.C
34
double
inner_radius
= 21.;
// cm
35
double
si_layer_gap = 5.;
36
double
si_thickness = 0.001;
// cm
37
if
(radius > inner_radius)
38
{
39
cout <<
"inconsistency: radius: "
<< radius
40
<<
" larger than CTD inner radius: "
<< inner_radius << endl;
41
gSystem->Exit(-1);
42
}
43
44
PHG4CylinderSubsystem
* cyl;
45
for
(
int
ilayer = 0; ilayer < 15; ilayer++)
46
{
47
radius = inner_radius + ilayer * si_layer_gap;
48
if
(radius + si_thickness >
G4CTD::outer_radius
)
49
{
50
continue
;
51
}
52
cyl =
new
PHG4CylinderSubsystem
(
"JLCTD"
, ilayer);
53
cyl->
set_color
(0.1, 0, 1., 0.1);
54
cyl->
set_double_param
(
"radius"
, radius);
55
cyl->
set_string_param
(
"material"
,
"G4_Si"
);
56
cyl->
set_double_param
(
"thickness"
, si_thickness);
57
cyl->
set_double_param
(
"place_z"
, shift_z);
58
cyl->
SetActive
();
59
cyl->
SuperDetector
(
"JLCTD"
);
60
cyl->
set_double_param
(
"length"
,
G4CTD::size_z
);
61
g4Reco->
registerSubsystem
(cyl);
62
}
63
radius += si_thickness +
no_overlapp
;
64
return
G4CTD::outer_radius
;
65
}
66
67
#endif // MACRO_G4CTD_JLEIC
fun4all_eicmacros
blob
master
common
G4_CTD_JLeic.C
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:53
using
1.8.2 with
EIC GitHub integration