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
IdealZDCTrapezoid Class Reference

#include <IdealZDCTrapezoid.h>

Inheritance diagram for IdealZDCTrapezoid:
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 an () const
 
CCGFloat dt () const
 
CCGFloat dx () const
 
CCGFloat dy () const
 
CCGFloat dz () const
 
 IdealZDCTrapezoid ()
 
 IdealZDCTrapezoid (const IdealZDCTrapezoid &idzt)
 
 IdealZDCTrapezoid (const GlobalPoint &faceCenter, CornersMgr *mgr, const CCGFloat *parm)
 
IdealZDCTrapezoidoperator= (const IdealZDCTrapezoid &idzt)
 
CCGFloat ta () const
 
void vocalCorners (Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref) const override
 
 ~IdealZDCTrapezoid () 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
 
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 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

Trapezoid class used for ZDC volumes.

Required parameters for an ideal zdc trapezoid:

Total: 7 parameters

Revision:
1.9
Author
E. Garcia - UIC

Definition at line 22 of file IdealZDCTrapezoid.h.

Member Typedef Documentation

Definition at line 24 of file IdealZDCTrapezoid.h.

Definition at line 25 of file IdealZDCTrapezoid.h.

Definition at line 26 of file IdealZDCTrapezoid.h.

Definition at line 27 of file IdealZDCTrapezoid.h.

Constructor & Destructor Documentation

IdealZDCTrapezoid::IdealZDCTrapezoid ( )

Definition at line 8 of file IdealZDCTrapezoid.cc.

IdealZDCTrapezoid::IdealZDCTrapezoid ( const IdealZDCTrapezoid idzt)

Definition at line 10 of file IdealZDCTrapezoid.cc.

10 : CaloCellGeometry(idzt) { *this = idzt; }
IdealZDCTrapezoid::IdealZDCTrapezoid ( const GlobalPoint faceCenter,
CornersMgr mgr,
const CCGFloat parm 
)

Definition at line 18 of file IdealZDCTrapezoid.cc.

References CaloCellGeometry::initSpan().

19  : CaloCellGeometry(faceCenter, mgr, parm) {
20  initSpan();
21 }
IdealZDCTrapezoid::~IdealZDCTrapezoid ( )
override

Definition at line 23 of file IdealZDCTrapezoid.cc.

23 {}

Member Function Documentation

CCGFloat IdealZDCTrapezoid::an ( ) const

Definition at line 25 of file IdealZDCTrapezoid.cc.

References CaloCellGeometry::param().

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

25 { return param()[0]; }
const CCGFloat * param() const
CCGFloat IdealZDCTrapezoid::dt ( ) const

Definition at line 35 of file IdealZDCTrapezoid.cc.

References dy(), and ta().

Referenced by localCorners().

35 { return dy() * ta(); }
CCGFloat dy() const
CCGFloat ta() const
CCGFloat IdealZDCTrapezoid::dx ( ) const

Definition at line 27 of file IdealZDCTrapezoid.cc.

References CaloCellGeometry::param().

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

27 { return param()[1]; }
const CCGFloat * param() const
CCGFloat IdealZDCTrapezoid::dy ( ) const

Definition at line 29 of file IdealZDCTrapezoid.cc.

References CaloCellGeometry::param().

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

29 { return param()[2]; }
const CCGFloat * param() const
CCGFloat IdealZDCTrapezoid::dz ( ) const

Definition at line 31 of file IdealZDCTrapezoid.cc.

References CaloCellGeometry::param().

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

31 { return param()[3]; }
const CCGFloat * param() const
void IdealZDCTrapezoid::initCorners ( CaloCellGeometry::CornersVec corners)
overrideprivatevirtual

Implements CaloCellGeometry.

Definition at line 62 of file IdealZDCTrapezoid.cc.

