CMS 3D CMS Logo

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

typedef CaloCellGeometry::CCGFloat CCGFloat
 
typedef CaloCellGeometry::Pt3D Pt3D
 
typedef CaloCellGeometry::Pt3DVec Pt3DVec
 
typedef CaloCellGeometry::Tr3D Tr3D
 
- Public Types inherited from CaloCellGeometry
typedef float CCGFloat
 
typedef EZMgrFL< GlobalPointCornersMgr
 
enum  CornersSize { k_cornerSize = 8 }
 
typedef EZArrayFL< GlobalPointCornersVec
 
typedef EZMgrFL< CCGFloatParMgr
 
typedef EZArrayFL< CCGFloatParVec
 
typedef std::vector< ParVecParVecVec
 
typedef HepGeom::Point3D
< CCGFloat
Pt3D
 
typedef std::vector< Pt3DPt3DVec
 
typedef HepGeom::Transform3D Tr3D
 

Public Member Functions

CCGFloat dx () const
 
CCGFloat dy () const
 
CCGFloat dz () const
 
virtual const CornersVecgetCorners () const
 Returns the corner points of this cell's volume. More...
 
virtual Tr3D getTransform (Pt3DVec *) const
 
PreshowerStripoperator= (const PreshowerStrip &tr)
 
 PreshowerStrip ()
 
 PreshowerStrip (const PreshowerStrip &tr)
 
 PreshowerStrip (const GlobalPoint &po, const CornersMgr *mgr, const CCGFloat *parm)
 
CCGFloat tilt () const
 
virtual void vocalCorners (Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref) const
 
virtual ~PreshowerStrip ()
 
- Public Member Functions inherited from CaloCellGeometry
bool emptyCorners () const
 
const GlobalPointgetPosition () const
 Returns the position of reference for this cell. More...
 
virtual void getTransform (Tr3D &tr, Pt3DVec *lptr) const
 --------— only needed by specific utility; overloaded when needed -— More...
 
bool inside (const GlobalPoint &point) const
 Returns true if the specified point is inside this cell. More...
 
const CCGFloatparam () const
 
virtual ~CaloCellGeometry ()
 

Static Public Member Functions

