CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Member Functions
IdealObliquePrism Class Reference

#include <IdealObliquePrism.h>

Inheritance diagram for IdealObliquePrism:
CaloCellGeometry

Public Types

typedef CaloCellGeometry::CCGFloat CCGFloat
 
typedef CaloCellGeometry::Pt3D Pt3D
 
typedef CaloCellGeometry::Pt3DVec Pt3DVec
 
- 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 dEta () const
 
CCGFloat dPhi () const
 
CCGFloat dz () const
 
CCGFloat eta () const
 
 IdealObliquePrism ()
 
 IdealObliquePrism (const GlobalPoint &faceCenter, CornersMgr *mgr, const CCGFloat *parm)
 
 IdealObliquePrism (const IdealObliquePrism &idop)
 
IdealObliquePrismoperator= (const IdealObliquePrism &idop)
 
void vocalCorners (Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref) const override
 
CCGFloat z () const
 
 ~IdealObliquePrism () 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)
 

Static Public Attributes

static constexpr uint32_t k_dEta = 0
 
static constexpr uint32_t k_dPhi = 1
 
static constexpr uint32_t k_dZ = 2
 
static constexpr uint32_t k_Eta = 3
 
static constexpr uint32_t k_Z = 4
 
- Static Public Attributes inherited from CaloCellGeometry
static constexpr unsigned int k_cornerSize = 8
 
static const CCGFloat k_ScaleFromDDDtoGeant
 

Private Member Functions

void initCorners (CornersVec &) override
 

Static Private Member Functions

static GlobalPoint etaPhiPerp (float eta, float phi, float perp)
 
static GlobalPoint etaPhiZ (float eta, float phi, float z)
 

Additional Inherited Members

- 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

Oblique prism class used for HCAL (HB, HE, HO) volumes.

Required parameters for an ideal oblique prism:

Total: 6+1 parameters

Internally, the "point of reference" is the center (eta/phi) of the front face of the prism. Therefore, the only internally stored parameters are eta and phi widths, the axis tower thickness, and the parallel/perpendicular setting. The parallel/perpendicular setting is encoded in the sign of the thickness. (positive = parallel to z-axis, negative = perpendicular)

Author
J. Mans - Minnesota

Definition at line 28 of file IdealObliquePrism.h.

Member Typedef Documentation

◆ CCGFloat

Definition at line 30 of file IdealObliquePrism.h.

◆ Pt3D

Definition at line 31 of file IdealObliquePrism.h.

◆ Pt3DVec

Definition at line 32 of file IdealObliquePrism.h.

Constructor & Destructor Documentation

◆ IdealObliquePrism() [1/3]

IdealObliquePrism::IdealObliquePrism ( )

Definition at line 8 of file IdealObliquePrism.cc.

8 : CaloCellGeometry() {}

◆ IdealObliquePrism() [2/3]

IdealObliquePrism::IdealObliquePrism ( const IdealObliquePrism idop)

Definition at line 10 of file IdealObliquePrism.cc.

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

◆ IdealObliquePrism() [3/3]

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

Definition at line 18 of file IdealObliquePrism.cc.

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

References CaloCellGeometry::initSpan().

◆ ~IdealObliquePrism()

IdealObliquePrism::~IdealObliquePrism ( )
override

Definition at line 23 of file IdealObliquePrism.cc.

23 {}

Member Function Documentation

◆ dEta()

CCGFloat IdealObliquePrism::dEta ( ) const

Definition at line 25 of file IdealObliquePrism.cc.

25 { return param()[IdealObliquePrism::k_dEta]; }

References k_dEta, and CaloCellGeometry::param().

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

◆ dPhi()

CCGFloat IdealObliquePrism::dPhi ( ) const

Definition at line 27 of file IdealObliquePrism.cc.

27 { return param()[IdealObliquePrism::k_dPhi]; }

References k_dPhi, and CaloCellGeometry::param().

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

◆ dz()

CCGFloat IdealObliquePrism::dz ( ) const

◆ eta()

CCGFloat IdealObliquePrism::eta ( void  ) const

◆ etaPhiPerp()

