CMS 3D CMS Logo

Public Member Functions | Static Public Member Functions

PreshowerStrip Class Reference

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

#include <PreshowerStrip.h>

Inheritance diagram for PreshowerStrip:
CaloCellGeometry

List of all members.

Public Member Functions

const double dx () const
const double dy () const
const double dz () const
virtual const CornersVecgetCorners () const
virtual HepGeom::Transform3D getTransform (std::vector< HepGeom::Point3D< double > > *lptr) const
 PreshowerStrip (const GlobalPoint &po, const CornersMgr *mgr, const double *parm)
virtual std::vector
< HepGeom::Point3D< double > > 
vocalCorners (const double *pv, HepGeom::Point3D< double > &ref) const
virtual ~PreshowerStrip ()

Static Public Member Functions

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

Detailed Description

A base class to handle the shape of preshower strips.

Date:
2010/04/20 17:23:11
Revision:
1.9
Author:
F. Cossutti

Definition at line 25 of file PreshowerStrip.h.


Constructor & Destructor Documentation

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

Definition at line 29 of file PreshowerStrip.h.

                                                :
         CaloCellGeometry ( po , mgr, parm ) {}
virtual PreshowerStrip::~PreshowerStrip ( ) [inline, virtual]

Definition at line 34 of file PreshowerStrip.h.

{}

Member Function Documentation

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

Definition at line 38 of file PreshowerStrip.h.

References CaloCellGeometry::param().

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

{ return param()[0] ; }
const double PreshowerStrip::dy ( ) const [inline]

Definition at line 39 of file PreshowerStrip.h.

References CaloCellGeometry::param().

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

{ return param()[1] ; }
const double PreshowerStrip::dz ( ) const [inline]

Definition at line 40 of file PreshowerStrip.h.

References CaloCellGeometry::param().

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

{ return param()[2] ; }
const CaloCellGeometry::CornersVec & PreshowerStrip::getCorners ( ) const [virtual]

Implements CaloCellGeometry.

Definition at line 6 of file PreshowerStrip.cc.

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

{
   const CornersVec& co ( CaloCellGeometry::getCorners() ) ;
   if( co.uninitialized() ) 
   {
      CornersVec& corners ( setCorners() ) ;

      const GlobalPoint& ctr ( getPosition() ) ;
      const float x ( ctr.x() ) ;
      const float y ( ctr.y() ) ;
      const float z ( ctr.z() ) ;

      corners[ 0 ] = GlobalPoint( x - dx(), y - dy(), z - dz() ) ;
      corners[ 1 ] = GlobalPoint( x - dx(), y + dy(), z - dz() ) ;
      corners[ 2 ] = GlobalPoint( x + dx(), y + dy(), z - dz() ) ;
      corners[ 3 ] = GlobalPoint( x + dx(), y - dy(), z - dz() ) ;
      corners[ 4 ] = GlobalPoint( x - dx(), y - dy(), z + dz() ) ;
      corners[ 5 ] = GlobalPoint( x - dx(), y + dy(), z + dz() ) ;
      corners[ 6 ] = GlobalPoint( x + dx(), y + dy(), z + dz() ) ;
      corners[ 7 ] = GlobalPoint( x + dx(), y - dy(), z + dz() ) ;
   }
   return co ;
}
virtual HepGeom::Transform3D PreshowerStrip::getTransform ( std::vector< HepGeom::Point3D< double > > *  lptr) const [inline, virtual]

Reimplemented from CaloCellGeometry.

Definition at line 48 of file PreshowerStrip.h.

      { return HepGeom::Transform3D() ; }
std::vector< HepGeom::Point3D< double > > PreshowerStrip::localCorners ( const double *  pv,
HepGeom::Point3D< double > &  ref 
) [static]

Definition at line 43 of file PreshowerStrip.cc.

References dx(), dy(), and dz().

Referenced by EcalPreshowerGeometry::localCorners(), and vocalCorners().

{
   assert( 0 != pv ) ;

   const double dx ( pv[0] ) ;
   const double dy ( pv[1] ) ;
   const double dz ( pv[2] ) ;

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

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

   ref   = HepGeom::Point3D<double> (0,0,0) ;

   return lc ;
}
virtual std::vector<HepGeom::Point3D<double> > PreshowerStrip::vocalCorners ( const double *  pv,
HepGeom::Point3D< double > &  ref 
) const [inline, virtual]

Implements CaloCellGeometry.

Definition at line 42 of file PreshowerStrip.h.

References localCorners().

      { return localCorners( pv, ref ) ; }