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 
15 #include <vector>
16 #include <atomic>
17 
18 class EcalBarrelGeometry GCC11_FINAL : public CaloSubdetectorGeometry
19 {
20  public:
21 
22  typedef std::vector<TruncatedPyramid> CellVec ;
23 
27 
32 
33  typedef EZArrayFL<EEDetId> OrderedListOfEEDetId ; // like an stl vector: begin(), end(), [i]
34 
35  typedef std::vector<OrderedListOfEEDetId*> VecOrdListEEDetIdPtr ;
36 
38 
39  typedef EBDetId DetIdType ;
40 
41  enum { k_NumberOfCellsForCorners = EBDetId::kSizeForDenseIndexing } ;
42 
43  enum { k_NumberOfShapes = 17 } ;
44 
45  enum { k_NumberOfParametersPerShape = 11 } ;
46 
47  static std::string dbString() { return "PEcalBarrelRcd" ; }
48 
49  virtual unsigned int numberOfShapes() const { return k_NumberOfShapes ; }
50  virtual unsigned int numberOfParametersPerShape() const { return k_NumberOfParametersPerShape ; }
51 
52  EcalBarrelGeometry() ;
53 
54  virtual ~EcalBarrelGeometry();
55 
56  int getNumXtalsPhiDirection() const { return _nnxtalPhi ; }
57 
58  int getNumXtalsEtaDirection() const { return _nnxtalEta ; }
59 
60  const std::vector<int>& getEtaBaskets() const { return _EtaBaskets ; }
61 
62  int getBasketSizeInPhi() const { return _PhiBaskets ; }
63 
64  void setNumXtalsPhiDirection( const int& nnxtalPhi ) { _nnxtalPhi=nnxtalPhi ; }
65 
66  void setNumXtalsEtaDirection( const int& nnxtalEta ) { _nnxtalEta=nnxtalEta ; }
67 
68  void setEtaBaskets( const std::vector<int>& EtaBaskets ) { _EtaBaskets=EtaBaskets ; }
69 
70  void setBasketSizeInPhi( const int& PhiBaskets ) { _PhiBaskets=PhiBaskets ; }
71 
72  const OrderedListOfEEDetId* getClosestEndcapCells( EBDetId id ) const ;
73 
74  // Get closest cell, etc...
75  virtual DetId getClosestCell( const GlobalPoint& r ) const ;
76 
78  double dR ) const ;
79 
80  CCGFloat avgRadiusXYFrontFaceCenter() const ;
81 
82  static std::string hitString() { return "EcalHitsEB" ; }
83 
84  static std::string producerTag() { return "EcalBarrel" ; }
85 
86  static unsigned int numberOfAlignments() { return 36 ; }
87 
88  static unsigned int alignmentTransformIndexLocal( const DetId& id ) ;
89 
90  static unsigned int alignmentTransformIndexGlobal( const DetId& id ) ;
91 
92  static DetId detIdFromLocalAlignmentIndex( unsigned int iLoc ) ;
93 
94  static void localCorners( Pt3DVec& lc ,
95  const CCGFloat* pv ,
96  unsigned int i ,
97  Pt3D& ref ) ;
98 
99  virtual void newCell( const GlobalPoint& f1 ,
100  const GlobalPoint& f2 ,
101  const GlobalPoint& f3 ,
102  const CCGFloat* parm ,
103  const DetId& detId ) ;
104  protected:
105 
106  virtual const CaloCellGeometry* cellGeomPtr( uint32_t index ) const ;
107 
108  private:
109 
112 
115 
120  std::vector<int> _EtaBaskets;
121 
124 
125  mutable std::atomic<EZMgrFL<EEDetId>*> m_borderMgr ;
126 
127  mutable std::atomic<VecOrdListEEDetIdPtr*> m_borderPtrVec ;
128 
129  mutable CCGFloat m_radius ; // CMS-THREADING protected by m_check
130  mutable std::atomic<bool> m_check;
131 
133 };
134 
135 
136 #endif
static std::string producerTag()
std::atomic< EZMgrFL< EEDetId > * > m_borderMgr
std::atomic< bool > m_check
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()
CaloCellGeometry::Pt3D Pt3D
const std::vector< int > & getEtaBaskets() const
int getBasketSizeInPhi() const
static std::string hitString()
Unlimited (trivial) bounds.