CMS 3D CMS Logo

Public Types | Public Member Functions | Static Public Member Functions | Static Private Member Functions

IdealZPrism Class Reference

#include <IdealZPrism.h>

Inheritance diagram for IdealZPrism:
CaloCellGeometry

List of all members.

Public Types

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

Public Member Functions

CCGFloat dEta () const
CCGFloat dPhi () const
CCGFloat dz () const
CCGFloat eta () const
virtual const CornersVecgetCorners () const
 IdealZPrism (const GlobalPoint &faceCenter, const CornersMgr *mgr, const CCGFloat *parm)
 IdealZPrism (const IdealZPrism &idzp)
 IdealZPrism ()
IdealZPrismoperator= (const IdealZPrism &idzp)
virtual void vocalCorners (Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref) const
CCGFloat z () const
virtual ~IdealZPrism ()

Static Public Member Functions

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

Static Private Member Functions

static GlobalPoint etaPhiPerp (float eta, float phi, float perp)
static GlobalPoint etaPhiR (float eta, float phi, float rad)
static GlobalPoint etaPhiZ (float eta, float phi, float z)

Detailed Description

Prism class used for HF volumes. HF volumes are prisms with axes along the Z direction whose face shapes are set by

Required parameters for an ideal Z prism:

Total: 6 parameters

Internally, the "point of reference" is the center (eta/phi) of the front face of the prism. Therefore, the only internally stored parameters are eta and phi HALF-widths and the tower z thickness.

Date:
2011/05/29 18:06:58
Revision:
1.9
Author:
J. Mans - Minnesota

Definition at line 27 of file IdealZPrism.h.


Member Typedef Documentation

Reimplemented from CaloCellGeometry.

Definition at line 31 of file IdealZPrism.h.

Reimplemented from CaloCellGeometry.

Definition at line 32 of file IdealZPrism.h.

Reimplemented from CaloCellGeometry.

Definition at line 33 of file IdealZPrism.h.


Constructor & Destructor Documentation

IdealZPrism::IdealZPrism ( )

Definition at line 8 of file IdealZPrism.cc.

IdealZPrism::IdealZPrism ( const IdealZPrism idzp)

Definition at line 13 of file IdealZPrism.cc.

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

Definition at line 25 of file IdealZPrism.cc.

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

Definition at line 32 of file IdealZPrism.cc.

{
}

Member Function Documentation

CCGFloat IdealZPrism::dEta ( ) const

Definition at line 37 of file IdealZPrism.cc.

References CaloCellGeometry::param().

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

{
   return param()[0] ;
}
CCGFloat IdealZPrism::dPhi ( ) const

Definition at line 43 of file IdealZPrism.cc.

References CaloCellGeometry::param().

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

{ 
   return param()[1] ;
}
CCGFloat IdealZPrism::dz ( ) const

Definition at line 49 of file IdealZPrism.cc.

References CaloCellGeometry::param().

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

{ 
   return param()[2] ;
}
CCGFloat IdealZPrism::eta ( void  ) const

Definition at line 55 of file IdealZPrism.cc.

References CaloCellGeometry::param().

Referenced by getCorners(), and localCorners().

{
   return param()[3] ; 
}
GlobalPoint IdealZPrism::etaPhiPerp ( float  eta,
float  phi,
float  perp 
) [static, private]

Definition at line 85 of file IdealZPrism.cc.

Referenced by localCorners().

{
   return GlobalPoint( perp*cosf(  phi ) , 
                       perp*sinf(  phi ) , 
                       perp*sinhf( eta ) );
}
GlobalPoint IdealZPrism::etaPhiR ( float  eta,
float  phi,
float  rad 
) [static, private]

Definition at line 75 of file IdealZPrism.cc.

Referenced by localCorners().

{
   return GlobalPoint( rad*cosf(  phi )/coshf( eta ) ,
                       rad*sinf(  phi )/coshf( eta ) ,
                       rad*tanhf( eta )             ) ;
}
GlobalPoint IdealZPrism::etaPhiZ ( float  eta,
float  phi,
float  z 
) [static, private]

Definition at line 95 of file IdealZPrism.cc.

Referenced by getCorners(), and localCorners().

{
   return GlobalPoint( z*cosf( phi )/sinhf( eta ) ,
                       z*sinf( phi )/sinhf( eta ) ,
                       z                            ) ;
}
const CaloCellGeometry::CornersVec & IdealZPrism::getCorners ( ) const [virtual]

Implements CaloCellGeometry.

Definition at line 147 of file IdealZPrism.cc.

References dEta(), dPhi(), dz(), eta(), PV3DBase< T, PVType, FrameType >::eta(), etaPhiZ(), CaloCellGeometry::getCorners(), CaloCellGeometry::getPosition(), AlCaHLTBitMon_ParallelJobs::p, PV3DBase< T, PVType, FrameType >::phi(), phi, CaloCellGeometry::setCorners(), EZArrayFL< T >::uninitialized(), x, detailsBasic3DVector::y, and PV3DBase< T, PVType, FrameType >::z().

