Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:08:05

0001 #ifndef Geometry_EcalTestBeam_EcalTBHodoscopeGeometry_HH
0002 #define Geometry_EcalTestBeam_EcalTBHodoscopeGeometry_HH
0003 
0004 #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
0005 #include "Geometry/CaloGeometry/interface/PreshowerStrip.h"
0006 
0007 #include <vector>
0008 
0009 class EcalTBHodoscopeGeometry : public CaloSubdetectorGeometry {
0010 public:
0011   typedef std::vector<PreshowerStrip> CellVec;
0012 
0013   typedef CaloCellGeometry::CCGFloat CCGFloat;
0014   typedef CaloCellGeometry::Pt3D Pt3D;
0015   typedef CaloCellGeometry::Pt3DVec Pt3DVec;
0016 
0017   EcalTBHodoscopeGeometry();
0018   ~EcalTBHodoscopeGeometry() override;
0019 
0020   void newCell(const GlobalPoint& f1,
0021                const GlobalPoint& f2,
0022                const GlobalPoint& f3,
0023                const CCGFloat* parm,
0024                const DetId& detId) override;
0025 
0026   static float getFibreLp(int plane, int fibre);
0027 
0028   static float getFibreRp(int plane, int fibre);
0029 
0030   static std::vector<int> getFiredFibresInPlane(float xtr, int plane);
0031 
0032   static int getNPlanes();
0033 
0034   static int getNFibres();
0035 
0036 protected:
0037   // Modify the RawPtr class
0038   const CaloCellGeometry* getGeometryRawPtr(uint32_t index) const override;
0039 
0040 private:
0041   struct fibre_pos {
0042     float lp, rp;
0043   };
0044 
0045   static const int nPlanes_ = 4;
0046   static const int nFibres_ = 64;
0047   static const fibre_pos fibrePos_[nPlanes_][nFibres_];
0048 
0049   CellVec m_cellVec;
0050 };
0051 
0052 #endif