GlobalPoint IdealObliquePrism::etaPhiPerp ( float  eta,
float  phi,
float  perp 
)
staticprivate

Definition at line 37 of file IdealObliquePrism.cc.

37  {
38  return GlobalPoint(perp * cosf(phi), perp * sinf(phi), perp * sinhf(eta));
39 }

References eta(), perp(), and phi.

Referenced by initCorners(), and localCorners().

◆ etaPhiZ()

GlobalPoint IdealObliquePrism::etaPhiZ ( float  eta,
float  phi,
float  z 
)
staticprivate

Definition at line 41 of file IdealObliquePrism.cc.

41  {
42  return GlobalPoint(z * cosf(phi) / sinhf(eta), z * sinf(phi) / sinhf(eta), z);
43 }

References eta(), phi, and z().

Referenced by initCorners(), and localCorners().

◆ initCorners()

void IdealObliquePrism::initCorners ( CaloCellGeometry::CornersVec co)
overrideprivatevirtual

Implements CaloCellGeometry.

Definition at line 89 of file IdealObliquePrism.cc.

89  {
90  if (co.uninitialized()) {
91  CornersVec& corners(co);
92  if (dz() > 0) {
93  /* In this case, the faces are parallel to the zaxis.
94  This implies that all corners will have the same
95  cylindrical radius.
96  */
97  const GlobalPoint p(getPosition());
98  const CCGFloat r_near(p.perp() / cos(dPhi()));
99  const CCGFloat r_far(r_near * ((p.mag() + 2 * dz()) / p.mag()));
100  const CCGFloat eta(p.eta());
101  const CCGFloat phi(p.phi());
102  corners[0] = etaPhiPerp(eta + dEta(), phi + dPhi(), r_near); // (+,+,near)
103  corners[1] = etaPhiPerp(eta + dEta(), phi - dPhi(), r_near); // (+,-,near)
104  corners[2] = etaPhiPerp(eta - dEta(), phi - dPhi(), r_near); // (-,-,near)
105  corners[3] = etaPhiPerp(eta - dEta(), phi + dPhi(), r_near); // (-,+,near)
106  corners[4] = etaPhiPerp(eta + dEta(), phi + dPhi(), r_far); // (+,+,far)
107  corners[5] = etaPhiPerp(eta + dEta(), phi - dPhi(), r_far); // (+,-,far)
108  corners[6] = etaPhiPerp(eta - dEta(), phi - dPhi(), r_far); // (-,-,far)
109  corners[7] = etaPhiPerp(eta - dEta(), phi + dPhi(), r_far); // (-,+,far)
110  } else {
111  /* In this case, the faces are perpendicular to the zaxis.
112  This implies that all corners will have the same
113  z-dimension.
114  */
115  const GlobalPoint p(getPosition());
116  const CCGFloat z_near(p.z());
117  const CCGFloat mag(p.mag());
118  const CCGFloat z_far(z_near * (1 - 2 * dz() / mag)); // negative to correct sign
119  const CCGFloat eta(p.eta());
120  const CCGFloat phi(p.phi());
121 
122  corners[0] = etaPhiZ(eta + dEta(), phi + dPhi(), z_near); // (+,+,near)
123  corners[1] = etaPhiZ(eta + dEta(), phi - dPhi(), z_near); // (+,-,near)
124  corners[2] = etaPhiZ(eta - dEta(), phi - dPhi(), z_near); // (-,-,near)
125  corners[3] = etaPhiZ(eta - dEta(), phi + dPhi(), z_near); // (-,+,near)
126  corners[4] = etaPhiZ(eta + dEta(), phi + dPhi(), z_far); // (+,+,far)
127  corners[5] = etaPhiZ(eta + dEta(), phi - dPhi(), z_far); // (+,-,far)
128  corners[6] = etaPhiZ(eta - dEta(), phi - dPhi(), z_far); // (-,-,far)
129  corners[7] = etaPhiZ(eta - dEta(), phi + dPhi(), z_far); // (-,+,far)
130  }
131  }
132 }

