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 <vector> 00010 00011 class EcalPreshowerGeometry : public CaloSubdetectorGeometry 00012 { 00013 public: 00014 00015 typedef IdealGeometryRecord IdealRecord ; 00016 typedef EcalPreshowerGeometryRecord AlignedRecord ; 00017 typedef ESAlignmentRcd AlignmentRecord ; 00018 00019 typedef EcalPreshowerNumberingScheme NumberingScheme ; 00020 typedef CaloSubdetectorGeometry::ParVec ParVec ; 00021 typedef CaloSubdetectorGeometry::ParVecVec ParVecVec ; 00022 00023 enum CornersCount { k_NumberOfCellsForCorners = 137216 } ; 00024 00025 EcalPreshowerGeometry() ; 00026 00028 virtual ~EcalPreshowerGeometry(); 00029 00030 int getNumberOfWafers() const { return _nnwafers ; } 00031 00032 int getNumberOfStripsPerWafer() const { return _nnstrips ; } 00033 00034 void setzPlanes( float z1, float z2 ) { _zplane[0] = z1 ; _zplane[1] = z2 ; } 00035 00036 void setNumberOfWafers( int nnwafers ) { _nnwafers=nnwafers ; } 00037 00038 void setNumberOfStripsPerWafer( int nnstrips ) { _nnstrips=nnstrips ; } 00039 00040 // Get closest cell 00041 virtual DetId getClosestCell( const GlobalPoint& r ) const ; 00042 00043 // Get closest cell in arbitrary plane (1 or 2) 00044 virtual DetId getClosestCellInPlane( const GlobalPoint& r , 00045 int plane ) const ; 00046 00047 static std::string hitString() { return "EcalHitsES" ; } 00048 00049 static std::string producerName() { return "EcalPreshower" ; } 00050 00051 static unsigned int numberOfAlignments() { return 1 ; } 00052 00053 private: 00054 00056 int _nnwafers; 00057 00059 int _nnstrips; 00060 00061 float _act_w,_waf_w,_pitch,_intra_lad_gap,_inter_lad_gap,_centre_gap; 00062 float _zplane[2]; 00063 00064 }; 00065 00066 00067 #endif 00068