CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/Geometry/CaloGeometry/interface/TruncatedPyramid.h

Go to the documentation of this file.
00001 #ifndef TruncatedPyramid_h
00002 #define TruncatedPyramid_h
00003 
00004 #include "Geometry/CaloGeometry/interface/CaloCellGeometry.h"
00005 #include <CLHEP/Geometry/Point3D.h>
00006 #include <CLHEP/Geometry/Plane3D.h>
00007 #include <CLHEP/Geometry/Vector3D.h>
00008 #include <CLHEP/Geometry/Transform3D.h>
00009 #include <vector>
00010 
00019 class TruncatedPyramid : public CaloCellGeometry
00020 {
00021    public:
00022 
00023       typedef CaloCellGeometry::CCGFloat CCGFloat ;
00024       typedef CaloCellGeometry::Pt3D     Pt3D     ;
00025       typedef CaloCellGeometry::Pt3DVec  Pt3DVec  ;
00026       typedef CaloCellGeometry::Tr3D     Tr3D     ;
00027 
00028       TruncatedPyramid() ;
00029 
00030       TruncatedPyramid( const TruncatedPyramid& tr ) ;
00031 
00032       TruncatedPyramid& operator=( const TruncatedPyramid& tr ) ;
00033 
00034       TruncatedPyramid( const CornersMgr*  cMgr ,
00035                         const GlobalPoint& fCtr ,
00036                         const GlobalPoint& bCtr ,
00037                         const GlobalPoint& cor1 ,
00038                         const CCGFloat*    parV   ) ;
00039 
00040       TruncatedPyramid( const CornersVec& corn ,
00041                         const CCGFloat*   par    ) ;
00042 
00043       virtual ~TruncatedPyramid() ;
00044 
00045       const GlobalPoint getPosition( CCGFloat depth ) const ;
00046 
00047       virtual const CornersVec& getCorners() const ;
00048 
00049       // Return thetaAxis polar angle of axis of the crystal
00050       CCGFloat getThetaAxis() const ;
00051 
00052       // Return phiAxis azimuthal angle of axis of the crystal
00053       CCGFloat getPhiAxis() const ;
00054 
00055       const GlobalVector& axis() const ;
00056 
00057       // for geometry creation in other classes
00058 /*      static void createCorners( const std::vector<CCGFloat>& pv ,
00059                                  const Tr3D&                  tr ,
00060                                  CornersVec&                  co   ) ;*/
00061       static void createCorners( const std::vector<CCGFloat>& pv ,
00062                                  const Tr3D&                  tr ,
00063                                  std::vector<GlobalPoint>&    co   ) ;
00064 
00065       virtual void vocalCorners( Pt3DVec&        vec ,
00066                                  const CCGFloat* pv  ,
00067                                  Pt3D&           ref  ) const ;
00068 
00069       static void localCorners( Pt3DVec&        vec ,
00070                                 const CCGFloat* pv  ,
00071                                 Pt3D&           ref  ) ;
00072 
00073       static void localCornersReflection( Pt3DVec&        vec ,
00074                                           const CCGFloat* pv  ,
00075                                           Pt3D&           ref  ) ;
00076 
00077       static void localCornersSwap( Pt3DVec&        vec ,
00078                                     const CCGFloat* pv  ,
00079                                     Pt3D&           ref  ) ;
00080 
00081       virtual void getTransform( Tr3D& tr, Pt3DVec* lptr ) const ;
00082 
00083    private:
00084 
00085       GlobalVector makeAxis() ;
00086 
00087       const GlobalPoint backCtr() const ;
00088       
00089       GlobalVector m_axis ;
00090 
00091       Pt3D         m_corOne ;
00092 };
00093 
00094 std::ostream& operator<<( std::ostream& s, const TruncatedPyramid& cell ) ;
00095   
00096 #endif