CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 { return k_NumberOfShapes ; }
44  virtual unsigned int numberOfParametersPerShape() const { 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 ;
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() ;
66  virtual unsigned int numberOfTransformParms() const { 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 ) ;
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 
113 
116 
118 
120 };
121 
122 
123 #endif
124 
virtual unsigned int numberOfShapes() const
int i
Definition: DBlmapReader.cc:9
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)
virtual DetId getClosestCell(const GlobalPoint &r) const
std::vector< Pt3D > Pt3DVec
EcalPreshowerNumberingScheme NumberingScheme
static std::string producerTag()
virtual unsigned int numberOfParametersPerShape() const
static DetId detIdFromLocalAlignmentIndex(unsigned int iLoc)
virtual void newCell(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)
CaloCellGeometry::CCGFloat CCGFloat
virtual DetId getClosestCellInPlane(const GlobalPoint &r, int plane) const
bool present(const DetId &id) const override
is this detid present in the geometry?
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.
CaloCellGeometry::Pt3D Pt3D
Definition: DetId.h:18
std::vector< PreshowerStrip > CellVec
CaloCellGeometry::ParVecVec ParVecVec
CaloCellGeometry::Pt3DVec Pt3DVec
HepGeom::Point3D< CCGFloat > Pt3D
static void localCorners(Pt3DVec &lc, const CCGFloat *pv, unsigned int i, Pt3D &ref)
EcalPreshowerGeometryRecord AlignedRecord
static unsigned int alignmentTransformIndexGlobal(const DetId &id)
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 numberOfTransformParms() const
CaloSubdetectorGeometry::ParVec ParVec