static void localCorners (Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
 
- Static Public Member Functions inherited from CaloCellGeometry
static const CCGFloatcheckParmPtr (const std::vector< CCGFloat > &vd, ParVecVec &pvv)
 
static const CCGFloatgetParmPtr (const std::vector< CCGFloat > &vd, ParMgr *mgr, ParVecVec &pvv)
 

Additional Inherited Members

- Static Public Attributes inherited from CaloCellGeometry
static const CCGFloat k_ScaleFromDDDtoGeant
 
- Protected Member Functions inherited from CaloCellGeometry
 CaloCellGeometry (CornersVec::const_reference gp, const CornersMgr *mgr, const CCGFloat *par)
 
 CaloCellGeometry (const CornersVec &cv, const CCGFloat *par)
 
 CaloCellGeometry (void)
 
 CaloCellGeometry (const CaloCellGeometry &cell)
 
CaloCellGeometryoperator= (const CaloCellGeometry &cell)
 
CornersVecsetCorners () const
 

Detailed Description

A base class to handle the shape of preshower strips.

Date:
2011/09/27 09:10:38
Revision:
1.13
Author
F. Cossutti

Definition at line 25 of file PreshowerStrip.h.

Member Typedef Documentation

Definition at line 29 of file PreshowerStrip.h.

Definition at line 30 of file PreshowerStrip.h.

Definition at line 31 of file PreshowerStrip.h.

Definition at line 32 of file PreshowerStrip.h.

Constructor & Destructor Documentation

PreshowerStrip::PreshowerStrip ( )

Definition at line 10 of file PreshowerStrip.cc.

12 {}
PreshowerStrip::PreshowerStrip ( const PreshowerStrip tr)

Definition at line 14 of file PreshowerStrip.cc.

15  : CaloCellGeometry( tr )
16 {
17  *this = tr ;
18 }
PreshowerStrip::PreshowerStrip ( const GlobalPoint po,
const CornersMgr mgr,
const CCGFloat parm 
)
inline

Definition at line 40 of file PreshowerStrip.h.

42  :
43  CaloCellGeometry ( po , mgr, parm ) {}
PreshowerStrip::~PreshowerStrip ( )
virtual

Definition at line 20 of file PreshowerStrip.cc.

21 {}

Member Function Documentation

CCGFloat PreshowerStrip::dx ( ) const
inline

Definition at line 49 of file PreshowerStrip.h.

References CaloCellGeometry::param().

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

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

Definition at line 50 of file PreshowerStrip.h.

References CaloCellGeometry::param().

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

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

Definition at line 51 of file PreshowerStrip.h.

References CaloCellGeometry::param().

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

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

Returns the corner points of this cell's volume.

Implements CaloCellGeometry.

Definition at line 34 of file PreshowerStrip.cc.

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

Referenced by operator<<().

35 {
37  if( co.uninitialized() )
38  {
39  CornersVec& corners ( setCorners() ) ;
40 
41  const GlobalPoint& ctr ( getPosition() ) ;
42  const CCGFloat x ( ctr.x() ) ;
43  const CCGFloat y ( ctr.y() ) ;
44  const CCGFloat z ( ctr.z() ) ;
45 
46  const double st ( sin(tilt()) ) ;
47  const double ct ( cos(tilt()) ) ;
48 
49  for( unsigned int ix ( 0 ) ; ix !=2 ; ++ix )
50  {
51  const double sx ( 0 == ix ? -1.0 : +1.0 ) ;
52  for( unsigned int iy ( 0 ) ; iy !=2 ; ++iy )
53  {
54  const double sy ( 0 == iy ? -1.0 : +1.0 ) ;
55  for( unsigned int iz ( 0 ) ; iz !=2 ; ++iz )
56  {
57  const double sz ( 0 == iz ? -1.0 : +1.0 ) ;
58  const unsigned int i ( 4*iz + 2*ix +
59  ( 1 == ix ? 1-iy : iy ) ) ;//keeps ordering same as before
60 
61  corners[ i ] = GlobalPoint(
62  dy()>dx() ?
63  x + sx*dx() :
64  x + sx*dx()*ct - sz*dz()*st ,
65  dy()<dx() ?
66  y + sy*dy() :
67  y + sy*dy()*ct - sz*dz()*st ,
68  dy()>dx() ?
69  z + sz*dz()*ct + sy*dy()*st :
70  z + sz*dz()*ct + sx*dx()*st ) ;
71  }
72  }
73  }
74  }
75  return co ;
76 }
EZArrayFL< GlobalPoint > CornersVec
int i
Definition: DBlmapReader.cc:9
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
double double double z
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
CCGFloat dx() const
CaloCellGeometry::CCGFloat CCGFloat
CCGFloat tilt() const
CCGFloat dy() const
CCGFloat dz() const
CornersVec & setCorners() const
Definition: DDAxes.h:10
virtual const CornersVec & getCorners() const =0
Returns the corner points of this cell&#39;s volume.
virtual Tr3D PreshowerStrip::getTransform ( Pt3DVec ) const
inlinevirtual

Definition at line 63 of file PreshowerStrip.h.

64  { return Tr3D() ; }
CaloCellGeometry::Tr3D Tr3D
void PreshowerStrip::localCorners ( Pt3DVec vec,
const CCGFloat pv,
Pt3D ref 
)
static

Definition at line 100 of file PreshowerStrip.cc.

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

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

103 {
104  assert( 8 == lc.size() ) ;
105  assert( 0 != pv ) ;
106 
107  const CCGFloat dx ( pv[0] ) ;
108  const CCGFloat dy ( pv[1] ) ;
109  const CCGFloat dz ( pv[2] ) ;
110 
111  lc[0] = Pt3D( -dx, -dy, -dz ) ;
112  lc[1] = Pt3D( -dx, dy, -dz ) ;
113  lc[2] = Pt3D( dx, dy, -dz ) ;
114  lc[3] = Pt3D( dx, -dy, -dz ) ;
115  lc[4] = Pt3D( -dx, -dy, dz ) ;
116  lc[5] = Pt3D( -dx, dy, dz ) ;
117  lc[6] = Pt3D( dx, dy, dz ) ;
118  lc[7] = Pt3D( dx, -dy, dz ) ;
119 
120  ref = Pt3D(0,0,0) ;
121 }
CaloCellGeometry::Pt3D Pt3D
CCGFloat dx() const
CaloCellGeometry::CCGFloat CCGFloat
CCGFloat dy() const
CCGFloat dz() const
PreshowerStrip & PreshowerStrip::operator= ( const PreshowerStrip tr)

Definition at line 24 of file PreshowerStrip.cc.

References CaloCellGeometry::operator=().

25 {
26  if( &tr != this )
27  {
29  }
30  return *this ;
31 }
CaloCellGeometry & operator=(const CaloCellGeometry &cell)
CCGFloat PreshowerStrip::tilt ( ) const
inline

Definition at line 52 of file PreshowerStrip.h.

References CaloCellGeometry::param().

Referenced by getCorners().

52 { return param()[3] ; }
const CCGFloat * param() const
virtual void PreshowerStrip::vocalCorners ( Pt3DVec vec,
const CCGFloat pv,
Pt3D ref 
) const
inlinevirtual

Implements CaloCellGeometry.

Definition at line 54 of file PreshowerStrip.h.

References localCorners().

57  { localCorners( vec, pv, ref ) ; }
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)