CMS 3D CMS Logo

PreshowerStrip Class Reference

A base class to handle the shape of preshower strips. More...

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

Inheritance diagram for PreshowerStrip:

CaloCellGeometry

List of all members.

Public Member Functions

const float dx () const
const float dy () const
const float dz () const
virtual const CornersVecgetCorners () const
virtual bool inside (const GlobalPoint &p) const
 PreshowerStrip (const GlobalPoint &po, const CornersMgr *mgr, const float *parm)
virtual ~PreshowerStrip ()

Private Member Functions

const float * param () const

Private Attributes

const float * m_parms


Detailed Description

A base class to handle the shape of preshower strips.

Date
2007/09/07 19:08:34
Revision
1.5
Author:
F. Cossutti

Definition at line 25 of file PreshowerStrip.h.


Constructor & Destructor Documentation

PreshowerStrip::PreshowerStrip ( const GlobalPoint po,
const CornersMgr mgr,
const float *  parm 
) [inline]

Definition at line 29 of file PreshowerStrip.h.

00031                                                 :
00032          CaloCellGeometry ( po , mgr ) ,
00033          m_parms          ( parm ) {}

virtual PreshowerStrip::~PreshowerStrip (  )  [inline, virtual]

Definition at line 35 of file PreshowerStrip.h.

00035 {}


Member Function Documentation

const float PreshowerStrip::dx (  )  const [inline]

Definition at line 41 of file PreshowerStrip.h.

References param().

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

00041 { return param()[0] ; }

const float PreshowerStrip::dy (  )  const [inline]

Definition at line 42 of file PreshowerStrip.h.

References param().

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

00042 { return param()[1] ; }

const float PreshowerStrip::dz (  )  const [inline]

Definition at line 43 of file PreshowerStrip.h.

References param().

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

00043 { return param()[2] ; }

const CaloCellGeometry::CornersVec & PreshowerStrip::getCorners (  )  const [virtual]

Implements CaloCellGeometry.

Definition at line 16 of file PreshowerStrip.cc.

References dx(), dy(), dz(), CaloCellGeometry::getCorners(), CaloCellGeometry::getPosition(), CaloCellGeometry::setCorners(), EZArrayFL< T >::uninitialized(), PV3DBase< T, PVType, FrameType >::x(), x, PV3DBase< T, PVType, FrameType >::y(), y, PV3DBase< T, PVType, FrameType >::z(), and z.

00017 {
00018    const CornersVec& co ( CaloCellGeometry::getCorners() ) ;
00019    if( co.uninitialized() ) 
00020    {
00021       CornersVec& corners ( setCorners() ) ;
00022 
00023       const GlobalPoint& ctr ( getPosition() ) ;
00024       const float x ( ctr.x() ) ;
00025       const float y ( ctr.y() ) ;
00026       const float z ( ctr.z() ) ;
00027 
00028       corners[ 0 ] = GlobalPoint( x - dx(), y - dy(), z - dz() ) ;
00029       corners[ 1 ] = GlobalPoint( x - dx(), y + dy(), z - dz() ) ;
00030       corners[ 2 ] = GlobalPoint( x + dx(), y + dy(), z - dz() ) ;
00031       corners[ 3 ] = GlobalPoint( x + dx(), y - dy(), z - dz() ) ;
00032       corners[ 4 ] = GlobalPoint( x - dx(), y - dy(), z + dz() ) ;
00033       corners[ 5 ] = GlobalPoint( x - dx(), y + dy(), z + dz() ) ;
00034       corners[ 6 ] = GlobalPoint( x + dx(), y + dy(), z + dz() ) ;
00035       corners[ 7 ] = GlobalPoint( x + dx(), y - dy(), z + dz() ) ;
00036    }
00037    return co ;
00038 }

bool PreshowerStrip::inside ( const GlobalPoint p  )  const [virtual]

Implements CaloCellGeometry.

Definition at line 7 of file PreshowerStrip.cc.

References c, dx(), dy(), dz(), CaloCellGeometry::getPosition(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

00008 {
00009    const GlobalPoint& c ( getPosition() ) ;
00010    return ( fabs( p.x() - c.x() ) < dx() && 
00011             fabs( p.y() - c.y() ) < dy() &&
00012             fabs( p.z() - c.z() ) < dz()    ) ; 
00013 }

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

Definition at line 47 of file PreshowerStrip.h.

References m_parms.

Referenced by dx(), dy(), and dz().

00047 { return m_parms ; }


Member Data Documentation

const float* PreshowerStrip::m_parms [private]

Definition at line 49 of file PreshowerStrip.h.

Referenced by param().


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