CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/Geometry/EcalAlgo/interface/EcalPreshowerGeometry.h

Go to the documentation of this file.
00001 #ifndef EcalPreshowerGeometry_h
00002 #define EcalPreshowerGeometry_h
00003 
00004 #include "Geometry/EcalCommonData/interface/EcalPreshowerNumberingScheme.h"
00005 #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
00006 #include "Geometry/CaloGeometry/interface/PreshowerStrip.h"
00007 #include "Geometry/Records/interface/IdealGeometryRecord.h"
00008 #include "Geometry/Records/interface/EcalPreshowerGeometryRecord.h"
00009 #include "CondFormats/AlignmentRecord/interface/ESAlignmentRcd.h"
00010 #include "DataFormats/EcalDetId/interface/ESDetId.h"
00011 #include "Geometry/Records/interface/PEcalPreshowerRcd.h"
00012 #include <vector>
00013 
00014 class EcalPreshowerGeometry : public CaloSubdetectorGeometry
00015 {
00016    public:
00017 
00018       typedef std::vector<PreshowerStrip> CellVec ;
00019 
00020       typedef CaloCellGeometry::CCGFloat CCGFloat ;
00021       typedef CaloCellGeometry::Pt3D     Pt3D     ;
00022       typedef CaloCellGeometry::Pt3DVec  Pt3DVec  ;
00023 
00024       typedef IdealGeometryRecord         IdealRecord   ;
00025       typedef EcalPreshowerGeometryRecord AlignedRecord ;
00026       typedef ESAlignmentRcd              AlignmentRecord ;
00027       typedef PEcalPreshowerRcd           PGeometryRecord ;
00028 
00029       typedef EcalPreshowerNumberingScheme NumberingScheme ;
00030       typedef CaloSubdetectorGeometry::ParVec ParVec ;
00031       typedef CaloSubdetectorGeometry::ParVecVec ParVecVec ;
00032       typedef ESDetId DetIdType ;
00033 
00034       enum { k_NumberOfCellsForCorners = ESDetId::kSizeForDenseIndexing } ;
00035 
00036       enum { k_NumberOfShapes = 4 } ;
00037 
00038       enum { k_NumberOfParametersPerShape = 4 } ;
00039 
00040       static std::string dbString() { return "PEcalPreshowerRcd" ; }
00041 
00042       virtual unsigned int numberOfShapes() const { return k_NumberOfShapes ; }
00043       virtual unsigned int numberOfParametersPerShape() const { return k_NumberOfParametersPerShape ; }
00044 
00045       EcalPreshowerGeometry() ;
00046   
00048       virtual ~EcalPreshowerGeometry();
00049 
00050       void setzPlanes( CCGFloat z1minus, 
00051                        CCGFloat z2minus,
00052                        CCGFloat z1plus, 
00053                        CCGFloat z2plus ) ;
00054 
00055       // Get closest cell
00056       virtual DetId getClosestCell( const GlobalPoint& r ) const ;
00057 
00058 
00059       // Get closest cell in arbitrary plane (1 or 2)
00060       virtual DetId getClosestCellInPlane( const GlobalPoint& r     ,
00061                                            int                plane   ) const ;
00062 
00063 
00064       virtual void initializeParms() ;
00065       virtual unsigned int numberOfTransformParms() const { return 3 ; }
00066 
00067       static std::string hitString() { return "EcalHitsES" ; }
00068 
00069       static std::string producerTag() { return "EcalPreshower" ; }
00070 
00071       static unsigned int numberOfAlignments() { return 8 ; }
00072 
00073       static unsigned int alignmentTransformIndexLocal( const DetId& id ) ;
00074 
00075       static unsigned int alignmentTransformIndexGlobal( const DetId& id ) ;
00076 
00077       static DetId detIdFromLocalAlignmentIndex( unsigned int iLoc ) ;
00078 
00079       static void localCorners( Pt3DVec&        lc  ,
00080                                 const CCGFloat* pv  ,
00081                                 unsigned int    i   ,
00082                                 Pt3D&           ref   ) ;
00083 
00084       virtual void newCell( const GlobalPoint& f1 ,
00085                             const GlobalPoint& f2 ,
00086                             const GlobalPoint& f3 ,
00087                             const CCGFloat*    parm ,
00088                             const DetId&       detId   ) ;
00089    protected:
00090 
00091       virtual const CaloCellGeometry* cellGeomPtr( uint32_t index ) const ;
00092 
00093    private:
00094 
00095       const CCGFloat m_xWidWaf      ;
00096       const CCGFloat m_xInterLadGap ;
00097       const CCGFloat m_xIntraLadGap ;
00098 
00099       const CCGFloat m_yWidAct      ;
00100       const CCGFloat m_yCtrOff      ;
00101 
00102       CCGFloat m_zplane[4];
00103 
00104       CellVec m_cellVec ;
00105 };
00106 
00107 
00108 #endif
00109