CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | 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

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 ()
 
- Public Member Functions inherited from CaloCellGeometry
bool emptyCorners () const
 
const GlobalPointgetPosition () const
 
bool inside (const GlobalPoint &point) const
 
const double * param () const
 
virtual ~CaloCellGeometry ()
 

Static Public Member Functions

static std::vector
< HepGeom::Point3D< double > > 
localCorners (const double *pv, HepGeom::Point3D< double > &ref)
 
- Static Public Member Functions inherited from CaloCellGeometry
static const double * checkParmPtr (const std::vector< double > &vd, ParVecVec &pvv)
 
static const double * getParmPtr (const std::vector< double > &vd, ParMgr *mgr, ParVecVec &pvv)
 

Additional Inherited Members

- Public Types inherited from CaloCellGeometry
typedef EZMgrFL< GlobalPointCornersMgr
 
enum  CornersSize { k_cornerSize = 8 }
 
typedef EZArrayFL< GlobalPointCornersVec
 
typedef EZMgrFL< double > ParMgr
 
typedef EZArrayFL< double > ParVec
 
typedef std::vector< ParVecParVecVec
 
- Static Public Attributes inherited from CaloCellGeometry
static const float k_ScaleFromDDDtoGeant
 
- Protected Member Functions inherited from CaloCellGeometry
 CaloCellGeometry (CornersVec::const_reference gp, const CornersMgr *mgr, const double *par)
 
 CaloCellGeometry (const CornersVec &cv, const double *par)
 
CornersVecsetCorners () const
 

Detailed Description

A base class to handle the shape of preshower strips.

Date:
2009/05/25 09:06:11
Revision:
1.8
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.

31  :
32  CaloCellGeometry ( po , mgr, parm ) {}
CaloCellGeometry(CornersVec::const_reference gp, const CornersMgr *mgr, const double *par)
virtual PreshowerStrip::~PreshowerStrip ( )
inlinevirtual

Definition at line 34 of file PreshowerStrip.h.

34 {}

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<<().

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

Definition at line 39 of file PreshowerStrip.h.

References CaloCellGeometry::param().

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

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

Definition at line 40 of file PreshowerStrip.h.

References CaloCellGeometry::param().

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

40 { return param()[2] ; }
const double * param() const
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(), PV3DBase< T, PVType, FrameType >::x(), ExpressReco_HICollisions_FallBack::x, PV3DBase< T, PVType, FrameType >::y(), ExpressReco_HICollisions_FallBack::y, z, and PV3DBase< T, PVType, FrameType >::z().

7 {
9  if( co.uninitialized() )
10  {
11  CornersVec& corners ( setCorners() ) ;
12 
13  const GlobalPoint& ctr ( getPosition() ) ;
14  const float x ( ctr.x() ) ;
15  const float y ( ctr.y() ) ;
16  const float z ( ctr.z() ) ;
17 
18  corners[ 0 ] = GlobalPoint( x - dx(), y - dy(), z - dz() ) ;
19  corners[ 1 ] = GlobalPoint( x - dx(), y + dy(), z - dz() ) ;
20  corners[ 2 ] = GlobalPoint( x + dx(), y + dy(), z - dz() ) ;
21  corners[ 3 ] = GlobalPoint( x + dx(), y - dy(), z - dz() ) ;
22  corners[ 4 ] = GlobalPoint( x - dx(), y - dy(), z + dz() ) ;
23  corners[ 5 ] = GlobalPoint( x - dx(), y + dy(), z + dz() ) ;
24  corners[ 6 ] = GlobalPoint( x + dx(), y + dy(), z + dz() ) ;
25  corners[ 7 ] = GlobalPoint( x + dx(), y - dy(), z + dz() ) ;
26  }
27  return co ;
28 }
EZArrayFL< GlobalPoint > CornersVec
const double dx() const
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
Definition: DDAxes.h:10
const double dy() const
const double dz() const
CornersVec & setCorners() const
const GlobalPoint & getPosition() const
virtual const CornersVec & getCorners() const =0
virtual HepGeom::Transform3D PreshowerStrip::getTransform ( std::vector< HepGeom::Point3D< double > > *  lptr) const
inlinevirtual

Reimplemented from CaloCellGeometry.

Definition at line 48 of file PreshowerStrip.h.

49  { 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().

45 {
46  assert( 0 != pv ) ;
47 
48  const double dx ( pv[0] ) ;
49  const double dy ( pv[1] ) ;
50  const double dz ( pv[2] ) ;
51 
52  std::vector<HepGeom::Point3D<double> > lc ( 8, HepGeom::Point3D<double> (0,0,0) ) ;
53 
54  lc[0] = HepGeom::Point3D<double> ( -dx, -dy, -dz ) ;
55  lc[1] = HepGeom::Point3D<double> ( -dx, dy, -dz ) ;
56  lc[2] = HepGeom::Point3D<double> ( dx, dy, -dz ) ;
57  lc[3] = HepGeom::Point3D<double> ( dx, -dy, -dz ) ;
58  lc[4] = HepGeom::Point3D<double> ( -dx, -dy, dz ) ;
59  lc[5] = HepGeom::Point3D<double> ( -dx, dy, dz ) ;
60  lc[6] = HepGeom::Point3D<double> ( dx, dy, dz ) ;
61  lc[7] = HepGeom::Point3D<double> ( dx, -dy, dz ) ;
62 
63  ref = HepGeom::Point3D<double> (0,0,0) ;
64 
65  return lc ;
66 }
const double dx() const
const double dy() const
const double dz() const
virtual std::vector<HepGeom::Point3D<double> > PreshowerStrip::vocalCorners ( const double *  pv,
HepGeom::Point3D< double > &  ref 
) const
inlinevirtual

Implements CaloCellGeometry.

Definition at line 42 of file PreshowerStrip.h.

References localCorners().

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