ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4_mRICH.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4_mRICH.C
1 #pragma once
2 
3 #include "GlobalVariables.C"
4 
5 #include <g4main/PHG4Reco.h>
6 
9 #include <eccefastpidreco/ECCEFastPIDReco.h>
10 #include <eccefastpidreco/ECCEmRICHFastPIDMap.h>
18 R__LOAD_LIBRARY(libECCEFastPIDReco.so)
19 
20 namespace Enable
21 {
22  bool mRICH = false;
23  bool mRICH_RECO = false;
24  bool mRICH_OVERLAPCHECK = false;
25  int mRICH_VERBOSITY = 0;
26 } // namespace Enable
27 
28 void mRICHInit()
29 {
30 }
31 
32 //-1: single module
33 // 0: build h-side sectors and e-side wall
34 // 1: build h-side sectors
35 // 2: build e-side wall
36 // 3: build h-side wall
37 // 4: build h-side wall and e-side wall
38 // 5: build b-side sectors
39 // 6: build projected e-side wall
40 
41 void mRICHSetup(PHG4Reco *g4Reco, const int detectorSetup = 1, //1: full setup; 0:skeleton
42  const int mRICHsystemSetup = 6 //5//2//-1//
43 )
44 {
45  bool OverlapCheck = Enable::OVERLAPCHECK || Enable::mRICH_OVERLAPCHECK;
46 
47  PHG4mRICHSubsystem *mRICH = new PHG4mRICHSubsystem("mRICH", 1);
48  mRICH->set_int_param("detectorSetup", detectorSetup);
49  mRICH->set_int_param("subsystemSetup", mRICHsystemSetup);
51  mRICH->SetCalibrationFileDir(string(getenv("CALIBRATIONROOT")) + string("/mRICH/GeometryV2/"));
52  mRICH->OverlapCheck(OverlapCheck);
53  // mRICH->Verbosity(5);
54 
55  g4Reco->registerSubsystem(mRICH);
56 
58  {
59  // project to an reference plane at z=170 cm
60  TRACKING::FastKalmanFilter-> add_zplane_state("mRICH", -125);
61  TRACKING::ProjectionNames.insert("mRICH");
62  }
63 }
64 
65 
66 void mRICHReco(int verbosity = 0)
67 {
68  verbosity = std::max(Enable::VERBOSITY, verbosity);
69  verbosity = std::max(Enable::mRICH_VERBOSITY, verbosity);
70 
72 
74  pidmap->Verbosity(verbosity);
75 
76  ECCEFastPIDReco * reco = new ECCEFastPIDReco(pidmap, EICPIDDefs::mRICH, "ECCEFastPIDReco-mRICH");
77  reco->Verbosity(verbosity);
78 
79  se->registerSubsystem(reco);
80 }
81 
82 void mRICH_Eval(std::string outputfile, int verbosity = 0)
83 {
84  gSystem->Load("libfun4all.so");
85  gSystem->Load("libg4eval.so");
87 
88  return;
89 }