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 public:
17  typedef std::vector<PreshowerStrip> CellVec;
18 
22 
27 
31  typedef ESDetId DetIdType;
32 
34 
35  enum { k_NumberOfShapes = 4 };
36 
38 
39  static std::string dbString() { return "PEcalPreshowerRcd"; }
40 
41  unsigned int numberOfShapes() const override { return k_NumberOfShapes; }
42  unsigned int numberOfParametersPerShape() const override { return k_NumberOfParametersPerShape; }
43 
45 
47  ~EcalPreshowerGeometry() override;
48 
49  void setzPlanes(CCGFloat z1minus, CCGFloat z2minus, CCGFloat z1plus, CCGFloat z2plus);
50 
51  // Get closest cell
52  DetId getClosestCell(const GlobalPoint& r) const override;
53 
54  // Get closest cell in arbitrary plane (1 or 2)
55  virtual DetId getClosestCellInPlane(const GlobalPoint& r, int plane) const;
56 
57  void initializeParms() override;
58  unsigned int numberOfTransformParms() const override { return 3; }
59 
60  static std::string hitString() { return "EcalHitsES"; }
61 
62  static std::string producerTag() { return "EcalPreshower"; }
63 
64  static unsigned int numberOfAlignments() { return 8; }
65 
66  static unsigned int alignmentTransformIndexLocal(const DetId& id);
67 
68  static unsigned int alignmentTransformIndexGlobal(const DetId& id);
69 
70  static DetId detIdFromLocalAlignmentIndex(unsigned int iLoc);
71 
72  static void localCorners(Pt3DVec& lc, const CCGFloat* pv, unsigned int i, Pt3D& ref);
73 
74  void newCell(const GlobalPoint& f1,
75  const GlobalPoint& f2,
76  const GlobalPoint& f3,
77  const CCGFloat* parm,
78  const DetId& detId) override;
79 
81  bool present(const DetId& id) const override {
82  if (id == DetId(0))
83  return false;
84  // not needed???
85  auto index = CaloGenericDetId(id).denseIndex();
86  return index < m_cellVec.size();
87  }
88 
89 protected:
90  // Modify the RawPtr class
91  const CaloCellGeometry* getGeometryRawPtr(uint32_t index) const override;
92 
93 private:
97 
100 
102 
104 };
105 
106 #endif
DetId getClosestCell(const GlobalPoint &r) const override
CaloCellGeometry::Pt3DVec Pt3DVec
static std::string hitString()
CaloCellGeometry::CCGFloat CCGFloat
CaloCellGeometry::Pt3D Pt3D
IdealGeometryRecord IdealRecord
const CaloCellGeometry * getGeometryRawPtr(uint32_t index) const override
unsigned int numberOfShapes() const override
static std::string dbString()
uint32_t denseIndex() const
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)
unsigned int numberOfParametersPerShape() const override
def pv(vc)
Definition: MetAnalyzer.py:7
CaloCellGeometry::CCGFloat CCGFloat
bool present(const DetId &id) const override
is this detid present in the geometry?
static unsigned int alignmentTransformIndexLocal(const DetId &id)
CaloSubdetectorGeometry::ParVecVec ParVecVec
static unsigned int numberOfAlignments()
CaloCellGeometry::Pt3D Pt3D
Definition: DetId.h:17
std::vector< PreshowerStrip > CellVec
CaloCellGeometry::ParVecVec ParVecVec
CaloCellGeometry::Pt3DVec Pt3DVec
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)
unsigned int numberOfTransformParms() const override
~EcalPreshowerGeometry() override
The EcalPreshowerGeometry will delete all its cell geometries at destruction time.
virtual DetId getClosestCellInPlane(const GlobalPoint &r, int plane) const
EcalPreshowerGeometryRecord AlignedRecord
static unsigned int alignmentTransformIndexGlobal(const DetId &id)
CaloSubdetectorGeometry::ParVec ParVec