File indexing completed on 2025-08-06 08:12:53
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include <cmath>
0012
0013 void
0014 DIRCInit()
0015 {
0016
0017 }
0018
0019
0020
0021
0022 double
0023 DIRCSetup(PHG4Reco* g4Reco)
0024 {
0025 const double radiator_R = 83.65;
0026 const double length = 470;
0027 const double z_shift = -115;
0028 const double z_start = z_shift + length / 2.;
0029 const double z_end = z_shift - length / 2.;
0030
0031 PHG4SectorSubsystem *dirc;
0032 dirc = new PHG4SectorSubsystem("DIRC");
0033 dirc->get_geometry().set_normal_polar_angle(3.14159265358979323846/2);
0034 dirc->get_geometry().set_normal_start(
0035 83.65 * PHG4Sector::Sector_Geometry::Unit_cm());
0036 dirc->get_geometry().set_min_polar_angle(atan2(radiator_R, z_start));
0037 dirc->get_geometry().set_max_polar_angle(atan2(radiator_R, z_end));
0038 dirc->get_geometry().set_min_polar_edge(PHG4Sector::Sector_Geometry::FlatEdge());
0039 dirc->get_geometry().set_max_polar_edge(PHG4Sector::Sector_Geometry::FlatEdge());
0040 dirc->get_geometry().set_material("Quartz");
0041 dirc->get_geometry().set_N_Sector(12);
0042 dirc->OverlapCheck(overlapcheck);
0043 dirc->get_geometry().AddLayer("Radiator", "Quartz",
0044 1.7 * PHG4Sector::Sector_Geometry::Unit_cm(), true);
0045 g4Reco->registerSubsystem(dirc);
0046
0047 PHG4CylinderSubsystem *cyl;
0048
0049
0050
0051
0052
0053
0054 cyl = new PHG4CylinderSubsystem("DIRC_CST_Inner_Skin", 10);
0055 cyl->set_double_param("radius",81.71);
0056 cyl->set_int_param("lengthviarapidity",0);
0057 cyl->set_double_param("length",length);
0058 cyl->set_string_param("material","G4_Al");
0059 cyl->set_double_param("thickness",0.127);
0060 cyl->set_double_param("place_x",0.);
0061 cyl->set_double_param("place_y",0.);
0062 cyl->set_double_param("place_z",z_shift);
0063 cyl->SetActive(0);
0064 cyl->SuperDetector("DIRC");
0065 cyl->OverlapCheck(overlapcheck);
0066
0067 g4Reco->registerSubsystem(cyl);
0068
0069
0070 cyl = new PHG4CylinderSubsystem("DIRC_CST_Outer_Skin", 11);
0071 cyl->set_double_param("radius",89.25 - 0.076);
0072 cyl->set_int_param("lengthviarapidity",0);
0073 cyl->set_double_param("length",length);
0074 cyl->set_string_param("material","G4_Al");
0075 cyl->set_double_param("thickness",0.076);
0076 cyl->set_double_param("place_x",0.);
0077 cyl->set_double_param("place_y",0.);
0078 cyl->set_double_param("place_z",z_shift);
0079 cyl->SetActive(0);
0080 cyl->SuperDetector("DIRC");
0081 cyl->OverlapCheck(overlapcheck);
0082
0083 g4Reco->registerSubsystem(cyl);
0084
0085
0086 return 89.25;
0087
0088 }