CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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
 
typedef EZArrayFL< GlobalPointCornersVec
 
typedef EZMgrFL< CCGFloatParMgr
 
typedef EZArrayFL< CCGFloatParVec
 
typedef std::vector< ParVecParVecVec
 
typedef HepGeom::Point3D
< CCGFloat
Pt3D
 
typedef std::vector< Pt3DPt3DVec
 
using RepCorners = std::array< RhoEtaPhi, k_cornerSize >
 
typedef HepGeom::Transform3D Tr3D
 

Public Member Functions

CCGFloat dx () const
 
CCGFloat dy () const
 
CCGFloat dz () const
 
void getTransform (Tr3D &tr, Pt3DVec *) const override
 --------— only needed by specific utility; overloaded when needed -— More...
 
PreshowerStripoperator= (const PreshowerStrip &tr)
 
 PreshowerStrip ()
 
 PreshowerStrip (const PreshowerStrip &tr)
 
 PreshowerStrip (const GlobalPoint &po, CornersMgr *mgr, const CCGFloat *parm)
 
CCGFloat tilt () const
 
void vocalCorners (Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref) const override
 
 ~PreshowerStrip () override
 
- Public Member Functions inherited from CaloCellGeometry
bool emptyCorners () const
 
virtual float etaPos () const
 
virtual float etaSpan () const
 
GlobalPoint const & getBackPoint () const
 
CornersVec const & getCorners () const
 Returns the corner points of this cell's volume. More...
 
RepCorners const & getCornersREP () const
 
virtual const GlobalPointgetPosition () const
 Returns the position of reference for this cell. More...
 
virtual GlobalPoint getPosition (CCGFloat) const
 
virtual GlobalPoint getPosition (const Pt3D &) const
 
bool inside (const GlobalPoint &point) const
 Returns true if the specified point is inside this cell. More...
 
const CCGFloatparam () const
 
virtual float phiPos () const
 
virtual float phiSpan () const
 
RhoEtaPhi const & repPos () const
 
virtual float rhoPos () const
 
void setBackPoint (const GlobalPoint &pos)
 
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

void initCorners (CaloCellGeometry::CornersVec &) override
 

Additional Inherited Members

- Static Public Attributes inherited from CaloCellGeometry
static constexpr unsigned int k_cornerSize = 8
 
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 ()
 
void setCornerVec (const std::vector< GlobalPoint > &cor)
 
void setRefPoint (const GlobalPoint &pos)
 

Detailed Description

A base class to handle the shape of preshower strips.

Author
F. Cossutti

Definition at line 21 of file PreshowerStrip.h.

Member Typedef Documentation

Definition at line 23 of file PreshowerStrip.h.

Definition at line 24 of file PreshowerStrip.h.

Definition at line 25 of file PreshowerStrip.h.

Definition at line 26 of file PreshowerStrip.h.

Constructor & Destructor Documentation

PreshowerStrip::PreshowerStrip ( )

Definition at line 9 of file PreshowerStrip.cc.

PreshowerStrip::PreshowerStrip ( const PreshowerStrip tr)

Definition at line 11 of file PreshowerStrip.cc.

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

Definition at line 34 of file PreshowerStrip.h.

References CaloCellGeometry::initSpan().

34  : CaloCellGeometry(po, mgr, parm) {
35  initSpan();
36  }
PreshowerStrip::~PreshowerStrip ( )
override

Definition at line 13 of file PreshowerStrip.cc.

13 {}

Member Function Documentation

CCGFloat PreshowerStrip::dx ( ) const
inline

Definition at line 40 of file PreshowerStrip.h.

References CaloCellGeometry::param().

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

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

Definition at line 41 of file PreshowerStrip.h.

References CaloCellGeometry::param().

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

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

Definition at line 42 of file PreshowerStrip.h.

References CaloCellGeometry::param().