References cms::cuda::co, funct::cos(), dEta(), dPhi(), dz(), eta(), etaPhiPerp(), etaPhiZ(), CaloCellGeometry::getPosition(), mag(), AlCaHLTBitMon_ParallelJobs::p, and phi.

◆ localCorners()

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

Definition at line 45 of file IdealObliquePrism.cc.

45  {
46  assert(8 == lc.size());
47  assert(nullptr != pv);
48 
54 
55  std::vector<GlobalPoint> gc(8, GlobalPoint(0, 0, 0));
56 
57  const GlobalPoint p(etaPhiZ(eta, 0, z));
58 
59  if (0 < dz) {
60  const CCGFloat r_near(p.perp() / cos(dPhi));
61  const CCGFloat r_far(r_near * ((p.mag() + 2 * dz) / p.mag()));
62  gc[0] = etaPhiPerp(eta + dEta, +dPhi, r_near); // (+,+,near)
63  gc[1] = etaPhiPerp(eta + dEta, -dPhi, r_near); // (+,-,near)
64  gc[2] = etaPhiPerp(eta - dEta, -dPhi, r_near); // (-,-,near)
65  gc[3] = etaPhiPerp(eta - dEta, +dPhi, r_near); // (-,+,near)
66  gc[4] = etaPhiPerp(eta + dEta, +dPhi, r_far); // (+,+,far)
67  gc[5] = etaPhiPerp(eta + dEta, -dPhi, r_far); // (+,-,far)
68  gc[6] = etaPhiPerp(eta - dEta, -dPhi, r_far); // (-,-,far)
69  gc[7] = etaPhiPerp(eta - dEta, +dPhi, r_far); // (-,+,far)
70  } else {
71  const CCGFloat z_near(z);
72  const CCGFloat z_far(z * (1 - 2 * dz / p.mag()));
73  gc[0] = etaPhiZ(eta + dEta, +dPhi, z_near); // (+,+,near)
74  gc[1] = etaPhiZ(eta + dEta, -dPhi, z_near); // (+,-,near)
75  gc[2] = etaPhiZ(eta - dEta, -dPhi, z_near); // (-,-,near)
76  gc[3] = etaPhiZ(eta - dEta, +dPhi, z_near); // (-,+,near)
77  gc[4] = etaPhiZ(eta + dEta, +dPhi, z_far); // (+,+,far)
78  gc[5] = etaPhiZ(eta + dEta, -dPhi, z_far); // (+,-,far)
79  gc[6] = etaPhiZ(eta - dEta, -dPhi, z_far); // (-,-,far)
80  gc[7] = etaPhiZ(eta - dEta, +dPhi, z_far); // (-,+,far)
81  }
82  for (unsigned int i(0); i != 8; ++i) {
83  lc[i] = Pt3D(gc[i].x(), gc[i].y(), gc[i].z());
84  }
85 
86  ref = 0.25 * (lc[0] + lc[1] + lc[2] + lc[3]);
87 }

References cms::cuda::assert(), funct::cos(), dEta(), dPhi(), dz(), eta(), etaPhiPerp(), etaPhiZ(), mps_fire::i, k_dEta, k_dPhi, k_dZ, k_Eta, k_Z, AlCaHLTBitMon_ParallelJobs::p, MetAnalyzer::pv(), x, y, and z().

Referenced by FWTGeoRecoGeometryESProducer::addCaloTowerGeometry(), FWTGeoRecoGeometryESProducer::addHcalCaloGeometryBarrel(), FWTGeoRecoGeometryESProducer::addHcalCaloGeometryEndcap(), FWTGeoRecoGeometryESProducer::addHcalCaloGeometryOuter(), CaloTowerGeometry::localCorners(), HcalGeometry::localCorners(), and vocalCorners().

◆ operator=()

IdealObliquePrism & IdealObliquePrism::operator= ( const IdealObliquePrism idop)

Definition at line 12 of file IdealObliquePrism.cc.

12  {
13  if (&idop != this)
14  CaloCellGeometry::operator=(idop);
15  return *this;
16 }

◆ vocalCorners()

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

Implements CaloCellGeometry.

Definition at line 35 of file IdealObliquePrism.cc.

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

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

