Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:12:53

0001 // $Id: G4_DIRC.C,v 1.3 2013/10/09 01:08:17 jinhuang Exp $
0002 
0003 /*!
0004  * \file G4_DIRC.C
0005  * \brief Macro setting up the barrel DIRC
0006  * \author Jin Huang <jhuang@bnl.gov>
0007  * \version $Revision: 1.3 $
0008  * \date $Date: 2013/10/09 01:08:17 $
0009  */
0010 
0011 #include <cmath>
0012 
0013 void
0014 DIRCInit()
0015 {
0016 
0017 }
0018 
0019 //! Babar DIRC (Without most of support structure)
0020 //! Ref: I. Adam et al. The DIRC particle identification system for the BaBar experiment.
0021 //! Nucl. Instrum. Meth., A538:281-357, 2005. doi:10.1016/j.nima.2004.08.129.
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   //  The cylinder skins provide most of the strength
0050   //  and stiffness of the CST. The thickness of the inner
0051   //  and outer skins is 1.27 and 0.76 mm, respectively
0052 
0053   // Inner skin:
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   // Outer skin:
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   // Done
0086   return 89.25;
0087 
0088 }