test
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 | Private 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 Tr3D getTransform (Pt3DVec *) const
 
PreshowerStripoperator= (const PreshowerStrip &tr)
 
 PreshowerStrip ()
 
 PreshowerStrip (const PreshowerStrip &tr)
 
 PreshowerStrip (const GlobalPoint &po, 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
 
float etaPos () const
 
float etaSpan () const
 
const GlobalPointgetBackPoint () const
 
const CornersVecgetCorners () const
 Returns the corner points of this cell's volume. More...
 
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
 
float phiPos () const
 
float phiSpan () 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)
 

Private Member Functions

virtual void initCorners (CaloCellGeometry::CornersVec &) override
 

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, CornersMgr *mgr, const CCGFloat *par)
 
 CaloCellGeometry (const CornersVec &cv, const CCGFloat *par)
 
 CaloCellGeometry (void)
 
void initSpan ()
 

Detailed Description

A base class to handle the shape of preshower strips.

Revision:
1.12
Author
F. Cossutti

Definition at line 24 of file PreshowerStrip.h.

Member Typedef Documentation

Definition at line 28 of file PreshowerStrip.h.

Definition at line 29 of file PreshowerStrip.h.

Definition at line 30 of file PreshowerStrip.h.

Definition at line 31 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,
CornersMgr mgr,
const CCGFloat parm 
)
inline

Definition at line 39 of file PreshowerStrip.h.

References CaloCellGeometry::initSpan().

41  :
42  CaloCellGeometry ( po , mgr, parm ) {initSpan();}
PreshowerStrip::~PreshowerStrip ( )
virtual

Definition at line 20 of file PreshowerStrip.cc.

21 {}

Member Function Documentation

CCGFloat PreshowerStrip::dx ( ) const
inline

Definition at line 46 of file PreshowerStrip.h.

References CaloCellGeometry::param().

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

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

Definition at line 47 of file PreshowerStrip.h.

References CaloCellGeometry::param().

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

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

Definition at line 48 of file PreshowerStrip.h.

References CaloCellGeometry::param().

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

48 { return param()[2] ; }
const CCGFloat * param() const
virtual Tr3D PreshowerStrip::getTransform ( Pt3DVec ) const
inlinevirtual

Definition at line 60 of file PreshowerStrip.h.

61  { return Tr3D() ; }
CaloCellGeometry::Tr3D Tr3D
void PreshowerStrip::initCorners ( CaloCellGeometry::CornersVec corners)
overrideprivatevirtual

Implements CaloCellGeometry.

Definition at line 34 of file PreshowerStrip.cc.

References funct::cos(), dx(), dy(), dz(), CaloCellGeometry::getPosition(), i, 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().

35 {
36  if( corners.uninitialized() )
37  {
38  const GlobalPoint& ctr ( getPosition() ) ;
39  const CCGFloat x ( ctr.x() ) ;
40  const CCGFloat y ( ctr.y() ) ;
41  const CCGFloat z ( ctr.z() ) ;
42 
43  const double st ( sin(tilt()) ) ;
44  const double ct ( cos(tilt()) ) ;
45 
46  for( unsigned int ix ( 0 ) ; ix !=2 ; ++ix )
47  {
48  const double sx ( 0 == ix ? -1.0 : +1.0 ) ;
49  for( unsigned int iy ( 0 ) ; iy !=2 ; ++iy )
50  {
51  const double sy ( 0 == iy ? -1.0 : +1.0 ) ;
52  for( unsigned int iz ( 0 ) ; iz !=2 ; ++iz )
53  {
54  const double sz ( 0 == iz ? -1.0 : +1.0 ) ;
55  const unsigned int i ( 4*iz + 2*ix +
56  ( 1 == ix ? 1-iy : iy ) ) ;//keeps ordering same as before
57 
58  corners[ i ] = GlobalPoint(
59  dy()>dx() ?
60  x + sx*dx() :
61  x + sx*dx()*ct - sz*dz()*st ,
62  dy()<dx() ?
63  y + sy*dy() :
64  y + sy*dy()*ct - sz*dz()*st ,
65  dy()>dx() ?
66  z + sz*dz()*ct + sy*dy()*st :
67  z + sz*dz()*ct + sx*dx()*st ) ;
68  }
69  }
70  }
71  }
72 }
int i
Definition: DBlmapReader.cc:9
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
float float float 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
bool uninitialized() const
Definition: EZArrayFL.h:77
Definition: DDAxes.h:10
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
void PreshowerStrip::localCorners ( Pt3DVec vec,
const CCGFloat pv,
Pt3D ref 
)
static

Definition at line 96 of file PreshowerStrip.cc.

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

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

99 {
100  assert( 8 == lc.size() ) ;
101  assert( 0 != pv ) ;
102 
103  const CCGFloat dx ( pv[0] ) ;
104  const CCGFloat dy ( pv[1] ) ;
105  const CCGFloat dz ( pv[2] ) ;
106 
107  lc[0] = Pt3D( -dx, -dy, -dz ) ;
108  lc[1] = Pt3D( -dx, dy, -dz ) ;
109  lc[2] = Pt3D( dx, dy, -dz ) ;
110  lc[3] = Pt3D( dx, -dy, -dz ) ;
111  lc[4] = Pt3D( -dx, -dy, dz ) ;
112  lc[5] = Pt3D( -dx, dy, dz ) ;
113  lc[6] = Pt3D( dx, dy, dz ) ;
114  lc[7] = Pt3D( dx, -dy, dz ) ;
115 
116  ref = Pt3D(0,0,0) ;
117 }
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.

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

Definition at line 49 of file PreshowerStrip.h.

References CaloCellGeometry::param().

Referenced by initCorners().

49 { 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 51 of file PreshowerStrip.h.

References localCorners().

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