CMS 3D CMS Logo

Public Types | Public Member Functions | Static Public Member Functions

IdealCastorTrapezoid Class Reference

#include <IdealCastorTrapezoid.h>

Inheritance diagram for IdealCastorTrapezoid:
CaloCellGeometry

List of all members.

Public Types

typedef CaloCellGeometry::CCGFloat CCGFloat
typedef CaloCellGeometry::Pt3D Pt3D
typedef CaloCellGeometry::Pt3DVec Pt3DVec
typedef CaloCellGeometry::Tr3D Tr3D

Public Member Functions

const CCGFloat an () const
const CCGFloat dh () const
const CCGFloat dhz () const
const CCGFloat dR () const
const CCGFloat dx () const
const CCGFloat dxh () const
const CCGFloat dxl () const
const CCGFloat dy () const
const CCGFloat dz () const
const CCGFloat dzb () const
const CCGFloat dzs () const
virtual const CornersVecgetCorners () const
 IdealCastorTrapezoid (const IdealCastorTrapezoid &idct)
 IdealCastorTrapezoid ()
 IdealCastorTrapezoid (const GlobalPoint &faceCenter, const CornersMgr *mgr, const CCGFloat *parm)
IdealCastorTrapezoidoperator= (const IdealCastorTrapezoid &idct)
virtual void vocalCorners (Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref) const
virtual ~IdealCastorTrapezoid ()

Static Public Member Functions

static void localCorners (Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)

Detailed Description

Trapezoid class used for CASTOR volumes.

Required parameters for an ideal trapezoid:

Total: 6+3 parameters

Date:
2011/05/29 18:41:47
Revision:
1.12
Author:
P. Katsas - UoA

Definition at line 33 of file IdealCastorTrapezoid.h.


Member Typedef Documentation

Reimplemented from CaloCellGeometry.

Definition at line 37 of file IdealCastorTrapezoid.h.

Reimplemented from CaloCellGeometry.

Definition at line 38 of file IdealCastorTrapezoid.h.

Reimplemented from CaloCellGeometry.

Definition at line 39 of file IdealCastorTrapezoid.h.

Reimplemented from CaloCellGeometry.

Definition at line 40 of file IdealCastorTrapezoid.h.


Constructor & Destructor Documentation

IdealCastorTrapezoid::IdealCastorTrapezoid ( )

Definition at line 11 of file IdealCastorTrapezoid.cc.

IdealCastorTrapezoid::IdealCastorTrapezoid ( const IdealCastorTrapezoid idct)

Definition at line 16 of file IdealCastorTrapezoid.cc.

{
   *this = idct ;
}
IdealCastorTrapezoid::IdealCastorTrapezoid ( const GlobalPoint faceCenter,
const CornersMgr mgr,
const CCGFloat parm 
)

Definition at line 28 of file IdealCastorTrapezoid.cc.

                                                                            :  
   CaloCellGeometry ( faceCenter, mgr, parm )  
{
}
IdealCastorTrapezoid::~IdealCastorTrapezoid ( ) [virtual]

Definition at line 35 of file IdealCastorTrapezoid.cc.

{
}

Member Function Documentation

const CCGFloat IdealCastorTrapezoid::an ( ) const

Definition at line 94 of file IdealCastorTrapezoid.cc.

References CaloCellGeometry::param().

Referenced by dhz(), dy(), and localCorners().

{
   return param()[4] ; 
}
const CCGFloat IdealCastorTrapezoid::dh ( ) const

Definition at line 58 of file IdealCastorTrapezoid.cc.

References CaloCellGeometry::param().

Referenced by dhz(), dy(), and localCorners().

{
   return param()[2] ; 
}
const CCGFloat IdealCastorTrapezoid::dhz ( ) const

Definition at line 76 of file IdealCastorTrapezoid.cc.

References an(), funct::cos(), and dh().

Referenced by dzb(), dzs(), and localCorners().

{
   return dh()*cos(an()) ; 
}
const CCGFloat IdealCastorTrapezoid::dR ( ) const

Definition at line 100 of file IdealCastorTrapezoid.cc.

References CaloCellGeometry::param().

Referenced by getCorners().

{
   return param()[5] ; 
}
const CCGFloat IdealCastorTrapezoid::dx ( ) const

Definition at line 52 of file IdealCastorTrapezoid.cc.

References dxh(), and dxl().

Referenced by getCorners(), and localCorners().

{
   return ( dxl()+dxh() )/2. ; 
}
const CCGFloat IdealCastorTrapezoid::dxh ( ) const

Definition at line 46 of file IdealCastorTrapezoid.cc.

References CaloCellGeometry::param().

Referenced by dx(), and localCorners().

{
   return param()[1] ; 
}
const CCGFloat IdealCastorTrapezoid::dxl ( ) const

Definition at line 40 of file IdealCastorTrapezoid.cc.

References CaloCellGeometry::param().

Referenced by dx(), and localCorners().

{
   return param()[0] ; 
}
const CCGFloat IdealCastorTrapezoid::dy ( ) const

Definition at line 64 of file IdealCastorTrapezoid.cc.

References an(), dh(), and funct::sin().

Referenced by getCorners(), and localCorners().

{
   return dh()*sin(an()) ; 
}
const CCGFloat IdealCastorTrapezoid::dz ( ) const