Referenced by Electron.Electron::cutBasedId(), ntupleDataFormat.Track::dzPull(), initCorners(), localCorners(), and operator<<().

42 { return param()[2]; }
const CCGFloat * param() const
void PreshowerStrip::getTransform ( Tr3D tr,
Pt3DVec lptr 
) const
inlineoverridevirtual

--------— only needed by specific utility; overloaded when needed -—

Reimplemented from CaloCellGeometry.

Definition at line 49 of file PreshowerStrip.h.

49 {}
void PreshowerStrip::initCorners ( CaloCellGeometry::CornersVec corners)
overrideprivatevirtual

Implements CaloCellGeometry.

Definition at line 22 of file PreshowerStrip.cc.

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

22  {
23  if (corners.uninitialized()) {
24  const GlobalPoint& ctr(getPosition());
25  const CCGFloat x(ctr.x());
26  const CCGFloat y(ctr.y());
27  const CCGFloat z(ctr.z());
28 
29  const double st(sin(tilt()));
30  const double ct(cos(tilt()));
31 
32  for (unsigned int ix(0); ix != 2; ++ix) {
33  const double sx(0 == ix ? -1.0 : +1.0);
34  for (unsigned int iy(0); iy != 2; ++iy) {
35  const double sy(0 == iy ? -1.0 : +1.0);
36  for (unsigned int iz(0); iz != 2; ++iz) {
37  const double sz(0 == iz ? -1.0 : +1.0);
38  const unsigned int i(4 * iz + 2 * ix + (1 == ix ? 1 - iy : iy)); //keeps ordering same as before
39 
40  corners[i] =
41  GlobalPoint(dy() > dx() ? x + sx * dx() : x + sx * dx() * ct - sz * dz() * st,
42  dy() < dx() ? y + sy * dy() : y + sy * dy() * ct - sz * dz() * st,
43  dy() > dx() ? z + sz * dz() * ct + sy * dy() * st : z + sz * dz() * ct + sx * dx() * st);
44  }
45  }
46  }
47  }
48 }
virtual const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
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:63
void PreshowerStrip::localCorners ( Pt3DVec vec,
const CCGFloat pv,
Pt3D ref 
)
static

Definition at line 66 of file PreshowerStrip.cc.

References cms::cuda::assert(), dx(), dy(), and dz().

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

66  {
67  assert(8 == lc.size());
68  assert(nullptr != pv);
69 
70  const CCGFloat dx(pv[0]);
71  const CCGFloat dy(pv[1]);
72  const CCGFloat dz(pv[2]);
73 
74  lc[0] = Pt3D(-dx, -dy, -dz);
75  lc[1] = Pt3D(-dx, dy, -dz);
76  lc[2] = Pt3D(dx, dy, -dz);
77  lc[3] = Pt3D(dx, -dy, -dz);
78  lc[4] = Pt3D(-dx, -dy, dz);
79  lc[5] = Pt3D(-dx, dy, dz);
80  lc[6] = Pt3D(dx, dy, dz);
81  lc[7] = Pt3D(dx, -dy, dz);
82 
83  ref = Pt3D(0, 0, 0);
84 }
CaloCellGeometry::Pt3D Pt3D
assert(be >=bs)
CCGFloat dx() const
CaloCellGeometry::CCGFloat CCGFloat
CCGFloat dy() const
CCGFloat dz() const
PreshowerStrip & PreshowerStrip::operator= ( const PreshowerStrip tr)

Definition at line 15 of file PreshowerStrip.cc.

15  {
16  if (&tr != this) {
17  CaloCellGeometry::operator=(tr);
18  }
19  return *this;
20 }
CCGFloat PreshowerStrip::tilt ( ) const
inline

Definition at line 43 of file PreshowerStrip.h.

References CaloCellGeometry::param().

Referenced by initCorners().

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

Implements CaloCellGeometry.

Definition at line 45 of file PreshowerStrip.h.

References localCorners().

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