CMS 3D CMS Logo

EcalPreshowerGeometry.h
Go to the documentation of this file.
1 #ifndef EcalPreshowerGeometry_h
2 #define EcalPreshowerGeometry_h
3 
13 #include <vector>
14 
16 {
17  public:
18 
19  typedef std::vector<PreshowerStrip> CellVec ;
20 
24 
29 
33  typedef ESDetId DetIdType ;
34 
36 
37  enum { k_NumberOfShapes = 4 } ;
38 
40 
41  static std::string dbString() { return "PEcalPreshowerRcd" ; }
42 
43  virtual unsigned int numberOfShapes() const override { return k_NumberOfShapes ; }
44  virtual unsigned int numberOfParametersPerShape() const override { return k_NumberOfParametersPerShape ; }
45 
47 
49  virtual ~EcalPreshowerGeometry();
50 
51  void setzPlanes( CCGFloat z1minus,
52  CCGFloat z2minus,
53  CCGFloat z1plus,
54  CCGFloat z2plus ) ;
55 
56  // Get closest cell
57  virtual DetId getClosestCell( const GlobalPoint& r ) const override;
58 
59 
60  // Get closest cell in arbitrary plane (1 or 2)
61  virtual DetId getClosestCellInPlane( const GlobalPoint& r ,
62  int plane ) const ;
63 
64 
65  virtual void initializeParms() override;
66  virtual unsigned int numberOfTransformParms() const override { return 3 ; }
67 
68  static std::string hitString() { return "EcalHitsES" ; }
69 
70  static std::string producerTag() { return "EcalPreshower" ; }
71 
72  static unsigned int numberOfAlignments() { return 8 ; }
73 
74  static unsigned int alignmentTransformIndexLocal( const DetId& id ) ;
75 
76  static unsigned int alignmentTransformIndexGlobal( const DetId& id ) ;
77 
78  static DetId detIdFromLocalAlignmentIndex( unsigned int iLoc ) ;
79 
80  static void localCorners( Pt3DVec& lc ,
81  const CCGFloat* pv ,
82  unsigned int i ,
83  Pt3D& ref ) ;
84 
85  virtual void newCell( const GlobalPoint& f1 ,
86  const GlobalPoint& f2 ,
87  const GlobalPoint& f3 ,
88  const CCGFloat* parm ,
89  const DetId& detId ) override;
90 
91 
93  bool present( const DetId& id ) const override {
94  if(id==DetId(0)) return false;
95  // not needed???
96  auto index = CaloGenericDetId( id ).denseIndex();
97  return index < m_cellVec.size();
98  }
99 
101  // const CaloCellGeometry* getGeometry( const DetId& id ) const override;
102 
103 
104  protected:
105 
106  const CaloCellGeometry* cellGeomPtr( uint32_t index ) const override;
107 
108  private:
109 
110  const CCGFloat m_xWidWaf ;
111  const CCGFloat m_xInterLadGap ;
112  const CCGFloat m_xIntraLadGap ;
113 
114  const CCGFloat m_yWidAct ;
115  const CCGFloat m_yCtrOff ;
116 
117  CCGFloat m_zplane[4];
118 
119  CellVec m_cellVec ;
120 };
121 
122 
123 #endif
124 
CaloCellGeometry::Pt3DVec Pt3DVec
static std::string hitString()
CaloCellGeometry::CCGFloat CCGFloat
CaloCellGeometry::Pt3D Pt3D
virtual void initializeParms() override
IdealGeometryRecord IdealRecord
const CaloCellGeometry * cellGeomPtr(uint32_t index) const override
Get the cell geometry of a given detector id. Should return nulptr if not found.
virtual unsigned int numberOfShapes() const override
static std::string dbString()
PEcalPreshowerRcd PGeometryRecord
void setzPlanes(CCGFloat z1minus, CCGFloat z2minus, CCGFloat z1plus, CCGFloat z2plus)
std::vector< Pt3D > Pt3DVec
EcalPreshowerNumberingScheme NumberingScheme
static std::string producerTag()
static DetId detIdFromLocalAlignmentIndex(unsigned int iLoc)
def pv(vc)
Definition: MetAnalyzer.py:6
virtual DetId getClosestCellInPlane(const GlobalPoint &r, int plane) const
static unsigned int alignmentTransformIndexLocal(const DetId &id)
CaloSubdetectorGeometry::ParVecVec ParVecVec
uint32_t denseIndex() const
static unsigned int numberOfAlignments()
virtual ~EcalPreshowerGeometry()
The EcalPreshowerGeometry will delete all its cell geometries at destruction time.
Definition: DetId.h:18
virtual DetId getClosestCell(const GlobalPoint &r) const override
std::vector< PreshowerStrip > CellVec
CaloCellGeometry::ParVecVec ParVecVec
HepGeom::Point3D< CCGFloat > Pt3D
virtual void newCell(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId) override
static void localCorners(Pt3DVec &lc, const CCGFloat *pv, unsigned int i, Pt3D &ref)
virtual unsigned int numberOfParametersPerShape() const override
bool present(const DetId &id) const override
is this detid present in the geometry?
EcalPreshowerGeometryRecord AlignedRecord
virtual unsigned int numberOfTransformParms() const override
static unsigned int alignmentTransformIndexGlobal(const DetId &id)
CaloSubdetectorGeometry::ParVec ParVec