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  unsigned int numberOfShapes() const override { return k_NumberOfShapes ; }
44  unsigned int numberOfParametersPerShape() const override { return k_NumberOfParametersPerShape ; }
45 
47 
49  ~EcalPreshowerGeometry() override;
50 
51  void setzPlanes( CCGFloat z1minus,
52  CCGFloat z2minus,
53  CCGFloat z1plus,
54  CCGFloat z2plus ) ;
55 
56  // Get closest cell
57  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  void initializeParms() override;
66  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  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
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.
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()
unsigned int numberOfParametersPerShape() const override
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()
unsigned int numberOfTransformParms() const override
Definition: DetId.h:18
DetId getClosestCell(const GlobalPoint &r) const override
std::vector< PreshowerStrip > CellVec
CaloCellGeometry::ParVecVec ParVecVec
HepGeom::Point3D< CCGFloat > Pt3D
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)
~EcalPreshowerGeometry() override
The EcalPreshowerGeometry will delete all its cell geometries at destruction time.
bool present(const DetId &id) const override
is this detid present in the geometry?
EcalPreshowerGeometryRecord AlignedRecord
unsigned int numberOfShapes() const override
static unsigned int alignmentTransformIndexGlobal(const DetId &id)
CaloSubdetectorGeometry::ParVec ParVec