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
00021 class CaloCellGeometry
00022 {
00023 public:
00024
00025 typedef float CCGFloat ;
00026 typedef HepGeom::Transform3D Tr3D ;
00027 typedef HepGeom::Point3D<CCGFloat> Pt3D ;
00028 typedef std::vector<Pt3D> Pt3DVec ;
00029
00030 typedef EZArrayFL< GlobalPoint > CornersVec ;
00031 typedef EZMgrFL< GlobalPoint > CornersMgr ;
00032
00033 typedef EZArrayFL<CCGFloat> ParVec ;
00034 typedef std::vector<ParVec> ParVecVec ;
00035 typedef EZMgrFL< CCGFloat > ParMgr ;
00036
00037 enum CornersSize { k_cornerSize = 8 };
00038
00039 static const CCGFloat k_ScaleFromDDDtoGeant ;
00040
00041 virtual ~CaloCellGeometry() ;
00042
00043
00044 virtual const CornersVec& getCorners() const = 0 ;
00045
00046
00047 const GlobalPoint& getPosition() const ;
00048
00049
00050 bool inside( const GlobalPoint & point ) const ;
00051
00052 bool emptyCorners() const ;
00053
00054 const CCGFloat* param() const ;
00055
00056 static const CCGFloat* checkParmPtr( const std::vector<CCGFloat>& vd ,
00057 ParVecVec& pvv ) ;
00058
00059 static const CCGFloat* getParmPtr( const std::vector<CCGFloat>& vd ,
00060 ParMgr* mgr ,
00061 ParVecVec& pvv ) ;
00062
00063
00064
00065 virtual void getTransform( Tr3D& tr, Pt3DVec* lptr ) const ;
00066
00067
00068 virtual void vocalCorners( Pt3DVec& vec ,
00069 const CCGFloat* pv ,
00070 Pt3D& ref ) const = 0 ;
00071
00072 protected:
00073
00074 CaloCellGeometry( CornersVec::const_reference gp ,
00075 const CornersMgr* mgr,
00076 const CCGFloat* par ) ;
00077
00078 CaloCellGeometry( const CornersVec& cv,
00079 const CCGFloat* par ) ;
00080
00081 CornersVec& setCorners() const ;
00082
00083 CaloCellGeometry() ;
00084 CaloCellGeometry( const CaloCellGeometry& cell ) ;
00085 CaloCellGeometry& operator=( const CaloCellGeometry& cell ) ;
00086
00087 private:
00088
00089 GlobalPoint m_refPoint ;
00090
00091 mutable CornersVec m_corners ;
00092
00093 const CCGFloat* m_parms ;
00094 };
00095
00096 std::ostream& operator<<( std::ostream& s, const CaloCellGeometry& cell ) ;
00097
00098 #endif