Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4_DIRC.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4_DIRC.C
1 // $Id: G4_DIRC.C,v 1.3 2013/10/09 01:08:17 jinhuang Exp $
2 
11 #include <cmath>
12 
13 void
15 {
16 
17 }
18 
22 double
24 {
25  const double radiator_R = 83.65;
26  const double length = 470;
27  const double z_shift = -115;
28  const double z_start = z_shift + length / 2.;
29  const double z_end = z_shift - length / 2.;
30 
31  PHG4SectorSubsystem *dirc;
32  dirc = new PHG4SectorSubsystem("DIRC");
33  dirc->get_geometry().set_normal_polar_angle(3.14159265358979323846/2);
36  dirc->get_geometry().set_min_polar_angle(atan2(radiator_R, z_start));
37  dirc->get_geometry().set_max_polar_angle(atan2(radiator_R, z_end));
40  dirc->get_geometry().set_material("Quartz");
41  dirc->get_geometry().set_N_Sector(12);
43  dirc->get_geometry().AddLayer("Radiator", "Quartz",
45  g4Reco->registerSubsystem(dirc);
46 
48 
49  // The cylinder skins provide most of the strength
50  // and stiffness of the CST. The thickness of the inner
51  // and outer skins is 1.27 and 0.76 mm, respectively
52 
53  // Inner skin:
54  cyl = new PHG4CylinderSubsystem("DIRC_CST_Inner_Skin", 10);
55  cyl->set_double_param("radius",81.71);
56  cyl->set_int_param("lengthviarapidity",0);
57  cyl->set_double_param("length",length);
58  cyl->set_string_param("material","G4_Al");
59  cyl->set_double_param("thickness",0.127);
60  cyl->set_double_param("place_x",0.);
61  cyl->set_double_param("place_y",0.);
62  cyl->set_double_param("place_z",z_shift);
63  cyl->SetActive(0);
64  cyl->SuperDetector("DIRC");
66 
67  g4Reco->registerSubsystem(cyl);
68 
69  // Outer skin:
70  cyl = new PHG4CylinderSubsystem("DIRC_CST_Outer_Skin", 11);
71  cyl->set_double_param("radius",89.25 - 0.076);
72  cyl->set_int_param("lengthviarapidity",0);
73  cyl->set_double_param("length",length);
74  cyl->set_string_param("material","G4_Al");
75  cyl->set_double_param("thickness",0.076);
76  cyl->set_double_param("place_x",0.);
77  cyl->set_double_param("place_y",0.);
78  cyl->set_double_param("place_z",z_shift);
79  cyl->SetActive(0);
80  cyl->SuperDetector("DIRC");
82 
83  g4Reco->registerSubsystem(cyl);
84 
85  // Done
86  return 89.25;
87 
88 }