References dx(), dz(), CaloCellGeometry::getPosition(), gf, mps_fire::i, localCorners(), eostools::ls(), AlCaHLTBitMon_ParallelJobs::p, CaloCellGeometry::param(), EZArrayFL< T >::uninitialized(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

62  {
63  if (corners.uninitialized()) {
64  const GlobalPoint& p(getPosition());
65  const CCGFloat zsign(0 < p.z() ? 1. : -1.);
66  const Pt3D gf(p.x(), p.y(), p.z());
67 
68  Pt3D lf;
69  Pt3DVec lc(8, Pt3D(0, 0, 0));
70  localCorners(lc, param(), lf);
71  const Pt3D lb(lf.x(), lf.y(), lf.z() - 2. * dz());
72  const Pt3D ls(lf.x() - dx(), lf.y(), lf.z());
73 
74  const Pt3D gb(gf.x(), gf.y(), gf.z() + 2. * zsign * dz());
75 
76  const Pt3D gs(gf.x() - zsign * dx(), gf.y(), gf.z());
77 
78  const HepGeom::Transform3D tr(lf, lb, ls, gf, gb, gs);
79 
80  for (unsigned int i(0); i != 8; ++i) {
81  const Pt3D gl(tr * lc[i]);
82  corners[i] = GlobalPoint(gl.x(), gl.y(), gl.z());
83  }
84  }
85 }
virtual const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
def ls
Definition: eostools.py:349
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
CCGFloat dx() const
const CCGFloat * param() const
CaloCellGeometry::CCGFloat CCGFloat
CaloCellGeometry::Pt3D Pt3D
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
CaloCellGeometry::Pt3DVec Pt3DVec
CCGFloat dz() const
bool uninitialized() const
Definition: EZArrayFL.h:63
double gf
Definition: hdecay.h:34
CaloCellGeometry::Pt3D Pt3D
void IdealZDCTrapezoid::localCorners ( Pt3DVec vec,
const CCGFloat pv,
Pt3D ref 
)
static

Definition at line 39 of file IdealZDCTrapezoid.cc.

References an(), cms::cuda::assert(), dt(), dx(), dy(), dz(), ta(), and funct::tan().

Referenced by initCorners(), ZdcGeometry::localCorners(), and vocalCorners().

39  {
40  assert(8 == lc.size());
41  assert(nullptr != pv);
42 
43  const CCGFloat an(pv[0]);
44  const CCGFloat dx(pv[1]);
45  const CCGFloat dy(pv[2]);
46  const CCGFloat dz(pv[3]);
47  const CCGFloat ta(tan(an));
48  const CCGFloat dt(dy * ta);
49 
50  lc[0] = Pt3D(-dx, -dy, +dz + dt);
51  lc[1] = Pt3D(-dx, +dy, +dz - dt);
52  lc[2] = Pt3D(+dx, +dy, +dz - dt);
53  lc[3] = Pt3D(+dx, -dy, +dz + dt);
54  lc[4] = Pt3D(-dx, -dy, -dz + dt);
55  lc[5] = Pt3D(-dx, +dy, -dz - dt);
56  lc[6] = Pt3D(+dx, +dy, -dz - dt);
57  lc[7] = Pt3D(+dx, -dy, -dz + dt);
58 
59  ref = 0.25 * (lc[0] + lc[1] + lc[2] + lc[3]);
60 }
CCGFloat dy() const
CCGFloat dx() const
assert(be >=bs)
CCGFloat an() const
CCGFloat ta() const
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
CaloCellGeometry::CCGFloat CCGFloat
CCGFloat dt() const
CCGFloat dz() const
CaloCellGeometry::Pt3D Pt3D
IdealZDCTrapezoid & IdealZDCTrapezoid::operator= ( const IdealZDCTrapezoid idzt)

Definition at line 12 of file IdealZDCTrapezoid.cc.

12  {
13  if (&idzt != this)
14  CaloCellGeometry::operator=(idzt);
15  return *this;
16 }
CCGFloat IdealZDCTrapezoid::ta ( ) const

Definition at line 33 of file IdealZDCTrapezoid.cc.

References an(), and funct::tan().

Referenced by dt(), and localCorners().

33 { return tan(an()); }
CCGFloat an() const
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
void IdealZDCTrapezoid::vocalCorners ( Pt3DVec vec,
const CCGFloat pv,
Pt3D ref 
) const
overridevirtual

Implements CaloCellGeometry.

Definition at line 37 of file IdealZDCTrapezoid.cc.

References localCorners().

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