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 
16 class TruncatedPyramid;
17 
18 class EcalEndcapGeometry GCC11_FINAL: public CaloSubdetectorGeometry
19 {
20  public:
21 
22  typedef std::vector<TruncatedPyramid> CellVec ;
23 
27 
32 
33  typedef EZArrayFL<EBDetId> OrderedListOfEBDetId ; // like an stl vector: begin(), end(), [i]
34 
35  typedef std::vector<OrderedListOfEBDetId*> VecOrdListEBDetIdPtr ;
36 
38 
39  typedef EEDetId DetIdType ;
40 
41  enum { k_NumberOfCellsForCorners = EEDetId::kSizeForDenseIndexing } ;
42 
43  enum { k_NumberOfShapes = 1 } ;
44 
45  enum { k_NumberOfParametersPerShape = 11 } ;
46 
47 
48  static std::string dbString() { return "PEcalEndcapRcd" ; }
49 
50  virtual unsigned int numberOfShapes() const { return k_NumberOfShapes ; }
51  virtual unsigned int numberOfParametersPerShape() const { return k_NumberOfParametersPerShape ; }
52 
53  EcalEndcapGeometry() ;
54 
55  virtual ~EcalEndcapGeometry();
56 
57  int getNumberOfModules() const { return _nnmods ; }
58 
59  int getNumberOfCrystalPerModule() const { return _nncrys ; }
60 
61  void setNumberOfModules( const int nnmods ) { _nnmods=nnmods ; }
62 
63  void setNumberOfCrystalPerModule( const int nncrys ) { _nncrys=nncrys ; }
64 
65  const OrderedListOfEBDetId* getClosestBarrelCells( EEDetId id ) const ;
66  // Get closest cell, etc...
67  virtual DetId getClosestCell( const GlobalPoint& r ) const ;
68 
70  double dR ) const ;
71 
72  virtual void initializeParms() ;
73 
74  CCGFloat avgAbsZFrontFaceCenter() const ; // average over both endcaps. Positive!
75 
76  static std::string hitString() { return "EcalHitsEE" ; }
77 
78  static std::string producerTag() { return "EcalEndcap" ; }
79 
80  static unsigned int numberOfAlignments() { return 4 ; }
81 
82  static unsigned int alignmentTransformIndexLocal( const DetId& id ) ;
83 
84  static unsigned int alignmentTransformIndexGlobal( const DetId& id ) ;
85 
86  static DetId detIdFromLocalAlignmentIndex( unsigned int iLoc ) ;
87 
88  static void localCorners( Pt3DVec& lc ,
89  const CCGFloat* pv ,
90  unsigned int i ,
91  Pt3D& ref ) ;
92 
93  virtual void newCell( const GlobalPoint& f1 ,
94  const GlobalPoint& f2 ,
95  const GlobalPoint& f3 ,
96  const CCGFloat* parm ,
97  const DetId& detId ) ;
98 
99  protected:
100 
101  virtual const CaloCellGeometry* cellGeomPtr( uint32_t index ) const ;
102 
103  private:
104 
105  static int myPhi( int i ) { i+=720; return ( 1 + (i-1)%360 ) ; }
106 
108  int _nnmods;
109 
111  int _nncrys;
112 
113  CCGFloat zeP, zeN;
114 
115  CCGFloat m_wref, m_xlo[2], m_xhi[2], m_ylo[2], m_yhi[2], m_xoff[2], m_yoff[2], m_del ;
116 
117  unsigned int m_nref ;
118 
119  unsigned int xindex( CCGFloat x, CCGFloat z ) const ;
120  unsigned int yindex( CCGFloat y, CCGFloat z ) const ;
121 
122  EEDetId gId( float x, float y, float z ) const ;
123 
125 
127 
128  mutable CCGFloat m_avgZ ;
129 
130  CellVec m_cellVec ;
131 } ;
132 
133 
134 #endif
135 
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.
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)
virtual DetId getClosestCell(const GlobalPoint &r) const
CaloCellGeometry::Pt3D Pt3D
virtual unsigned int numberOfParametersPerShape() const
Definition: DetId.h:20
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()
VecOrdListEBDetIdPtr * m_borderPtrVec
EZArrayFL< EBDetId > OrderedListOfEBDetId
int getNumberOfCrystalPerModule() const
CaloCellGeometry::Pt3D Pt3D
EZMgrFL< EBDetId > * m_borderMgr
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.