Definition at line 70 of file IdealCastorTrapezoid.cc.

References CaloCellGeometry::param().

Referenced by dzb(), dzs(), getCorners(), and localCorners().

{
   return param()[3] ; 
}
const CCGFloat IdealCastorTrapezoid::dzb ( ) const

Definition at line 82 of file IdealCastorTrapezoid.cc.

References dhz(), and dz().

Referenced by localCorners().

{
   return dz() + dhz() ;
}
const CCGFloat IdealCastorTrapezoid::dzs ( ) const

Definition at line 88 of file IdealCastorTrapezoid.cc.

References dhz(), and dz().

Referenced by localCorners().

{
   return dz() - dhz() ; 
}
const CaloCellGeometry::CornersVec & IdealCastorTrapezoid::getCorners ( ) const [virtual]

Implements CaloCellGeometry.

Definition at line 147 of file IdealCastorTrapezoid.cc.

References funct::cos(), dR(), dx(), dy(), dz(), CaloCellGeometry::getCorners(), CaloCellGeometry::getPosition(), gf, i, localCorners(), python::rootplot::utilities::ls(), AlCaHLTBitMon_ParallelJobs::p, CaloCellGeometry::param(), phi, rho, CaloCellGeometry::setCorners(), funct::sin(), 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 CCGFloat zsign ( 0 < p.z() ? 1. : -1. ) ;
      const Pt3D  gf ( p.x(), p.y(), p.z() ) ;

      Pt3D  lf ;
      Pt3DVec lc ( 8, Pt3D(0,0,0) ) ;
      localCorners( lc, param(), lf ) ;
      const Pt3D lb ( lf.x() , lf.y() , lf.z() - 2.*dz() ) ;
      const Pt3D ls ( lf.x() - dx(), lf.y(), lf.z() ) ;


      const CCGFloat fphi ( atan( dx()/( dR() + dy() ) ) ) ;
      const Pt3D     gb ( gf.x() , gf.y() , gf.z() + 2.*zsign*dz() ) ;

      const CCGFloat rho ( dR() + dy() ) ;
      const CCGFloat phi ( gf.phi() + fphi ) ;
      const Pt3D gs ( rho*cos(phi) ,
                      rho*sin(phi) ,
                      gf.z()         ) ;

      const Tr3D tr ( lf, lb, ls,
                      gf, gb, gs ) ;

      for( unsigned int i ( 0 ) ; i != 8 ; ++i )
      {
         const Pt3D gl ( tr*lc[i] ) ;
         corners[i] = GlobalPoint( gl.x(), gl.y(), gl.z() ) ;
      }
   }
   return co ;
}
void IdealCastorTrapezoid::localCorners ( Pt3DVec vec,
const CCGFloat pv,
Pt3D ref 
) [static]

Definition at line 114 of file IdealCastorTrapezoid.cc.

References an(), funct::cos(), dh(), dhz(), dx(), dxh(), dxl(), dy(), dz(), dzb(), dzs(), and funct::sin().

Referenced by getCorners(), and vocalCorners().

{
   assert( 8 == lc.size() ) ;
   assert( 0 != pv ) ;
   
   const CCGFloat dxl ( pv[0] ) ;
   const CCGFloat dxh ( pv[1] ) ;
   const CCGFloat dh  ( pv[2] ) ;
   const CCGFloat dz  ( pv[3] ) ;
   const CCGFloat an  ( pv[4] ) ;
   const CCGFloat dx  ( ( dxl +dxh )/2. ) ;
   const CCGFloat dy  ( dh*sin(an) ) ;
   const CCGFloat dhz ( dh*cos(an) ) ;
   const CCGFloat dzb ( dz + dhz ) ;
   const CCGFloat dzs ( dz - dhz ) ;

   assert( 0 < (dxl*dxh) ) ;

   lc[ 0 ] = Pt3D (        -dx, -dy ,  dzb ) ;
   lc[ 1 ] = Pt3D (        -dx, +dy ,  dzs ) ;
   lc[ 2 ] = Pt3D ( +2*dxh -dx, +dy ,  dzs ) ;
   lc[ 3 ] = Pt3D ( +2*dxl -dx, -dy ,  dzb ) ;
   lc[ 4 ] = Pt3D (        -dx, -dy , -dzs ) ;
   lc[ 5 ] = Pt3D (        -dx, +dy , -dzb ) ;
   lc[ 6 ] = Pt3D ( +2*dxh -dx, +dy , -dzb ) ;
   lc[ 7 ] = Pt3D ( +2*dxl -dx, -dy , -dzs ) ;

   ref   = 0.25*( lc[0] + lc[1] + lc[2] + lc[3] ) ;
}
IdealCastorTrapezoid & IdealCastorTrapezoid::operator= ( const IdealCastorTrapezoid idct)

Definition at line 22 of file IdealCastorTrapezoid.cc.

{
   if( &idct != this ) CaloCellGeometry::operator=( idct ) ;
   return *this ;
}
void IdealCastorTrapezoid::vocalCorners ( Pt3DVec vec,
const CCGFloat pv,
Pt3D ref 
) const [virtual]

Implements CaloCellGeometry.

Definition at line 106 of file IdealCastorTrapezoid.cc.

References localCorners().

{ 
   localCorners( vec, pv, ref ) ; 
}