CMS 3D CMS Logo

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< CCGFloatPt3D
 
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 GlobalPoint &po, CornersMgr *mgr, const CCGFloat *parm)
 
 PreshowerStrip (const PreshowerStrip &tr)
 
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 (const CornersVec &cv, const CCGFloat *par)
 
 CaloCellGeometry (CornersVec::const_reference gp, CornersMgr *mgr, 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

◆ CCGFloat

Definition at line 23 of file PreshowerStrip.h.

◆ Pt3D

Definition at line 24 of file PreshowerStrip.h.

◆ Pt3DVec

Definition at line 25 of file PreshowerStrip.h.

◆ Tr3D

Definition at line 26 of file PreshowerStrip.h.

Constructor & Destructor Documentation

◆ PreshowerStrip() [1/3]

PreshowerStrip::PreshowerStrip ( )

Definition at line 9 of file PreshowerStrip.cc.

9 : CaloCellGeometry() {}

◆ PreshowerStrip() [2/3]

PreshowerStrip::PreshowerStrip ( const PreshowerStrip tr)

Definition at line 11 of file PreshowerStrip.cc.

11 : CaloCellGeometry(tr) { *this = tr; }

◆ PreshowerStrip() [3/3]

PreshowerStrip::PreshowerStrip ( const GlobalPoint po,
CornersMgr mgr,
const CCGFloat parm 
)
inline

Definition at line 34 of file PreshowerStrip.h.

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

References CaloCellGeometry::initSpan().

◆ ~PreshowerStrip()

PreshowerStrip::~PreshowerStrip ( )
override

Definition at line 13 of file PreshowerStrip.cc.

13 {}

Member Function Documentation

◆ dx()

CCGFloat PreshowerStrip::dx ( ) const
inline

Definition at line 40 of file PreshowerStrip.h.

40 { return param()[0]; }

References CaloCellGeometry::param().

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

◆ dy()

CCGFloat PreshowerStrip::dy ( ) const
inline

Definition at line 41 of file PreshowerStrip.h.

41 { return param()[1]; }

References CaloCellGeometry::param().

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

◆ dz()

CCGFloat PreshowerStrip::dz ( ) const
inline

◆ getTransform()

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 {}

◆ initCorners()

void PreshowerStrip::initCorners ( CaloCellGeometry::CornersVec corners)
overrideprivatevirtual

Implements CaloCellGeometry.

Definition at line 22 of file PreshowerStrip.cc.

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 }

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

◆ localCorners()

void PreshowerStrip::localCorners ( Pt3DVec vec,
const CCGFloat pv,
Pt3D ref 
)
static

Definition at line 66 of file PreshowerStrip.cc.

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 }

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

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

◆ operator=()

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 }

◆ tilt()

CCGFloat PreshowerStrip::tilt ( ) const
inline

Definition at line 43 of file PreshowerStrip.h.

43 { return param()[3]; }

References CaloCellGeometry::param().

Referenced by initCorners().

◆ vocalCorners()

void PreshowerStrip::vocalCorners ( Pt3DVec vec,
const CCGFloat pv,
Pt3D ref 
) const
inlineoverridevirtual

Implements CaloCellGeometry.

Definition at line 45 of file PreshowerStrip.h.

45 { localCorners(vec, pv, ref); }

References localCorners(), and MetAnalyzer::pv().

PreshowerStrip::dz
CCGFloat dz() const
Definition: PreshowerStrip.h:42
DDAxes::y
mps_fire.i
i
Definition: mps_fire.py:355
PreshowerStrip::dx
CCGFloat dx() const
Definition: PreshowerStrip.h:40
CCGFloat
CaloCellGeometry::CCGFloat CCGFloat
Definition: CaloCellGeometry.cc:4
cms::cuda::assert
assert(be >=bs)
DDAxes::x
PreshowerStrip::tilt
CCGFloat tilt() const
Definition: PreshowerStrip.h:43
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
DDAxes::z
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
Point3DBase< float, GlobalTag >
CaloCellGeometry::initSpan
void initSpan()
Definition: CaloCellGeometry.h:120
CaloCellGeometry::getPosition
virtual const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
Definition: CaloCellGeometry.h:80
dqmiodatasetharvest.ctr
ctr
Definition: dqmiodatasetharvest.py:191
CaloCellGeometry::param
const CCGFloat * param() const
Definition: CaloCellGeometry.h:99
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
fftjetcommon_cfi.sy
sy
Definition: fftjetcommon_cfi.py:203
PreshowerStrip::dy
CCGFloat dy() const
Definition: PreshowerStrip.h:41
CaloCellGeometry::CaloCellGeometry
CaloCellGeometry(void)
Definition: CaloCellGeometry.cc:19
PreshowerStrip::localCorners
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
Definition: PreshowerStrip.cc:66
EZArrayFL::uninitialized
bool uninitialized() const
Definition: EZArrayFL.h:63
PreshowerStrip::Pt3D
CaloCellGeometry::Pt3D Pt3D
Definition: PreshowerStrip.h:24
fftjetcommon_cfi.sx
sx
Definition: fftjetcommon_cfi.py:202