◆ z()

CCGFloat IdealObliquePrism::z ( ) const

Member Data Documentation

◆ k_dEta

constexpr uint32_t IdealObliquePrism::k_dEta = 0
staticconstexpr

Definition at line 34 of file IdealObliquePrism.h.

Referenced by dEta(), and localCorners().

◆ k_dPhi

constexpr uint32_t IdealObliquePrism::k_dPhi = 1
staticconstexpr

Definition at line 35 of file IdealObliquePrism.h.

Referenced by dPhi(), and localCorners().

◆ k_dZ

constexpr uint32_t IdealObliquePrism::k_dZ = 2
staticconstexpr

Definition at line 36 of file IdealObliquePrism.h.

Referenced by dz(), and localCorners().

◆ k_Eta

constexpr uint32_t IdealObliquePrism::k_Eta = 3
staticconstexpr

Definition at line 37 of file IdealObliquePrism.h.

Referenced by eta(), and localCorners().

◆ k_Z

constexpr uint32_t IdealObliquePrism::k_Z = 4
staticconstexpr

Definition at line 38 of file IdealObliquePrism.h.

Referenced by localCorners(), and z().

DDAxes::y
IdealObliquePrism::dEta
CCGFloat dEta() const
Definition: IdealObliquePrism.cc:25
mps_fire.i
i
Definition: mps_fire.py:428
IdealObliquePrism::k_Eta
static constexpr uint32_t k_Eta
Definition: IdealObliquePrism.h:37
CCGFloat
CaloCellGeometry::CCGFloat CCGFloat
Definition: CaloCellGeometry.cc:4
IdealObliquePrism::etaPhiZ
static GlobalPoint etaPhiZ(float eta, float phi, float z)
Definition: IdealObliquePrism.cc:41
cms::cuda::assert
assert(be >=bs)
DDAxes::x
perp
T perp() const
Magnitude of transverse component.
Definition: Basic3DVectorLD.h:133
IdealObliquePrism::dPhi
CCGFloat dPhi() const
Definition: IdealObliquePrism.cc:27
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
cms::cuda::co
__host__ __device__ VT * co
Definition: prefixScan.h:47
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
Point3DBase< float, GlobalTag >
IdealObliquePrism::z
CCGFloat z() const
Definition: IdealObliquePrism.cc:33
IdealObliquePrism::Pt3D
CaloCellGeometry::Pt3D Pt3D
Definition: IdealObliquePrism.h:31
IdealObliquePrism::localCorners
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
Definition: IdealObliquePrism.cc:45
CaloCellGeometry::initSpan
void initSpan()
Definition: CaloCellGeometry.h:120
IdealObliquePrism::k_dPhi
static constexpr uint32_t k_dPhi
Definition: IdealObliquePrism.h:35
CaloCellGeometry::getPosition
virtual const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
Definition: CaloCellGeometry.h:80
IdealObliquePrism::eta
CCGFloat eta() const
Definition: IdealObliquePrism.cc:31
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
CaloCellGeometry::param
const CCGFloat * param() const
Definition: CaloCellGeometry.h:99
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
IdealObliquePrism::k_Z
static constexpr uint32_t k_Z
Definition: IdealObliquePrism.h:38
DDAxes::phi
mag
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
Definition: Basic3DVectorLD.h:127
CaloCellGeometry::CornersVec
EZArrayFL< GlobalPoint > CornersVec
Definition: CaloCellGeometry.h:57
IdealObliquePrism::k_dZ
static constexpr uint32_t k_dZ
Definition: IdealObliquePrism.h:36
IdealObliquePrism::etaPhiPerp
static GlobalPoint etaPhiPerp(float eta, float phi, float perp)
Definition: IdealObliquePrism.cc:37
IdealObliquePrism::k_dEta
static constexpr uint32_t k_dEta
Definition: IdealObliquePrism.h:34
CaloCellGeometry::CaloCellGeometry
CaloCellGeometry(void)
Definition: CaloCellGeometry.cc:19
IdealObliquePrism::dz
CCGFloat dz() const
Definition: IdealObliquePrism.cc:29