EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4_DRich_JLeic.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4_DRich_JLeic.C
1 #ifndef MACRO_G4DRICHJLEIC
2 #define MACRO_G4DRICHJLEIC
3 
4 #include <GlobalVariables.C>
5 
7 #include <g4main/PHG4Reco.h>
8 
9 R__LOAD_LIBRARY(libg4detectors.so)
10 
11 namespace Enable
12 {
13  bool DRICH = false;
14 }
15 
16 namespace G4DRICH
17 {
18  double outer_radius = 150.;
19  double size_z = 170.;
20  double place_z = 400. / 2. + size_z / 2.;
21 } // namespace G4DRICH
22 
23 void DRichInit()
24 {
27 }
28 
29 void DRich(PHG4Reco* g4Reco)
30 {
31  double drich_inner_radius = 20.; // cm
32  PHG4CylinderSubsystem* cyl = new PHG4CylinderSubsystem("DRICH", 0);
33  cyl->set_color(1., 1., 0.2, 0.2);
34  cyl->set_double_param("radius", drich_inner_radius);
35  cyl->set_string_param("material", "G4_CARBON_DIOXIDE");
36  cyl->set_double_param("thickness", G4DRICH::outer_radius - drich_inner_radius);
37  cyl->set_double_param("length", G4DRICH::size_z);
38  cyl->set_double_param("place_z", G4DRICH::place_z);
39  cyl->SetActive();
40  cyl->SuperDetector("DRICH");
41  g4Reco->registerSubsystem(cyl);
42 }
43 
44 #endif // MACRO_G4DRICHJLEIC