CMS 3D CMS Logo

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< CCGFloatPt3D
 
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 GlobalPoint &faceCenter, CornersMgr *mgr, const CCGFloat *parm)
 
 IdealZDCTrapezoid (const IdealZDCTrapezoid &idzt)
 
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 (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

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

◆ CCGFloat

Definition at line 24 of file IdealZDCTrapezoid.h.

◆ Pt3D

Definition at line 25 of file IdealZDCTrapezoid.h.

◆ Pt3DVec

Definition at line 26 of file IdealZDCTrapezoid.h.

◆ Tr3D

Definition at line 27 of file IdealZDCTrapezoid.h.

Constructor & Destructor Documentation

◆ IdealZDCTrapezoid() [1/3]

IdealZDCTrapezoid::IdealZDCTrapezoid ( )

Definition at line 8 of file IdealZDCTrapezoid.cc.

8 : CaloCellGeometry() {}

◆ IdealZDCTrapezoid() [2/3]

IdealZDCTrapezoid::IdealZDCTrapezoid ( const IdealZDCTrapezoid idzt)

Definition at line 10 of file IdealZDCTrapezoid.cc.

10 : CaloCellGeometry(idzt) { *this = idzt; }

◆ IdealZDCTrapezoid() [3/3]

IdealZDCTrapezoid::IdealZDCTrapezoid ( const GlobalPoint faceCenter,
CornersMgr mgr,
const CCGFloat parm 
)

Definition at line 18 of file IdealZDCTrapezoid.cc.

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

References CaloCellGeometry::initSpan().

◆ ~IdealZDCTrapezoid()

IdealZDCTrapezoid::~IdealZDCTrapezoid ( )
override

Definition at line 23 of file IdealZDCTrapezoid.cc.

23 {}

Member Function Documentation

◆ an()

CCGFloat IdealZDCTrapezoid::an ( ) const

Definition at line 25 of file IdealZDCTrapezoid.cc.

25 { return param()[0]; }

References CaloCellGeometry::param().

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

◆ dt()

CCGFloat IdealZDCTrapezoid::dt ( ) const

Definition at line 35 of file IdealZDCTrapezoid.cc.

35 { return dy() * ta(); }

References dy(), and ta().

Referenced by localCorners().

◆ dx()

CCGFloat IdealZDCTrapezoid::dx ( ) const

Definition at line 27 of file IdealZDCTrapezoid.cc.

27 { return param()[1]; }

References CaloCellGeometry::param().

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

◆ dy()

CCGFloat IdealZDCTrapezoid::dy ( ) const

Definition at line 29 of file IdealZDCTrapezoid.cc.

29 { return param()[2]; }

References CaloCellGeometry::param().

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

◆ dz()

CCGFloat IdealZDCTrapezoid::dz ( ) const

◆ initCorners()

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

Implements CaloCellGeometry.

Definition at line 62 of file IdealZDCTrapezoid.cc.

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 }

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

◆ localCorners()

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

Definition at line 39 of file IdealZDCTrapezoid.cc.

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 }

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

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

◆ operator=()

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 }

◆ ta()

CCGFloat IdealZDCTrapezoid::ta ( ) const

Definition at line 33 of file IdealZDCTrapezoid.cc.

33 { return tan(an()); }

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

Referenced by dt(), and localCorners().

◆ vocalCorners()

void IdealZDCTrapezoid::vocalCorners ( Pt3DVec vec,
const CCGFloat pv,
Pt3D ref 
) const
overridevirtual

Implements CaloCellGeometry.

Definition at line 37 of file IdealZDCTrapezoid.cc.

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

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

eostools.ls
def ls(path, rec=False)
Definition: eostools.py:349
gf
double gf
Definition: hdecay.h:34
IdealZDCTrapezoid::dx
CCGFloat dx() const
Definition: IdealZDCTrapezoid.cc:27
mps_fire.i
i
Definition: mps_fire.py:355
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
CCGFloat
CaloCellGeometry::CCGFloat CCGFloat
Definition: CaloCellGeometry.cc:4
cms::cuda::assert
assert(be >=bs)
gs
Definition: AbsArchive.cc:45
Pt3D
CaloCellGeometry::Pt3D Pt3D
Definition: CaloCellGeometry.cc:5
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
Point3DBase< float, GlobalTag >
CaloCellGeometry::initSpan
void initSpan()
Definition: CaloCellGeometry.h:120
IdealZDCTrapezoid::an
CCGFloat an() const
Definition: IdealZDCTrapezoid.cc:25
CaloCellGeometry::getPosition
virtual const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
Definition: CaloCellGeometry.h:80
IdealZDCTrapezoid::dy
CCGFloat dy() const
Definition: IdealZDCTrapezoid.cc:29
IdealZDCTrapezoid::dz
CCGFloat dz() const
Definition: IdealZDCTrapezoid.cc:31
CaloCellGeometry::param
const CCGFloat * param() const
Definition: CaloCellGeometry.h:99
funct::tan
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
IdealZDCTrapezoid::localCorners
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
Definition: IdealZDCTrapezoid.cc:39
IdealZDCTrapezoid::dt
CCGFloat dt() const
Definition: IdealZDCTrapezoid.cc:35
Pt3DVec
CaloCellGeometry::Pt3DVec Pt3DVec
Definition: CaloCellGeometry.cc:6
IdealZDCTrapezoid::Pt3D
CaloCellGeometry::Pt3D Pt3D
Definition: IdealZDCTrapezoid.h:25
CaloCellGeometry::CaloCellGeometry
CaloCellGeometry(void)
Definition: CaloCellGeometry.cc:19
EZArrayFL::uninitialized
bool uninitialized() const
Definition: EZArrayFL.h:63
IdealZDCTrapezoid::ta
CCGFloat ta() const
Definition: IdealZDCTrapezoid.cc:33