er  dev
ERNDSetup.h
1 // -------------------------------------------------------------------------
2 
3 // ----- ERNDSetup header file -----
4 
5 // ----- V.Schetinin (sch_vitaliy@mail.ru) -----
6 
7 // -------------------------------------------------------------------------
8 
9 #ifndef ERNDSETUP_H
10 #define ERNDSETUP_H
11 
12 #include <unordered_map>
13 
14 #include "Rtypes.h"
15 #include "TVector3.h"
16 #include "TGeoNode.h"
17 
18 class ERNDSetup {
19  static ERNDSetup* fInstance;
20  static TGeoNode* fNDnode;
21  ERNDSetup();
22 public:
23  static ERNDSetup* Instance();
24  ClassDef(ERNDSetup,1)
25  void PMTPos(TVector3 pos, TVector3& pmtPos);
26  TVector3 Pos(Int_t channel);
27  void ReadGeoParamsFromParContainer();
28 protected:
29  std::unordered_map<Int_t, const TGeoNode*> fChannel2Node;
30  bool fInited = false;
31 };
32 
33 #endif
34