Go to the documentation of this file.00001 #ifndef GEOMETRY_CALOGEOMETRY_CALOCELLGEOMETRY_H
00002 #define GEOMETRY_CALOGEOMETRY_CALOCELLGEOMETRY_H 1
00003
00004 #include "Geometry/CaloGeometry/interface/EZArrayFL.h"
00005 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00006 #include "DataFormats/GeometryVector/interface/GlobalVector.h"
00007 #include <CLHEP/Geometry/Point3D.h>
00008 #include <CLHEP/Geometry/Transform3D.h>
00009 #include <vector>
00010 #include <string>
00011
00012 #include "FWCore/Utilities/interface/GCC11Compatibility.h"
00013
00014
00015
00052 class CaloCellGeometry
00053 {
00054 public:
00055
00056 typedef float CCGFloat ;
00057 typedef HepGeom::Transform3D Tr3D ;
00058 typedef HepGeom::Point3D<CCGFloat> Pt3D ;
00059 typedef std::vector<Pt3D> Pt3DVec ;
00060
00061 typedef EZArrayFL< GlobalPoint > CornersVec ;
00062 typedef EZMgrFL< GlobalPoint > CornersMgr ;
00063
00064 typedef EZArrayFL<CCGFloat> ParVec ;
00065 typedef std::vector<ParVec> ParVecVec ;
00066 typedef EZMgrFL< CCGFloat > ParMgr ;
00067
00068 enum CornersSize { k_cornerSize = 8 };
00069
00070 static const CCGFloat k_ScaleFromDDDtoGeant ;
00071
00072 virtual ~CaloCellGeometry() ;
00073
00075 virtual const CornersVec& getCorners() const = 0 ;
00076
00078 const GlobalPoint& getPosition() const {return m_refPoint ; }
00079 float etaPos() const { return m_eta;}
00080 float phiPos() const { return m_phi;}
00081
00082
00083
00085 bool inside( const GlobalPoint & point ) const ;
00086
00087 bool emptyCorners() const { return m_corners.empty() ;}
00088
00089 const CCGFloat* param() const { return m_parms ;}
00090
00091 static const CCGFloat* checkParmPtr( const std::vector<CCGFloat>& vd ,
00092 ParVecVec& pvv ) ;
00093
00094 static const CCGFloat* getParmPtr( const std::vector<CCGFloat>& vd ,
00095 ParMgr* mgr ,
00096 ParVecVec& pvv ) ;
00097
00098
00100 virtual void getTransform( Tr3D& tr, Pt3DVec* lptr ) const ;
00101
00102
00103 virtual void vocalCorners( Pt3DVec& vec ,
00104 const CCGFloat* pv ,
00105 Pt3D& ref ) const = 0 ;
00106
00107 protected:
00108
00109 CaloCellGeometry( CornersVec::const_reference gp ,
00110 const CornersMgr* mgr,
00111 const CCGFloat* par ) ;
00112
00113 CaloCellGeometry( const CornersVec& cv,
00114 const CCGFloat* par ) ;
00115
00116 CornersVec& setCorners() const ;
00117
00118 CaloCellGeometry( void );
00119
00120 private:
00121 GlobalPoint m_refPoint ;
00122 mutable CornersVec m_corners ;
00123 const CCGFloat* m_parms ;
00124 float m_eta, m_phi;
00125 };
00126
00127 std::ostream& operator<<( std::ostream& s, const CaloCellGeometry& cell ) ;
00128
00129 #endif