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/Records/interface/IdealGeometryRecord.h"
00007 #include "Geometry/Records/interface/EcalPreshowerGeometryRecord.h"
00008 #include "CondFormats/AlignmentRecord/interface/ESAlignmentRcd.h"
00009 #include "DataFormats/EcalDetId/interface/ESDetId.h"
00010 #include "Geometry/Records/interface/PEcalPreshowerRcd.h"
00011 #include <vector>
00012
00013 class EcalPreshowerGeometry : public CaloSubdetectorGeometry
00014 {
00015 public:
00016
00017 typedef IdealGeometryRecord IdealRecord ;
00018 typedef EcalPreshowerGeometryRecord AlignedRecord ;
00019 typedef ESAlignmentRcd AlignmentRecord ;
00020 typedef PEcalPreshowerRcd PGeometryRecord ;
00021
00022 typedef EcalPreshowerNumberingScheme NumberingScheme ;
00023 typedef CaloSubdetectorGeometry::ParVec ParVec ;
00024 typedef CaloSubdetectorGeometry::ParVecVec ParVecVec ;
00025 typedef ESDetId DetIdType ;
00026
00027 enum { k_NumberOfCellsForCorners = ESDetId::kSizeForDenseIndexing } ;
00028
00029 enum { k_NumberOfShapes = 2 } ;
00030
00031 enum { k_NumberOfParametersPerShape = 3 } ;
00032
00033 static std::string dbString() { return "PEcalPreshowerRcd" ; }
00034
00035 virtual unsigned int numberOfShapes() const { return k_NumberOfShapes ; }
00036 virtual unsigned int numberOfParametersPerShape() const { return k_NumberOfParametersPerShape ; }
00037
00038 EcalPreshowerGeometry() ;
00039
00041 virtual ~EcalPreshowerGeometry();
00042
00043 void setzPlanes( float z1minus,
00044 float z2minus,
00045 float z1plus,
00046 float z2plus ) ;
00047
00048
00049 virtual DetId getClosestCell( const GlobalPoint& r ) const ;
00050
00051
00052
00053 virtual DetId getClosestCellInPlane( const GlobalPoint& r ,
00054 int plane ) const ;
00055
00056
00057 virtual void initializeParms() ;
00058 virtual unsigned int numberOfTransformParms() const { return 3 ; }
00059
00060 static std::string hitString() { return "EcalHitsES" ; }
00061
00062 static std::string producerTag() { return "EcalPreshower" ; }
00063
00064 static unsigned int numberOfAlignments() { return 8 ; }
00065
00066 static unsigned int alignmentTransformIndexLocal( const DetId& id ) ;
00067
00068 static unsigned int alignmentTransformIndexGlobal( const DetId& id ) ;
00069
00070 static DetId detIdFromLocalAlignmentIndex( unsigned int iLoc ) ;
00071
00072 static std::vector<HepGeom::Point3D<double> > localCorners( const double* pv,
00073 unsigned int i,
00074 HepGeom::Point3D<double> & ref ) ;
00075
00076 static CaloCellGeometry* newCell( const GlobalPoint& f1 ,
00077 const GlobalPoint& f2 ,
00078 const GlobalPoint& f3 ,
00079 CaloCellGeometry::CornersMgr* mgr,
00080 const double* parm ,
00081 const DetId& detId ) ;
00082
00083 private:
00084
00085 const double m_xWidWaf ;
00086 const double m_xInterLadGap ;
00087 const double m_xIntraLadGap ;
00088
00089 const double m_yWidAct ;
00090 const double m_yCtrOff ;
00091
00092 double m_zplane[4];
00093 };
00094
00095
00096 #endif
00097