CMS 3D CMS Logo

Public Member Functions | Static Public Member Functions

calogeom::IdealZDCTrapezoid Class Reference

#include <IdealZDCTrapezoid.h>

Inheritance diagram for calogeom::IdealZDCTrapezoid:
CaloCellGeometry

List of all members.

Public Member Functions

const double an () const
const double dt () const
const double dx () const
const double dy () const
const double dz () const
virtual const CornersVecgetCorners () const
 IdealZDCTrapezoid (const GlobalPoint &faceCenter, const CornersMgr *mgr, const double *parm)
const double ta () const
virtual std::vector
< HepGeom::Point3D< double > > 
vocalCorners (const double *pv, HepGeom::Point3D< double > &ref) const
virtual ~IdealZDCTrapezoid ()

Static Public Member Functions

static std::vector
< HepGeom::Point3D< double > > 
localCorners (const double *pv, HepGeom::Point3D< double > &ref)

Detailed Description

Trapezoid class used for ZDC volumes.

Required parameters for an ideal zdc trapezoid:

Total: 7 parameters

Date:
2010/04/20 17:25:13
Revision:
1.8
Author:
E. Garcia - UIC

Definition at line 23 of file IdealZDCTrapezoid.h.


Constructor & Destructor Documentation

calogeom::IdealZDCTrapezoid::IdealZDCTrapezoid ( const GlobalPoint faceCenter,
const CornersMgr mgr,
const double *  parm 
) [inline]

Definition at line 27 of file IdealZDCTrapezoid.h.

                                                             :  
            CaloCellGeometry ( faceCenter, mgr, parm )  {}
virtual calogeom::IdealZDCTrapezoid::~IdealZDCTrapezoid ( ) [inline, virtual]

Definition at line 32 of file IdealZDCTrapezoid.h.

{}

Member Function Documentation

const double calogeom::IdealZDCTrapezoid::an ( ) const [inline]

Definition at line 36 of file IdealZDCTrapezoid.h.

References CaloCellGeometry::param().

Referenced by localCorners(), calogeom::operator<<(), and ta().

{ return param()[0] ; }
const double calogeom::IdealZDCTrapezoid::dt ( ) const [inline]

Definition at line 41 of file IdealZDCTrapezoid.h.

References dy(), and ta().

Referenced by localCorners().

{ return dy()*ta() ; }
const double calogeom::IdealZDCTrapezoid::dx ( ) const [inline]

Definition at line 37 of file IdealZDCTrapezoid.h.

References CaloCellGeometry::param().

Referenced by getCorners(), localCorners(), and calogeom::operator<<().

{ return param()[1] ; }
const double calogeom::IdealZDCTrapezoid::dy ( ) const [inline]

Definition at line 38 of file IdealZDCTrapezoid.h.

References CaloCellGeometry::param().

Referenced by dt(), localCorners(), and calogeom::operator<<().

{ return param()[2] ; }
const double calogeom::IdealZDCTrapezoid::dz ( ) const [inline]

Definition at line 39 of file IdealZDCTrapezoid.h.

References CaloCellGeometry::param().

Referenced by getCorners(), localCorners(), and calogeom::operator<<().

{ return param()[3] ; }
const CaloCellGeometry::CornersVec & calogeom::IdealZDCTrapezoid::getCorners ( ) const [virtual]

Implements CaloCellGeometry.

Definition at line 35 of file IdealZDCTrapezoid.cc.

References dx(), dz(), CaloCellGeometry::getCorners(), CaloCellGeometry::getPosition(), gf, i, localCorners(), python::rootplot::utilities::ls(), L1TEmulatorMonitor_cff::p, CaloCellGeometry::param(), CaloCellGeometry::setCorners(), EZArrayFL< T >::uninitialized(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

   {
      const CornersVec& co ( CaloCellGeometry::getCorners() ) ;
      if( co.uninitialized() ) 
      {
         CaloCellGeometry::CornersVec& corners ( setCorners() ) ;
         const GlobalPoint& p ( getPosition() ) ;
         const double zsign ( 0 < p.z() ? 1. : -1. ) ;
         const HepGeom::Point3D<double>  gf ( p.x(), p.y(), p.z() ) ;

         HepGeom::Point3D<double>  lf ;
         const std::vector<HepGeom::Point3D<double> > lc ( localCorners( param(), lf ) ) ;
         const HepGeom::Point3D<double>  lb ( lf.x() , lf.y() , lf.z() - 2.*dz() ) ;
         const HepGeom::Point3D<double>  ls ( lf.x() - dx(), lf.y(), lf.z() ) ;

         const HepGeom::Point3D<double>   gb ( gf.x() , gf.y() , gf.z() + 2.*zsign*dz() ) ;

         const HepGeom::Point3D<double>  gs ( gf.x() - zsign*dx(),
                               gf.y() ,
                               gf.z()         ) ;

         const HepGeom::Transform3D tr ( lf, lb, ls,
                                   gf, gb, gs ) ;

         for( unsigned int i ( 0 ) ; i != 8 ; ++i )
         {
            const HepGeom::Point3D<double>  gl ( tr*lc[i] ) ;
            corners[i] = GlobalPoint( gl.x(), gl.y(), gl.z() ) ;
         }
      }
      return co ;
   }
std::vector< HepGeom::Point3D< double > > calogeom::IdealZDCTrapezoid::localCorners ( const double *  pv,
HepGeom::Point3D< double > &  ref 
) [static]

Definition at line 7 of file IdealZDCTrapezoid.cc.

References an(), dt(), dx(), dy(), dz(), ta(), and funct::tan().

Referenced by getCorners(), ZdcGeometry::localCorners(), and vocalCorners().

   {
      assert( 0 != pv ) ;

      const double an ( pv[0] ) ;
      const double dx ( pv[1] ) ;
      const double dy ( pv[2] ) ;
      const double dz ( pv[3] ) ;
      const double ta ( tan( an ) ) ;
      const double dt ( dy*ta ) ;

      std::vector<HepGeom::Point3D<double> >  lc ( 8, HepGeom::Point3D<double> ( 0,0,0) ) ;

      lc[0] = HepGeom::Point3D<double> ( -dx, -dy, +dz+dt ) ;
      lc[1] = HepGeom::Point3D<double> ( -dx, +dy, +dz-dt ) ;
      lc[2] = HepGeom::Point3D<double> ( +dx, +dy, +dz-dt ) ;
      lc[3] = HepGeom::Point3D<double> ( +dx, -dy, +dz+dt ) ;
      lc[4] = HepGeom::Point3D<double> ( -dx, -dy, -dz+dt ) ;
      lc[5] = HepGeom::Point3D<double> ( -dx, +dy, -dz-dt ) ;
      lc[6] = HepGeom::Point3D<double> ( +dx, +dy, -dz-dt ) ;
      lc[7] = HepGeom::Point3D<double> ( +dx, -dy, -dz+dt ) ;

      ref   = 0.25*( lc[0] + lc[1] + lc[2] + lc[3] ) ;
      return lc ;
   }
const double calogeom::IdealZDCTrapezoid::ta ( ) const [inline]

Definition at line 40 of file IdealZDCTrapezoid.h.

References an(), and funct::tan().

Referenced by dt(), and localCorners().

{ return tan( an() ) ; }
virtual std::vector<HepGeom::Point3D<double> > calogeom::IdealZDCTrapezoid::vocalCorners ( const double *  pv,
HepGeom::Point3D< double > &  ref 
) const [inline, virtual]

Implements CaloCellGeometry.

Definition at line 43 of file IdealZDCTrapezoid.h.

References localCorners().

         { return localCorners( pv, ref ) ; }