CMS 3D CMS Logo

EcalEndcapGeometry.h

Go to the documentation of this file.
00001 #ifndef EcalEndcapGeometry_h
00002 #define EcalEndcapGeometry_h
00003 
00004 #include "Geometry/CaloGeometry/interface/EZArrayFL.h"
00005 #include "DataFormats/EcalDetId/interface/EEDetId.h"
00006 #include "DataFormats/EcalDetId/interface/EBDetId.h"
00007 #include "Geometry/Records/interface/IdealGeometryRecord.h"
00008 #include "Geometry/Records/interface/EcalEndcapGeometryRecord.h"
00009 #include "CondFormats/AlignmentRecord/interface/EEAlignmentRcd.h"
00010 #include "Geometry/EcalCommonData/interface/EcalEndcapNumberingScheme.h"
00011 #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
00012 #include <vector>
00013 #include <map>
00014 
00015 class TruncatedPyramid;
00016 
00017 class EcalEndcapGeometry : public CaloSubdetectorGeometry 
00018 {
00019    public:
00020 
00021       typedef IdealGeometryRecord      IdealRecord   ;
00022       typedef EcalEndcapGeometryRecord AlignedRecord ;
00023       typedef EEAlignmentRcd           AlignmentRecord ;
00024 
00025       typedef EZArrayFL<EBDetId> OrderedListOfEBDetId ; // like an stl vector: begin(), end(), [i]
00026 
00027       typedef std::vector<OrderedListOfEBDetId*>  VecOrdListEBDetIdPtr ;
00028 
00029       typedef EcalEndcapNumberingScheme NumberingScheme ;
00030 
00031       enum CornersCount { k_NumberOfCellsForCorners = 14648 } ;
00032 
00033       EcalEndcapGeometry() ;
00034   
00035       virtual ~EcalEndcapGeometry();
00036 
00037       int getNumberOfModules()          const { return _nnmods ; }
00038 
00039       int getNumberOfCrystalPerModule() const { return _nncrys ; }
00040 
00041       void setNumberOfModules(          const int nnmods ) { _nnmods=nnmods ; }
00042 
00043       void setNumberOfCrystalPerModule( const int nncrys ) { _nncrys=nncrys ; }
00044 
00045       const OrderedListOfEBDetId* getClosestBarrelCells( EEDetId id ) const ;
00046 
00047       // Get closest cell, etc...
00048       virtual DetId getClosestCell( const GlobalPoint& r ) const ;
00049 
00050       virtual CaloSubdetectorGeometry::DetIdSet getCells( const GlobalPoint& r,
00051                                                           double             dR ) const ;
00052 
00053       void initialize();
00054 
00055       static std::string hitString() { return "EcalHitsEE" ; }
00056 
00057       static std::string producerName() { return "EcalEndcap" ; }
00058 
00059       static unsigned int numberOfAlignments() { return 4 ; }
00060 
00061    private:
00062 
00063       static int myPhi( int i ) { i+=720; return ( 1 + (i-1)%360 ) ; }
00064 
00066       int _nnmods;
00067   
00069       int _nncrys; 
00070 
00071       float zeP, zeN;
00072 
00073       float m_wref, m_href ;
00074 
00075       unsigned int m_nref ;
00076 
00077       unsigned int index( float x ) const ;
00078       EEDetId gId( float x, float y, float z ) const ;
00079 
00080       mutable EZMgrFL<EBDetId>*     m_borderMgr ;
00081 
00082       mutable VecOrdListEBDetIdPtr* m_borderPtrVec ;
00083 } ;
00084 
00085 
00086 #endif
00087 

Generated on Tue Jun 9 17:37:22 2009 for CMSSW by  doxygen 1.5.4