![]() |
![]() |
00001 #ifndef Geometry_EcalTestBeam_EcalTBHodoscopeGeometry_HH 00002 #define Geometry_EcalTestBeam_EcalTBHodoscopeGeometry_HH 00003 00004 #include <vector> 00005 00006 class EcalTBHodoscopeGeometry { 00007 00008 public: 00009 00010 EcalTBHodoscopeGeometry() {}; 00011 ~EcalTBHodoscopeGeometry(){}; 00012 00013 float getFibreLp(const int& plane, const int& fibre) const 00014 { 00015 if (plane < nPlanes_ && fibre < nFibres_ ) 00016 return fibrePos_[plane][fibre].lp; 00017 else 00018 return -99999.; 00019 } 00020 00021 float getFibreRp(const int& plane, const int& fibre) const 00022 { 00023 if (plane < nPlanes_ && fibre < nFibres_ ) 00024 return fibrePos_[plane][fibre].rp; 00025 else 00026 return -99999.; 00027 } 00028 00029 std::vector<int> getFiredFibresInPlane(const float& xtr, const int& plane) const; 00030 00031 int getNPlanes() const 00032 { 00033 return nPlanes_; 00034 } 00035 00036 int getNFibres() const 00037 { 00038 return nFibres_; 00039 } 00040 00041 private: 00042 00043 struct fibre_pos { 00044 float lp, rp; 00045 }; 00046 00047 static const int nPlanes_=4; 00048 static const int nFibres_=64; 00049 static const fibre_pos fibrePos_[nPlanes_][nFibres_]; 00050 00051 }; 00052 00053 #endif