Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4_EPD.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4_EPD.C
1 #ifndef COMMON_G4EPD_C
2 #define COMMON_G4EPD_C
3 
4 #include <GlobalVariables.C>
5 
8 
9 #include <g4main/PHG4Reco.h>
10 
11 #include <fun4all/Fun4AllServer.h>
12 
13 R__LOAD_LIBRARY(libg4epd.so)
14 
15 namespace Enable
16 {
17  bool EPD = false;
18  bool EPD_TILE = false;
19  bool EPD_OVERLAPCHECK = false;
20 } // namespace Enable
21 
22 namespace G4EPD
23 {
24  double dz = 6.;
25  double place_z = 316.;
26 }
27 
28 void EPDInit()
29 {
31  // using default z-position and add 10 cm for tile thickness
34 }
35 
36 void EPD(PHG4Reco* g4Reco)
37 {
38  bool overlap_check = Enable::OVERLAPCHECK || Enable::EPD_OVERLAPCHECK;
39 
40  PHG4EPDSubsystem* epd = new PHG4EPDSubsystem("EPD");
41 
42  epd->SuperDetector("EPD");
43  epd->OverlapCheck(overlap_check);
44  epd->SetActive();
45 
46  g4Reco->registerSubsystem(epd);
47 }
48 
49 void EPD_Tiles()
50 {
52  PHG4EPDModuleReco *TileBuilder = new PHG4EPDModuleReco("EPDTileBuilder");
53  TileBuilder->Detector("EPD");
54  TileBuilder->set_double_param("epdmpv",2.064e-6);
55  se->registerSubsystem(TileBuilder);
56 }
57 
58 #endif /* COMMON_G4EPD_C */