CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/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( void );
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                              std::vector<GlobalPoint>&    co   ) ;
00061 
00062   virtual void vocalCorners( Pt3DVec&        vec ,
00063                              const CCGFloat* pv  ,
00064                              Pt3D&           ref  ) const ;
00065 
00066   static void localCorners( Pt3DVec&        vec ,
00067                             const CCGFloat* pv  ,
00068                             Pt3D&           ref  ) ;
00069 
00070   static void localCornersReflection( Pt3DVec&        vec ,
00071                                       const CCGFloat* pv  ,
00072                                       Pt3D&           ref  ) ;
00073 
00074   static void localCornersSwap( Pt3DVec&        vec ,
00075                                 const CCGFloat* pv  ,
00076                                 Pt3D&           ref  ) ;
00077 
00078   virtual void getTransform( Tr3D& tr, Pt3DVec* lptr ) const ;
00079 
00080 private:
00081   GlobalVector makeAxis( void );
00082 
00083   const GlobalPoint backCtr( void ) const;    
00084   GlobalVector m_axis;
00085   Pt3D         m_corOne;
00086 };
00087 
00088 std::ostream& operator<<( std::ostream& s, const TruncatedPyramid& cell ) ;
00089   
00090 #endif