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 <g4rich/PHG4mRICHSubsystem.h>
17 namespace Enable
18 {
19  bool mRICH = false;
20  bool mRICH_OVERLAPCHECK = false;
21 } // namespace Enable
22 
23 void mRICHInit()
24 {
25 }
26 
27 //-1: single module
28 // 0: build h-side sectors and e-side wall
29 // 1: build h-side sectors
30 // 2: build e-side wall
31 // 3: build h-side wall
32 // 4: build h-side wall and e-side wall
33 // 5: build b-side sectors
34 // 6: build projected e-side wall
35 
36 void mRICHSetup(PHG4Reco *g4Reco, const int detectorSetup = 1, //1: full setup; 0:skeleton
37  const int mRICHsystemSetup = 6 //5//2//-1//
38 )
39 {
40  bool OverlapCheck = Enable::OVERLAPCHECK || Enable::mRICH_OVERLAPCHECK;
41 
42  PHG4mRICHSubsystem *mRICH = new PHG4mRICHSubsystem("mRICH", 1);
43  mRICH->set_int_param("detectorSetup", detectorSetup);
44  mRICH->set_int_param("subsystemSetup", mRICHsystemSetup);
46  mRICH->SetCalibrationFileDir(string(getenv("CALIBRATIONROOT")) + string("/mRICH/Geometry/"));
47  mRICH->OverlapCheck(OverlapCheck);
48  // mRICH->Verbosity(5);
49 
50  g4Reco->registerSubsystem(mRICH);
51 
52  /*if (TRACKING::FastKalmanFilter)
53  {
54  // project to an reference plane at z=170 cm
55  TRACKING::FastKalmanFilter-> add_zplane_state("mRICH", -170);
56  TRACKING::ProjectionNames.insert("mRICH");
57  }*/
58 }
59 
60 void mRICH_Eval(std::string outputfile, int verbosity = 0)
61 {
62  gSystem->Load("libfun4all.so");
63  gSystem->Load("libg4eval.so");
65 
66  return;
67 }