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
00048 class CaloCellGeometry
00049 {
00050 public:
00051
00052 typedef float CCGFloat ;
00053 typedef HepGeom::Transform3D Tr3D ;
00054 typedef HepGeom::Point3D<CCGFloat> Pt3D ;
00055 typedef std::vector<Pt3D> Pt3DVec ;
00056
00057 typedef EZArrayFL< GlobalPoint > CornersVec ;
00058 typedef EZMgrFL< GlobalPoint > CornersMgr ;
00059
00060 typedef EZArrayFL<CCGFloat> ParVec ;
00061 typedef std::vector<ParVec> ParVecVec ;
00062 typedef EZMgrFL< CCGFloat > ParMgr ;
00063
00064 enum CornersSize { k_cornerSize = 8 };
00065
00066 static const CCGFloat k_ScaleFromDDDtoGeant ;
00067
00068 virtual ~CaloCellGeometry() ;
00069
00071 virtual const CornersVec& getCorners() const = 0 ;
00072
00074 const GlobalPoint& getPosition() const ;
00075
00077 bool inside( const GlobalPoint & point ) const ;
00078
00079 bool emptyCorners() const ;
00080
00081 const CCGFloat* param() const ;
00082
00083 static const CCGFloat* checkParmPtr( const std::vector<CCGFloat>& vd ,
00084 ParVecVec& pvv ) ;
00085
00086 static const CCGFloat* getParmPtr( const std::vector<CCGFloat>& vd ,
00087 ParMgr* mgr ,
00088 ParVecVec& pvv ) ;
00089
00090
00092 virtual void getTransform( Tr3D& tr, Pt3DVec* lptr ) const ;
00093
00094
00095 virtual void vocalCorners( Pt3DVec& vec ,
00096 const CCGFloat* pv ,
00097 Pt3D& ref ) const = 0 ;
00098
00099 protected:
00100
00101 CaloCellGeometry( CornersVec::const_reference gp ,
00102 const CornersMgr* mgr,
00103 const CCGFloat* par ) ;
00104
00105 CaloCellGeometry( const CornersVec& cv,
00106 const CCGFloat* par ) ;
00107
00108 CornersVec& setCorners() const ;
00109
00110 CaloCellGeometry( void );
00111 CaloCellGeometry& operator=( const CaloCellGeometry& cell ) ;
00112 CaloCellGeometry( const CaloCellGeometry& cell ) ;
00113
00114 private:
00115 GlobalPoint m_refPoint ;
00116 mutable CornersVec m_corners ;
00117 const CCGFloat* m_parms ;
00118 };
00119
00120 std::ostream& operator<<( std::ostream& s, const CaloCellGeometry& cell ) ;
00121
00122 #endif