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  // Get closest cell in arbitrary plane (1 or 2)
60  virtual DetId getClosestCellInPlane( const GlobalPoint& r ,
61  int plane ) const;
62 
63 
64  void initializeParms() override;
65  unsigned int numberOfTransformParms() const override { return 3 ; }
66 
67  static std::string hitString() { return "EcalHitsES" ; }
68 
69  static std::string producerTag() { return "EcalPreshower" ; }
70 
71  static unsigned int numberOfAlignments() { return 8 ; }
72 
73  static unsigned int alignmentTransformIndexLocal( const DetId& id ) ;
74 
75  static unsigned int alignmentTransformIndexGlobal( const DetId& id ) ;
76 
77  static DetId detIdFromLocalAlignmentIndex( unsigned int iLoc ) ;
78 
79  static void localCorners( Pt3DVec& lc ,
80  const CCGFloat* pv ,
81  unsigned int i ,
82  Pt3D& ref ) ;
83 
84  void newCell( const GlobalPoint& f1 ,
85  const GlobalPoint& f2 ,
86  const GlobalPoint& f3 ,
87  const CCGFloat* parm ,
88  const DetId& detId ) override;
89 
90 
92  bool present( const DetId& id ) const override {
93  if(id==DetId(0)) return false;
94  // not needed???
95  auto index = CaloGenericDetId( id ).denseIndex();
96  return index < m_cellVec.size();
97  }
98 
99 protected:
100 
101  // Modify the RawPtr class
102  const CaloCellGeometry* getGeometryRawPtr (uint32_t index) const override;
103 
104 private:
105 
106  const CCGFloat m_xWidWaf ;
107  const CCGFloat m_xInterLadGap ;
108  const CCGFloat m_xIntraLadGap ;
109 
110  const CCGFloat m_yWidAct ;
111  const CCGFloat m_yCtrOff ;
112 
113  CCGFloat m_zplane[4];
114 
115  CellVec m_cellVec ;
116 };
117 
118 
119 #endif
120 
CaloCellGeometry::Pt3DVec Pt3DVec
static std::string hitString()
CaloCellGeometry::CCGFloat CCGFloat
CaloCellGeometry::Pt3D Pt3D
IdealGeometryRecord IdealRecord
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
const CaloCellGeometry * getGeometryRawPtr(uint32_t index) const override
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