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 
26 
27  typedef EZArrayFL<EBDetId> OrderedListOfEBDetId ; // like an stl vector: begin(), end(), [i]
28 
29  typedef std::vector<OrderedListOfEBDetId*> VecOrdListEBDetIdPtr ;
30 
32 
33  typedef EEDetId DetIdType ;
34 
36 
37  enum { k_NumberOfShapes = 1 } ;
38 
40 
41 
42  static std::string dbString() { return "PEcalEndcapRcd" ; }
43 
44  virtual unsigned int numberOfShapes() const { return k_NumberOfShapes ; }
45  virtual unsigned int numberOfParametersPerShape() const { return k_NumberOfParametersPerShape ; }
46 
48 
49  virtual ~EcalEndcapGeometry();
50 
51  int getNumberOfModules() const { return _nnmods ; }
52 
53  int getNumberOfCrystalPerModule() const { return _nncrys ; }
54 
55  void setNumberOfModules( const int nnmods ) { _nnmods=nnmods ; }
56 
57  void setNumberOfCrystalPerModule( const int nncrys ) { _nncrys=nncrys ; }
58 
60  // Get closest cell, etc...
61  virtual DetId getClosestCell( const GlobalPoint& r ) const ;
62 
64  double dR ) const ;
65 
66  virtual void initializeParms() ;
67 
68  double avgAbsZFrontFaceCenter() const ; // average over both endcaps. Positive!
69 
70  static std::string hitString() { return "EcalHitsEE" ; }
71 
72  static std::string producerTag() { return "EcalEndcap" ; }
73 
74  static unsigned int numberOfAlignments() { return 4 ; }
75 
76  static unsigned int alignmentTransformIndexLocal( const DetId& id ) ;
77 
78  static unsigned int alignmentTransformIndexGlobal( const DetId& id ) ;
79 
80  static DetId detIdFromLocalAlignmentIndex( unsigned int iLoc ) ;
81 
82  static std::vector<HepGeom::Point3D<double> > localCorners( const double* pv,
83  unsigned int i,
84  HepGeom::Point3D<double> & ref ) ;
85 
86  static CaloCellGeometry* newCell( const GlobalPoint& f1 ,
87  const GlobalPoint& f2 ,
88  const GlobalPoint& f3 ,
90  const double* parm ,
91  const DetId& detId ) ;
92 
93  private:
94 
95  static int myPhi( int i ) { i+=720; return ( 1 + (i-1)%360 ) ; }
96 
98  int _nnmods;
99 
101  int _nncrys;
102 
103  double zeP, zeN;
104 
105  double m_wref, m_xlo[2], m_xhi[2], m_ylo[2], m_yhi[2], m_xoff[2], m_yoff[2], m_del ;
106 
107  unsigned int m_nref ;
108 
109  unsigned int xindex( double x, double z ) const ;
110  unsigned int yindex( double y, double z ) const ;
111 
112  EEDetId gId( float x, float y, float z ) const ;
113 
115 
117 
118  mutable double m_avgZ ;
119 } ;
120 
121 
122 #endif
123 
int _nncrys
number of crystals per module
virtual DetId getClosestCell(const GlobalPoint &r) const
double avgAbsZFrontFaceCenter() 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 std::string producerTag()
VecOrdListEBDetIdPtr * m_borderPtrVec
static unsigned int alignmentTransformIndexGlobal(const DetId &id)
void setNumberOfModules(const int nnmods)
double double double z
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 xindex(double x, double z) const
static CaloCellGeometry * newCell(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, CaloCellGeometry::CornersMgr *mgr, const double *parm, const DetId &detId)
EZMgrFL< EBDetId > * m_borderMgr
std::vector< OrderedListOfEBDetId * > VecOrdListEBDetIdPtr
const OrderedListOfEBDetId * getClosestBarrelCells(EEDetId id) const
virtual void initializeParms()
EcalEndcapNumberingScheme NumberingScheme
EEAlignmentRcd AlignmentRecord
int _nnmods
number of modules
Definition: DetId.h:20
static std::vector< HepGeom::Point3D< double > > localCorners(const double *pv, unsigned int i, HepGeom::Point3D< double > &ref)
EcalEndcapGeometryRecord AlignedRecord
int getNumberOfCrystalPerModule() const
static int myPhi(int i)
Definition: EZMgrFL.h:8
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
unsigned int yindex(double y, double z) const
static std::string dbString()
virtual unsigned int numberOfParametersPerShape() const
PEcalEndcapRcd PGeometryRecord