CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC4_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  GCC11_FINAL : public CaloCellGeometry {
00020 public:
00021 
00022   typedef CaloCellGeometry::CCGFloat CCGFloat ;
00023   typedef CaloCellGeometry::Pt3D     Pt3D     ;
00024   typedef CaloCellGeometry::Pt3DVec  Pt3DVec  ;
00025   typedef CaloCellGeometry::Tr3D     Tr3D     ;
00026   
00027   TruncatedPyramid( void );
00028   
00029   TruncatedPyramid( const TruncatedPyramid& tr ) ;
00030   
00031   TruncatedPyramid& operator=( const TruncatedPyramid& tr ) ;
00032   
00033   TruncatedPyramid( const CornersMgr*  cMgr ,
00034                     const GlobalPoint& fCtr ,
00035                     const GlobalPoint& bCtr ,
00036                     const GlobalPoint& cor1 ,
00037                     const CCGFloat*    parV   ) ;
00038   
00039   TruncatedPyramid( const CornersVec& corn ,
00040                     const CCGFloat*   par    ) ;
00041   
00042   virtual ~TruncatedPyramid() ;
00043   
00044   const GlobalPoint getPosition( CCGFloat depth ) const ;
00045   
00046   virtual const CornersVec& getCorners() const ;
00047   
00048   // Return thetaAxis polar angle of axis of the crystal
00049   CCGFloat getThetaAxis() const ;
00050   
00051   // Return phiAxis azimuthal angle of axis of the crystal
00052   CCGFloat getPhiAxis() const ;
00053   
00054   const GlobalVector& axis() const ;
00055   
00056   // for geometry creation in other classes
00057   static void createCorners( const std::vector<CCGFloat>& pv ,
00058                              const Tr3D&                  tr ,
00059                              std::vector<GlobalPoint>&    co   ) ;
00060   
00061   virtual void vocalCorners( Pt3DVec&        vec ,
00062                              const CCGFloat* pv  ,
00063                              Pt3D&           ref  ) const ;
00064   
00065   static void localCorners( Pt3DVec&        vec ,
00066                             const CCGFloat* pv  ,
00067                             Pt3D&           ref  ) ;
00068   
00069   static void localCornersReflection( Pt3DVec&        vec ,
00070                                       const CCGFloat* pv  ,
00071                                       Pt3D&           ref  ) ;
00072   
00073   static void localCornersSwap( Pt3DVec&        vec ,
00074                                 const CCGFloat* pv  ,
00075                                 Pt3D&           ref  ) ;
00076   
00077   virtual void getTransform( Tr3D& tr, Pt3DVec* lptr ) const ;
00078   
00079 private:
00080   GlobalVector makeAxis( void );
00081   
00082   const GlobalPoint backCtr( void ) const;    
00083   GlobalVector m_axis;
00084   Pt3D         m_corOne;
00085 };
00086 
00087 std::ostream& operator<<( std::ostream& s, const TruncatedPyramid& cell ) ;
00088 
00089 #endif