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