CMS 3D CMS Logo

EcalBarrelGeometry.h
Go to the documentation of this file.
1 #ifndef EcalBarrelGeometry_h
2 #define EcalBarrelGeometry_h
3 
16 #include <vector>
17 #include <atomic>
18 
20 public:
21  typedef std::vector<TruncatedPyramid> CellVec;
22 
26 
31 
32  typedef EZArrayFL<EEDetId> OrderedListOfEEDetId; // like an stl vector: begin(), end(), [i]
33 
34  typedef std::vector<OrderedListOfEEDetId*> VecOrdListEEDetIdPtr;
35 
37 
38  typedef EBDetId DetIdType;
39 
41 
42  static constexpr int k_NumberOfShapes = 17;
43 
45 
46  static std::string dbString() { return "PEcalBarrelRcd"; }
47 
48  unsigned int numberOfShapes() const override { return k_NumberOfShapes; }
49  unsigned int numberOfParametersPerShape() const override { return k_NumberOfParametersPerShape; }
50 
52 
53  ~EcalBarrelGeometry() override;
54 
55  int getNumXtalsPhiDirection() const { return _nnxtalPhi; }
56 
57  int getNumXtalsEtaDirection() const { return _nnxtalEta; }
58 
59  const std::vector<int>& getEtaBaskets() const { return _EtaBaskets; }
60 
61  int getBasketSizeInPhi() const { return _PhiBaskets; }
62 
63  void setNumXtalsPhiDirection(const int& nnxtalPhi) { _nnxtalPhi = nnxtalPhi; }
64 
65  void setNumXtalsEtaDirection(const int& nnxtalEta) { _nnxtalEta = nnxtalEta; }
66 
67  void setEtaBaskets(const std::vector<int>& EtaBaskets) { _EtaBaskets = EtaBaskets; }
68 
69  void setBasketSizeInPhi(const int& PhiBaskets) { _PhiBaskets = PhiBaskets; }
70 
72 
73  // Get closest cell, etc...
74 
75  DetId getClosestCell(const GlobalPoint& r) const override;
76 
77  CaloSubdetectorGeometry::DetIdSet getCells(const GlobalPoint& r, double dR) const override;
78 
80 
81  static std::string hitString() { return "EcalHitsEB"; }
82 
83  static std::string producerTag() { return "EcalBarrel"; }
84 
85  static unsigned int numberOfAlignments() { return 36; }
86 
87  static unsigned int alignmentTransformIndexLocal(const DetId& id);
88 
89  static unsigned int alignmentTransformIndexGlobal(const DetId& id);
90 
91  static DetId detIdFromLocalAlignmentIndex(unsigned int iLoc);
92 
93  static void localCorners(Pt3DVec& lc, const CCGFloat* pv, unsigned int i, Pt3D& ref);
94 
95  void newCell(const GlobalPoint& f1,
96  const GlobalPoint& f2,
97  const GlobalPoint& f3,
98  const CCGFloat* parm,
99  const DetId& detId) override;
100 
101  bool present(const DetId& id) const override;
102 
103 protected:
104  // Modify the RawPtr class
105  CaloCellGeometryPtr getGeometryRawPtr(uint32_t index) const override;
106 
107 private:
110 
113 
118  std::vector<int> _EtaBaskets;
119 
122 
123  mutable std::atomic<EZMgrFL<EEDetId>*> m_borderMgr;
124 
125  mutable std::atomic<VecOrdListEEDetIdPtr*> m_borderPtrVec;
127  mutable std::atomic<bool> m_check;
128 
130 };
131 
132 #endif
static unsigned int alignmentTransformIndexGlobal(const DetId &id)
int getBasketSizeInPhi() const
unsigned int numberOfShapes() const override
EBAlignmentRcd AlignmentRecord
void setNumXtalsEtaDirection(const int &nnxtalEta)
CaloSubdetectorGeometry::DetIdSet getCells(const GlobalPoint &r, double dR) const override
Get a list of all cells within a dR of the given cell.
CaloCellGeometry::Pt3DVec Pt3DVec
std::atomic< bool > m_check
CaloCellGeometry::CCGFloat CCGFloat
EcalBarrelGeometryRecord AlignedRecord
void setBasketSizeInPhi(const int &PhiBaskets)
const OrderedListOfEEDetId * getClosestEndcapCells(EBDetId id) const
std::vector< int > _EtaBaskets
std::vector< Pt3D > Pt3DVec
EZArrayFL< EEDetId > OrderedListOfEEDetId
CaloCellGeometry::CCGFloat CCGFloat
void setEtaBaskets(const std::vector< int > &EtaBaskets)
static unsigned int numberOfAlignments()
void newCell(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId) override
~EcalBarrelGeometry() override
int getNumXtalsPhiDirection() const
void setNumXtalsPhiDirection(const int &nnxtalPhi)
CaloCellGeometryPtr getGeometryRawPtr(uint32_t index) const override
CCGFloat avgRadiusXYFrontFaceCenter() const
static DetId detIdFromLocalAlignmentIndex(unsigned int iLoc)
static constexpr int k_NumberOfShapes
static constexpr int kSizeForDenseIndexing
Definition: EBDetId.h:155
EcalBarrelNumberingScheme NumberingScheme
#define CMS_THREAD_GUARD(_var_)
CaloCellGeometry::CCGFloat CCGFloat
unsigned int numberOfParametersPerShape() const override
std::atomic< VecOrdListEEDetIdPtr * > m_borderPtrVec
std::vector< TruncatedPyramid > CellVec
int getNumXtalsEtaDirection() const
CaloCellGeometry::Pt3D Pt3D
static std::string producerTag()
Definition: DetId.h:17
static constexpr int k_NumberOfParametersPerShape
CaloCellGeometry::Pt3DVec Pt3DVec
HepGeom::Point3D< CCGFloat > Pt3D
DetId getClosestCell(const GlobalPoint &r) const override
std::atomic< EZMgrFL< EEDetId > * > m_borderMgr
bool present(const DetId &id) const override
is this detid present in the geometry?
std::vector< OrderedListOfEEDetId * > VecOrdListEEDetIdPtr
IdealGeometryRecord IdealRecord
static std::string dbString()
const std::vector< int > & getEtaBaskets() const
static std::string hitString()
static constexpr int k_NumberOfCellsForCorners
static unsigned int alignmentTransformIndexLocal(const DetId &id)
CaloCellGeometry::Pt3D Pt3D
PEcalBarrelRcd PGeometryRecord
static void localCorners(Pt3DVec &lc, const CCGFloat *pv, unsigned int i, Pt3D &ref)