CMS 3D CMS Logo

calogeom::IdealZPrism Class Reference

Prism class used for HF volumes. More...

#include <Geometry/CaloGeometry/interface/IdealZPrism.h>

Inheritance diagram for calogeom::IdealZPrism:

CaloCellGeometry

List of all members.

Public Member Functions

float dEta () const
float dPhi () const
float dz () const
virtual const CornersVecgetCorners () const
 IdealZPrism (const GlobalPoint &faceCenter, const CornersMgr *mgr, const float *parm)
virtual bool inside (const GlobalPoint &point) const
virtual ~IdealZPrism ()

Private Member Functions

const float * param () const

Private Attributes

const float * m_parms


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
2007/10/21 16:07:34
Revision
1.4
Author:
J. Mans - Minnesota

Definition at line 29 of file IdealZPrism.h.


Constructor & Destructor Documentation

calogeom::IdealZPrism::IdealZPrism ( const GlobalPoint faceCenter,
const CornersMgr mgr,
const float *  parm 
) [inline]

Definition at line 33 of file IdealZPrism.h.

00035                                                           : 
00036             CaloCellGeometry ( faceCenter, mgr ),
00037             m_parms          ( parm )                        {}

virtual calogeom::IdealZPrism::~IdealZPrism (  )  [inline, virtual]

Definition at line 39 of file IdealZPrism.h.

00039 {}


Member Function Documentation

float calogeom::IdealZPrism::dEta (  )  const [inline]

Definition at line 45 of file IdealZPrism.h.

References param().

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

00045 { return param()[0] ; }

float calogeom::IdealZPrism::dPhi (  )  const [inline]

Definition at line 46 of file IdealZPrism.h.

References param().

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

00046 { return param()[1] ; }

float calogeom::IdealZPrism::dz (  )  const [inline]

Definition at line 47 of file IdealZPrism.h.

References param().

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

00047 { return param()[2] ; }

const CaloCellGeometry::CornersVec & calogeom::IdealZPrism::getCorners (  )  const [virtual]

Implements CaloCellGeometry.

Definition at line 34 of file IdealZPrism.cc.

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

00035    {
00036       const CornersVec& co ( CaloCellGeometry::getCorners() ) ;
00037       if( co.uninitialized() ) 
00038       {
00039          CornersVec& corners ( setCorners() ) ;
00040 
00041          const GlobalPoint p      ( getPosition() ) ;
00042          const float       z_near ( p.z() ) ;
00043          const float       z_far  ( z_near + 2*dz()*p.z()/fabs( p.z() ) ) ;
00044          const float       eta    ( p.eta() ) ;
00045          const float       phi    ( p.phi() ) ;
00046 
00047          corners[ 0 ] = etaPhiZ( eta + dEta(), phi + dPhi(), z_near ); // (+,+,near)
00048          corners[ 1 ] = etaPhiZ( eta + dEta(), phi - dPhi(), z_near ); // (+,-,near)
00049          corners[ 2 ] = etaPhiZ( eta - dEta(), phi - dPhi(), z_near ); // (-,-,near)
00050          corners[ 3 ] = etaPhiZ( eta - dEta(), phi + dPhi(), z_near ); // (-,+,near)
00051          corners[ 4 ] = GlobalPoint( corners[0].x(), corners[0].y(), z_far ); // (+,+,far)
00052          corners[ 5 ] = GlobalPoint( corners[1].x(), corners[1].y(), z_far ); // (+,-,far)
00053          corners[ 6 ] = GlobalPoint( corners[2].x(), corners[2].y(), z_far ); // (-,-,far)
00054          corners[ 7 ] = GlobalPoint( corners[3].x(), corners[3].y(), z_far ); // (-,+,far)      
00055       }
00056       return co ;
00057    }

bool calogeom::IdealZPrism::inside ( const GlobalPoint point  )  const [virtual]

Implements CaloCellGeometry.

Definition at line 60 of file IdealZPrism.cc.

References dEta(), dPhi(), dz(), PV3DBase< T, PVType, FrameType >::eta(), CaloCellGeometry::getPosition(), PV3DBase< T, PVType, FrameType >::phi(), and PV3DBase< T, PVType, FrameType >::z().

00061    {
00062       return ( fabs( point.eta() - getPosition().eta() ) <= dEta() &&
00063                fabs( point.phi() - getPosition().phi() ) <= dPhi() &&
00064                fabs( point.z()   - getPosition().z()   ) <= dz()       ) ; 
00065    }

const float* calogeom::IdealZPrism::param (  )  const [inline, private]

Definition at line 51 of file IdealZPrism.h.

References m_parms.

Referenced by dEta(), dPhi(), and dz().

00051 { return m_parms ; }


Member Data Documentation

const float* calogeom::IdealZPrism::m_parms [private]

Definition at line 53 of file IdealZPrism.h.

Referenced by param().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:36:17 2009 for CMSSW by  doxygen 1.5.4