00001 // 00002 // 00003 // 00004 // 00005 00006 00007 #ifndef BesMucEfficiency_h 00008 #define BesMucEfficiency_h 1 00009 00010 #include "GaudiKernel/IMessageSvc.h" 00011 #include "GaudiKernel/MsgStream.h" 00012 00013 #include "BesMucHit.hh" 00014 #include "BesMucDigit.hh" 00015 #include "G4VPhysicalVolume.hh" 00016 #include "G4LogicalVolume.hh" 00017 00018 #include "MucCalibConstSvc/IMucCalibConstSvc.h" 00019 #include "MucCalibConstSvc/MucCalibConstSvc.h" 00020 00021 #define part_Max (3) 00022 //#define segOnPart[3] ({4,8,4}) 00023 //#define gapOnPart[3] ({8,9,8}) 00024 #define seg_Max (8) 00025 #define gap_Max (9) 00026 #define strip_Max (96) 00027 #define pad_Max (100) 00028 00029 using namespace std; 00030 00031 class BesMucEfficiency 00032 { 00033 public: 00034 BesMucEfficiency(); 00035 ~BesMucEfficiency(); 00036 00037 void Initialize(G4String filename); 00038 00039 void CheckCalibSvc(); 00040 void SetHit(BesMucHit* hit); 00041 void GetPosLengthWidth(G4VPhysicalVolume* pvStrip); 00042 00043 G4int GetPad(); 00044 G4double GetEfficiency(); 00045 static BesMucEfficiency * Instance(void); 00046 00047 public: 00048 IMessageSvc* msgSvc; 00049 00050 private: 00051 BesMucHit* m_pHit; 00052 G4double m_Pos_Hit; 00053 G4double m_Pos_Strip; 00054 G4double m_Length; 00055 G4double m_Width; 00056 G4int m_Strip; 00057 G4double m_effi[part_Max][seg_Max][gap_Max][strip_Max][pad_Max]; 00058 static BesMucEfficiency * fPointer; 00059 G4double IsAddEffi; 00060 00061 IMucCalibConstSvc* m_ptrCalibSvc; // pointer of calibration constants service 00062 }; 00063 00064 #endif