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 {
21  public:
22 
23  typedef std::vector<TruncatedPyramid> CellVec ;
24 
28 
33 
34  typedef EZArrayFL<EEDetId> OrderedListOfEEDetId ; // like an stl vector: begin(), end(), [i]
35 
36  typedef std::vector<OrderedListOfEEDetId*> VecOrdListEEDetIdPtr ;
37 
39 
40  typedef EBDetId DetIdType ;
41 
43 
44  enum { k_NumberOfShapes = 17 } ;
45 
47 
48  static std::string dbString() { return "PEcalBarrelRcd" ; }
49 
50  unsigned int numberOfShapes() const override { return k_NumberOfShapes ; }
51  unsigned int numberOfParametersPerShape() const override { return k_NumberOfParametersPerShape ; }
52 
54 
55  ~EcalBarrelGeometry() override;
56 
57  int getNumXtalsPhiDirection() const { return _nnxtalPhi ; }
58 
59  int getNumXtalsEtaDirection() const { return _nnxtalEta ; }
60 
61  const std::vector<int>& getEtaBaskets() const { return _EtaBaskets ; }
62 
63  int getBasketSizeInPhi() const { return _PhiBaskets ; }
64 
65  void setNumXtalsPhiDirection( const int& nnxtalPhi ) { _nnxtalPhi=nnxtalPhi ; }
66 
67  void setNumXtalsEtaDirection( const int& nnxtalEta ) { _nnxtalEta=nnxtalEta ; }
68 
69  void setEtaBaskets( const std::vector<int>& EtaBaskets ) { _EtaBaskets=EtaBaskets ; }
70 
71  void setBasketSizeInPhi( const int& PhiBaskets ) { _PhiBaskets=PhiBaskets ; }
72 
73  const OrderedListOfEEDetId* getClosestEndcapCells( EBDetId id ) const ;
74 
75  // Get closest cell, etc...
76 
77  DetId getClosestCell( const GlobalPoint& r ) const override ;
78 
80  double dR ) const override ;
81 
82  CCGFloat avgRadiusXYFrontFaceCenter() const;
83 
84  static std::string hitString() { return "EcalHitsEB" ; }
85 
86  static std::string producerTag() { return "EcalBarrel" ; }
87 
88  static unsigned int numberOfAlignments() { return 36 ; }
89 
90  static unsigned int alignmentTransformIndexLocal( const DetId& id ) ;
91 
92  static unsigned int alignmentTransformIndexGlobal( const DetId& id ) ;
93 
94  static DetId detIdFromLocalAlignmentIndex( unsigned int iLoc ) ;
95 
96  static void localCorners( Pt3DVec& lc ,
97  const CCGFloat* pv ,
98  unsigned int i ,
99  Pt3D& ref ) ;
100 
101  void newCell( const GlobalPoint& f1 ,
102  const GlobalPoint& f2 ,
103  const GlobalPoint& f3 ,
104  const CCGFloat* parm ,
105  const DetId& detId ) override ;
106 
107  bool present( const DetId& id ) const override;
108 
109  protected:
110 
111  // Modify the RawPtr class
112  const CaloCellGeometry* getGeometryRawPtr (uint32_t index) const override;
113 
114  private:
115 
118 
121 
126  std::vector<int> _EtaBaskets;
127 
130 
131  mutable std::atomic<EZMgrFL<EEDetId>*> m_borderMgr ;
132 
133  mutable std::atomic<VecOrdListEEDetIdPtr*> m_borderPtrVec ;
134  CMS_THREAD_GUARD(m_check) mutable CCGFloat m_radius ;
135  mutable std::atomic<bool> m_check;
136 
137  CellVec m_cellVec ;
138 };
139 
140 
141 #endif
static unsigned int alignmentTransformIndexGlobal(const DetId &id)
const OrderedListOfEEDetId * getClosestEndcapCells(EBDetId id) const
EBAlignmentRcd AlignmentRecord
DetId getClosestCell(const GlobalPoint &r) const override
void setNumXtalsEtaDirection(const int &nnxtalEta)
int getNumXtalsPhiDirection() const
bool present(const DetId &id) const override
is this detid present in the geometry?
CaloCellGeometry::Pt3DVec Pt3DVec
std::atomic< bool > m_check
CaloCellGeometry::CCGFloat CCGFloat
EcalBarrelGeometryRecord AlignedRecord
void setBasketSizeInPhi(const int &PhiBaskets)
std::vector< int > _EtaBaskets
std::vector< Pt3D > Pt3DVec
EZArrayFL< EEDetId > OrderedListOfEEDetId
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 getNumXtalsEtaDirection() const
void setNumXtalsPhiDirection(const int &nnxtalPhi)
static DetId detIdFromLocalAlignmentIndex(unsigned int iLoc)
unsigned int numberOfShapes() const override
EcalBarrelNumberingScheme NumberingScheme
#define CMS_THREAD_GUARD(_var_)
def pv(vc)
Definition: MetAnalyzer.py:6
std::atomic< VecOrdListEEDetIdPtr * > m_borderPtrVec
std::vector< TruncatedPyramid > CellVec
CCGFloat avgRadiusXYFrontFaceCenter() const
static std::string producerTag()
Definition: DetId.h:18
const std::vector< int > & getEtaBaskets() const
int getBasketSizeInPhi() const
HepGeom::Point3D< CCGFloat > Pt3D
std::atomic< EZMgrFL< EEDetId > * > m_borderMgr
std::vector< OrderedListOfEEDetId * > VecOrdListEEDetIdPtr
IdealGeometryRecord IdealRecord
static std::string dbString()
unsigned int numberOfParametersPerShape() const override
CaloSubdetectorGeometry::DetIdSet getCells(const GlobalPoint &r, double dR) const override
Get a list of all cells within a dR of the given cell.
static std::string hitString()
static unsigned int alignmentTransformIndexLocal(const DetId &id)
CaloCellGeometry::Pt3D Pt3D
const CaloCellGeometry * getGeometryRawPtr(uint32_t index) const override
PEcalBarrelRcd PGeometryRecord
static void localCorners(Pt3DVec &lc, const CCGFloat *pv, unsigned int i, Pt3D &ref)