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 
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 
43 
44  enum { k_NumberOfShapes = 1 } ;
45 
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 
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 
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 
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 
133 } ;
134 
135 
136 #endif
137 
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)
float float float z
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
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)
Definition: DDAxes.h:10
EEDetId gId(float x, float y, float z) const
static std::string dbString()
virtual unsigned int numberOfParametersPerShape() const
PEcalEndcapRcd PGeometryRecord