File indexing completed on 2025-08-03 08:20:24
0001 #ifndef COMMON_G4EPD_C
0002 #define COMMON_G4EPD_C
0003
0004 #include <GlobalVariables.C>
0005
0006 #include <g4epd/PHG4EPDSubsystem.h>
0007 #include <g4epd/PHG4EPDModuleReco.h>
0008
0009 #include <g4main/PHG4Reco.h>
0010
0011 #include <fun4all/Fun4AllServer.h>
0012
0013 R__LOAD_LIBRARY(libg4epd.so)
0014
0015 namespace Enable
0016 {
0017 bool EPD = false;
0018 bool EPD_TILE = false;
0019 bool EPD_OVERLAPCHECK = false;
0020 }
0021
0022 namespace G4EPD
0023 {
0024 double dz = 6.;
0025 double place_z = 316.;
0026 }
0027
0028 void EPDInit()
0029 {
0030 BlackHoleGeometry::max_radius = std::max(BlackHoleGeometry::max_radius, 91.);
0031
0032 BlackHoleGeometry::min_z = std::min(BlackHoleGeometry::min_z, -G4EPD::place_z - G4EPD::dz/2. - no_overlapp);
0033 BlackHoleGeometry::max_z = std::max(BlackHoleGeometry::max_z, G4EPD::place_z + G4EPD::dz/2. + no_overlapp);
0034 }
0035
0036 void EPD(PHG4Reco* g4Reco)
0037 {
0038 bool overlap_check = Enable::OVERLAPCHECK || Enable::EPD_OVERLAPCHECK;
0039
0040 PHG4EPDSubsystem* epd = new PHG4EPDSubsystem("EPD");
0041
0042 epd->SuperDetector("EPD");
0043 epd->OverlapCheck(overlap_check);
0044 epd->SetActive();
0045
0046 g4Reco->registerSubsystem(epd);
0047 }
0048
0049 void EPD_Tiles()
0050 {
0051 Fun4AllServer *se = Fun4AllServer::instance();
0052 PHG4EPDModuleReco *TileBuilder = new PHG4EPDModuleReco("EPDTileBuilder");
0053 TileBuilder->Detector("EPD");
0054 TileBuilder->set_double_param("epdmpv",2.064e-6);
0055 se->registerSubsystem(TileBuilder);
0056 }
0057
0058 #endif