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 
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 
42 
43  enum { k_NumberOfShapes = 1 } ;
44 
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 
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 
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 
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 
131 } ;
132 
133 
134 #endif
135 
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)
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()
VecOrdListEBDetIdPtr * m_borderPtrVec
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)
double double double z
CCGFloat avgAbsZFrontFaceCenter() const
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
CaloCellGeometry::Pt3DVec Pt3DVec
EZMgrFL< EBDetId > * m_borderMgr
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:20
EcalEndcapGeometryRecord AlignedRecord
int getNumberOfCrystalPerModule() const
static int myPhi(int i)
CaloCellGeometry::Pt3DVec Pt3DVec
HepGeom::Point3D< CCGFloat > Pt3D
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