CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EcalEndcapGeometry.h
Go to the documentation of this file.
1 #ifndef EcalEndcapGeometry_h
2 #define EcalEndcapGeometry_h
3 
14 #include <vector>
15 #include <map>
16 #include <atomic>
17 
18 class TruncatedPyramid;
19 
21 {
22  public:
23 
24  typedef std::vector<TruncatedPyramid> CellVec ;
25 
29 
34 
35  typedef EZArrayFL<EBDetId> OrderedListOfEBDetId ; // like an stl vector: begin(), end(), [i]
36 
37  typedef std::vector<OrderedListOfEBDetId*> VecOrdListEBDetIdPtr ;
38 
40 
41  typedef EEDetId DetIdType ;
42 
44 
45  enum { k_NumberOfShapes = 1 } ;
46 
48 
49 
50  static std::string dbString() { return "PEcalEndcapRcd" ; }
51 
52  virtual unsigned int numberOfShapes() const { return k_NumberOfShapes ; }
53  virtual unsigned int numberOfParametersPerShape() const { return k_NumberOfParametersPerShape ; }
54 
56 
57  virtual ~EcalEndcapGeometry();
58 
59  int getNumberOfModules() const { return _nnmods ; }
60 
61  int getNumberOfCrystalPerModule() const { return _nncrys ; }
62 
63  void setNumberOfModules( const int nnmods ) { _nnmods=nnmods ; }
64 
65  void setNumberOfCrystalPerModule( const int nncrys ) { _nncrys=nncrys ; }
66 
68  // Get closest cell, etc...
69  virtual DetId getClosestCell( const GlobalPoint& r ) const ;
70 
72  double dR ) const ;
73 
74  virtual void initializeParms() ;
75 
76  CCGFloat avgAbsZFrontFaceCenter() const ; // average over both endcaps. Positive!
77 
78  static std::string hitString() { return "EcalHitsEE" ; }
79 
80  static std::string producerTag() { return "EcalEndcap" ; }
81 
82  static unsigned int numberOfAlignments() { return 4 ; }
83 
84  static unsigned int alignmentTransformIndexLocal( const DetId& id ) ;
85 
86  static unsigned int alignmentTransformIndexGlobal( const DetId& id ) ;
87 
88  static DetId detIdFromLocalAlignmentIndex( unsigned int iLoc ) ;
89 
90  static void localCorners( Pt3DVec& lc ,
91  const CCGFloat* pv ,
92  unsigned int i ,
93  Pt3D& ref ) ;
94 
95  virtual void newCell( const GlobalPoint& f1 ,
96  const GlobalPoint& f2 ,
97  const GlobalPoint& f3 ,
98  const CCGFloat* parm ,
99  const DetId& detId ) ;
100 
101  protected:
102 
103  virtual const CaloCellGeometry* cellGeomPtr( uint32_t index ) const ;
104 
105  private:
106 
107  static int myPhi( int i ) { i+=720; return ( 1 + (i-1)%360 ) ; }
108 
110  int _nnmods;
111 
113  int _nncrys;
114 
116 
117  CCGFloat m_wref, m_xlo[2], m_xhi[2], m_ylo[2], m_yhi[2], m_xoff[2], m_yoff[2], m_del ;
118 
119  unsigned int m_nref ;
120 
121  unsigned int xindex( CCGFloat x, CCGFloat z ) const ;
122  unsigned int yindex( CCGFloat y, CCGFloat z ) const ;
123 
124  EEDetId gId( float x, float y, float z ) const ;
125 
126  mutable std::atomic<EZMgrFL<EBDetId>*> m_borderMgr ;
127 
128  mutable std::atomic<VecOrdListEBDetIdPtr*> m_borderPtrVec ;
129 
131  mutable std::atomic<bool> m_check;
132 
134 } ;
135 
136 
137 #endif
138 
int _nncrys
number of crystals per module
virtual DetId getClosestCell(const GlobalPoint &r) const
virtual unsigned int numberOfShapes() const
int i
Definition: DBlmapReader.cc:9
void setNumberOfCrystalPerModule(const int nncrys)
#define GCC11_FINAL
static unsigned int numberOfAlignments()
int getNumberOfModules() const
static void localCorners(Pt3DVec &lc, const CCGFloat *pv, unsigned int i, Pt3D &ref)
CaloCellGeometry::Pt3D Pt3D
static std::string producerTag()
virtual void newCell(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId)
std::vector< Pt3D > Pt3DVec
static unsigned int alignmentTransformIndexGlobal(const DetId &id)
virtual const CaloCellGeometry * cellGeomPtr(uint32_t index) const
CaloCellGeometry::CCGFloat CCGFloat
void setNumberOfModules(const int nnmods)
CCGFloat avgAbsZFrontFaceCenter() const
std::atomic< EZMgrFL< EBDetId > * > m_borderMgr
virtual CaloSubdetectorGeometry::DetIdSet getCells(const GlobalPoint &r, double dR) const
Get a list of all cells within a dR of the given cell.
static unsigned int alignmentTransformIndexLocal(const DetId &id)
unsigned int yindex(CCGFloat y, CCGFloat z) const
CaloCellGeometry::CCGFloat CCGFloat
std::atomic< VecOrdListEBDetIdPtr * > m_borderPtrVec
CaloCellGeometry::Pt3DVec Pt3DVec
#define CMS_THREAD_GUARD(_var_)
std::vector< OrderedListOfEBDetId * > VecOrdListEBDetIdPtr
CaloCellGeometry::CCGFloat CCGFloat
std::vector< TruncatedPyramid > CellVec
const OrderedListOfEBDetId * getClosestBarrelCells(EEDetId id) const
virtual void initializeParms()
EcalEndcapNumberingScheme NumberingScheme
EEAlignmentRcd AlignmentRecord
int _nnmods
number of modules
CaloCellGeometry::Pt3D Pt3D
unsigned int xindex(CCGFloat x, CCGFloat z) const
Definition: DetId.h:18
EcalEndcapGeometryRecord AlignedRecord
int getNumberOfCrystalPerModule() const
static int myPhi(int i)
CaloCellGeometry::Pt3DVec Pt3DVec
HepGeom::Point3D< CCGFloat > Pt3D
std::atomic< bool > m_check
A base class to handle the particular shape of Ecal Xtals. Taken from ORCA Calorimetry Code...
IdealGeometryRecord IdealRecord
static std::string hitString()
EZArrayFL< EBDetId > OrderedListOfEBDetId
static DetId detIdFromLocalAlignmentIndex(unsigned int iLoc)
EEDetId gId(float x, float y, float z) const
static std::string dbString()
virtual unsigned int numberOfParametersPerShape() const
PEcalEndcapRcd PGeometryRecord