EIC Software
 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 
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;
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 {
44 }
45 
49 double DIRCSetup(PHG4Reco *g4Reco)
50 {
52 
53  PHG4SectorSubsystem *dirc;
54  dirc = new PHG4SectorSubsystem("DIRC_SMALL");
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 
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
105 }
106 #endif