CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
19 class EcalBarrelGeometry GCC11_FINAL : public CaloSubdetectorGeometry
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 
42  enum { k_NumberOfCellsForCorners = EBDetId::kSizeForDenseIndexing } ;
43 
44  enum { k_NumberOfShapes = 17 } ;
45 
46  enum { k_NumberOfParametersPerShape = 11 } ;
47 
48  static std::string dbString() { return "PEcalBarrelRcd" ; }
49 
50  virtual unsigned int numberOfShapes() const { return k_NumberOfShapes ; }
51  virtual unsigned int numberOfParametersPerShape() const { return k_NumberOfParametersPerShape ; }
52 
53  EcalBarrelGeometry() ;
54 
55  virtual ~EcalBarrelGeometry();
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  virtual DetId getClosestCell( const GlobalPoint& r ) const ;
77 
79  double dR ) const ;
80 
81  CCGFloat avgRadiusXYFrontFaceCenter() const ;
82 
83  static std::string hitString() { return "EcalHitsEB" ; }
84 
85  static std::string producerTag() { return "EcalBarrel" ; }
86 
87  static unsigned int numberOfAlignments() { return 36 ; }
88 
89  static unsigned int alignmentTransformIndexLocal( const DetId& id ) ;
90 
91  static unsigned int alignmentTransformIndexGlobal( const DetId& id ) ;
92 
93  static DetId detIdFromLocalAlignmentIndex( unsigned int iLoc ) ;
94 
95  static void localCorners( Pt3DVec& lc ,
96  const CCGFloat* pv ,
97  unsigned int i ,
98  Pt3D& ref ) ;
99 
100  virtual void newCell( const GlobalPoint& f1 ,
101  const GlobalPoint& f2 ,
102  const GlobalPoint& f3 ,
103  const CCGFloat* parm ,
104  const DetId& detId ) ;
105  protected:
106 
107  virtual const CaloCellGeometry* cellGeomPtr( uint32_t index ) const ;
108 
109  private:
110 
113 
116 
121  std::vector<int> _EtaBaskets;
122 
125 
126  mutable std::atomic<EZMgrFL<EEDetId>*> m_borderMgr ;
127 
128  mutable std::atomic<VecOrdListEEDetIdPtr*> m_borderPtrVec ;
129  CMS_THREAD_GUARD(m_check) mutable CCGFloat m_radius ;
130  mutable std::atomic<bool> m_check;
131 
132  CellVec m_cellVec ;
133 };
134 
135 
136 #endif
static std::string producerTag()
std::atomic< EZMgrFL< EEDetId > * > m_borderMgr
std::vector< OrderedListOfEEDetId * > VecOrdListEEDetIdPtr
int i
Definition: DBlmapReader.cc:9
std::atomic< VecOrdListEEDetIdPtr * > m_borderPtrVec
void setEtaBaskets(const std::vector< int > &EtaBaskets)
int getNumXtalsEtaDirection() const
virtual void newCell(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)=0
int getNumXtalsPhiDirection() const
static unsigned int numberOfAlignments()
std::vector< Pt3D > Pt3DVec
CaloCellGeometry::CCGFloat CCGFloat
void setBasketSizeInPhi(const int &PhiBaskets)
virtual unsigned int numberOfShapes() const
virtual DetIdSet getCells(const GlobalPoint &r, double dR) const
Get a list of all cells within a dR of the given cell.
EcalBarrelNumberingScheme NumberingScheme
EBAlignmentRcd AlignmentRecord
CaloCellGeometry::CCGFloat CCGFloat
std::vector< int > _EtaBaskets
void setNumXtalsEtaDirection(const int &nnxtalEta)
virtual const CaloCellGeometry * cellGeomPtr(uint32_t index) const =0
EZArrayFL< EEDetId > OrderedListOfEEDetId
virtual DetId getClosestCell(const GlobalPoint &r) const
CaloCellGeometry::Pt3D Pt3D
virtual unsigned int numberOfParametersPerShape() const
Definition: DetId.h:18
CaloCellGeometry::Pt3DVec Pt3DVec
PEcalBarrelRcd PGeometryRecord
void setNumXtalsPhiDirection(const int &nnxtalPhi)
std::vector< TruncatedPyramid > CellVec
CaloCellGeometry::Pt3DVec Pt3DVec
EcalBarrelGeometryRecord AlignedRecord
HepGeom::Point3D< CCGFloat > Pt3D
IdealGeometryRecord IdealRecord
static std::string dbString()
#define CMS_THREAD_GUARD(_var_)
CaloCellGeometry::Pt3D Pt3D
const std::vector< int > & getEtaBaskets() const
int getBasketSizeInPhi() const
static std::string hitString()
Unlimited (trivial) bounds.