{
   const CornersVec& co ( CaloCellGeometry::getCorners() ) ;
   if( co.uninitialized() ) 
   {
      CornersVec& corners ( setCorners() ) ;
      
      const GlobalPoint p      ( getPosition() ) ;
      const CCGFloat    z_near ( p.z() ) ;
      const CCGFloat    z_far  ( z_near + 2*dz()*p.z()/fabs( p.z() ) ) ;
      const CCGFloat    eta    ( p.eta() ) ;
      const CCGFloat    phi    ( p.phi() ) ;
      
      corners[ 0 ] = etaPhiZ( eta + dEta(), phi + dPhi(), z_near ); // (+,+,near)
      corners[ 1 ] = etaPhiZ( eta + dEta(), phi - dPhi(), z_near ); // (+,-,near)
      corners[ 2 ] = etaPhiZ( eta - dEta(), phi - dPhi(), z_near ); // (-,-,near)
      corners[ 3 ] = etaPhiZ( eta - dEta(), phi + dPhi(), z_near ); // (-,+,near)
      corners[ 4 ] = GlobalPoint( corners[0].x(), corners[0].y(), z_far ); // (+,+,far)
      corners[ 5 ] = GlobalPoint( corners[1].x(), corners[1].y(), z_far ); // (+,-,far)
      corners[ 6 ] = GlobalPoint( corners[2].x(), corners[2].y(), z_far ); // (-,-,far)
      corners[ 7 ] = GlobalPoint( corners[3].x(), corners[3].y(), z_far ); // (-,+,far) 
   }
   return co ;
}
void IdealZPrism::localCorners ( Pt3DVec vec,
const CCGFloat pv,
Pt3D ref 
) [static]

Definition at line 105 of file IdealZPrism.cc.

References dEta(), dPhi(), dz(), eta(), etaPhiPerp(), etaPhiR(), etaPhiZ(), i, PV3DBase< T, PVType, FrameType >::mag(), AlCaHLTBitMon_ParallelJobs::p, x, detailsBasic3DVector::y, and z().

Referenced by vocalCorners().

{
   assert( 8 == lc.size() ) ;
   if( false )
   {
      GlobalPoint g1 ( etaPhiR(0,0,0) ) ;
      GlobalPoint g2 ( etaPhiPerp(0,0,0) ) ;
   }
   assert( 0 != pv ) ;
   
   const CCGFloat dEta ( pv[0] ) ;
   const CCGFloat dPhi ( pv[1] ) ;
   const CCGFloat dz   ( pv[2] ) ;
   const CCGFloat eta  ( pv[3] ) ;
   const CCGFloat z    ( pv[4] ) ;
   
   std::vector<GlobalPoint> gc ( 8, GlobalPoint(0,0,0) ) ;
   
   const GlobalPoint p ( etaPhiZ( eta, 0, z ) ) ;
   
   const float z_near ( z ) ;
   const float z_far  ( z*( 1 - 2*dz/p.mag() ) ) ;
   gc[ 0 ] = etaPhiZ( eta + dEta , +dPhi , z_near ) ; // (+,+,near)
   gc[ 1 ] = etaPhiZ( eta + dEta , -dPhi , z_near ) ; // (+,-,near)
   gc[ 2 ] = etaPhiZ( eta - dEta , -dPhi , z_near ) ; // (-,-,near)
   gc[ 3 ] = etaPhiZ( eta - dEta , +dPhi , z_near ) ; // (-,+,far)
   gc[ 4 ] = GlobalPoint( gc[0].x(), gc[0].y(), z_far ); // (+,+,far)
   gc[ 5 ] = GlobalPoint( gc[1].x(), gc[1].y(), z_far ); // (+,-,far)
   gc[ 6 ] = GlobalPoint( gc[2].x(), gc[2].y(), z_far ); // (-,-,far)
   gc[ 7 ] = GlobalPoint( gc[3].x(), gc[3].y(), z_far ); // (-,+,far)   
   
   for( unsigned int i ( 0 ) ; i != 8 ; ++i )
   {
      lc[i] = Pt3D( gc[i].x(), gc[i].y(), gc[i].z() ) ;
   }
   
   ref   = 0.25*( lc[0] + lc[1] + lc[2] + lc[3] ) ;
}
IdealZPrism & IdealZPrism::operator= ( const IdealZPrism idzp)

Definition at line 19 of file IdealZPrism.cc.

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

Implements CaloCellGeometry.

Definition at line 67 of file IdealZPrism.cc.

References localCorners().

{ 
   localCorners( vec, pv, ref ) ; 
}
CCGFloat IdealZPrism::z ( ) const

Definition at line 61 of file IdealZPrism.cc.

References CaloCellGeometry::param().

Referenced by localCorners().

{ 
   return param()[4] ;
}