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 | Private Attributes
IdealZPrism Class Referencefinal

#include <IdealZPrism.h>

Inheritance diagram for IdealZPrism:
CaloCellGeometry

Public Types

typedef CaloCellGeometry::CCGFloat CCGFloat
 
enum  DEPTH { None, EM, HADR }
 
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
 
std::shared_ptr< const IdealZPrismforPF () const
 
 IdealZPrism ()
 
 IdealZPrism (const GlobalPoint &faceCenter, CornersMgr *mgr, const CCGFloat *parm, IdealZPrism::DEPTH depth)
 
 IdealZPrism (const IdealZPrism &idzp)
 
IdealZPrismoperator= (const IdealZPrism &idzp)
 
void vocalCorners (Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref) const override
 
CCGFloat z () const
 
 ~IdealZPrism () 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 etaPhiR (float eta, float phi, float rad)
 
static GlobalPoint etaPhiZ (float eta, float phi, float z)
 

Private Attributes

std::unique_ptr< IdealZPrismm_geoForPF
 

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

Prism class used for HF volumes. HF volumes are prisms with axes along the Z direction whose face shapes are set by

Required parameters for an ideal Z prism:

Total: 6 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 HALF-widths and the tower z thickness.

Author
J. Mans - Minnesota

Definition at line 26 of file IdealZPrism.h.

Member Typedef Documentation

◆ CCGFloat

Definition at line 30 of file IdealZPrism.h.

◆ Pt3D

Definition at line 31 of file IdealZPrism.h.

◆ Pt3DVec

Definition at line 32 of file IdealZPrism.h.

Member Enumeration Documentation

◆ DEPTH

Enumerator
None 
EM 
HADR 

Definition at line 28 of file IdealZPrism.h.

28 { None, EM, HADR };

Constructor & Destructor Documentation

◆ IdealZPrism() [1/3]

IdealZPrism::IdealZPrism ( )

Definition at line 9 of file IdealZPrism.cc.

9 : CaloCellGeometry() {}

◆ IdealZPrism() [2/3]

IdealZPrism::IdealZPrism ( const IdealZPrism idzp)

Definition at line 27 of file IdealZPrism.cc.

27  : CaloCellGeometry(idzp) {
28  if (idzp.forPF())
29  m_geoForPF = std::make_unique<IdealZPrism>(*idzp.forPF());
30 }

References forPF(), and m_geoForPF.

◆ IdealZPrism() [3/3]

IdealZPrism::IdealZPrism ( const GlobalPoint faceCenter,
CornersMgr mgr,
const CCGFloat parm,
IdealZPrism::DEPTH  depth 
)

Definition at line 41 of file IdealZPrism.cc.

42  : CaloCellGeometry(faceCenter, mgr, parm),
43  m_geoForPF(depth == None ? nullptr : new IdealZPrism(correct(faceCenter, depth), mgr, parm, None)) {
44  initSpan();
45 }

References CaloCellGeometry::initSpan().

◆ ~IdealZPrism()

IdealZPrism::~IdealZPrism ( )
override

Definition at line 47 of file IdealZPrism.cc.

47 {}

Member Function Documentation

◆ dEta()

CCGFloat IdealZPrism::dEta ( ) const

Definition at line 49 of file IdealZPrism.cc.

49 { return param()[IdealZPrism::k_dEta]; }

References k_dEta, and CaloCellGeometry::param().

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

◆ dPhi()

CCGFloat IdealZPrism::dPhi ( ) const

Definition at line 51 of file IdealZPrism.cc.

51 { return param()[IdealZPrism::k_dPhi]; }

References k_dPhi, and CaloCellGeometry::param().

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

◆ dz()

CCGFloat IdealZPrism::dz ( ) const

◆ eta()

CCGFloat IdealZPrism::eta ( void  ) const

◆ etaPhiPerp()

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

Definition at line 65 of file IdealZPrism.cc.

65  {
66  return GlobalPoint(perp * cosf(phi), perp * sinf(phi), perp * sinhf(eta));
67 }

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

◆ etaPhiR()

GlobalPoint IdealZPrism::etaPhiR ( float  eta,
float  phi,
float  rad 
)
staticprivate

Definition at line 61 of file IdealZPrism.cc.

61  {
62  return GlobalPoint(rad * cosf(phi) / coshf(eta), rad * sinf(phi) / coshf(eta), rad * tanhf(eta));
63 }

References eta(), and phi.

◆ etaPhiZ()

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

Definition at line 69 of file IdealZPrism.cc.

69  {
70  return GlobalPoint(z * cosf(phi) / sinhf(eta), z * sinf(phi) / sinhf(eta), z);
71 }

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

Referenced by initCorners(), and localCorners().

◆ forPF()

std::shared_ptr<const IdealZPrism> IdealZPrism::forPF ( ) const
inline

Definition at line 61 of file IdealZPrism.h.

61  {
62  static const auto do_not_delete = [](const void*) {};
63  auto cell = std::shared_ptr<const IdealZPrism>(m_geoForPF.get(), do_not_delete);
64  return cell;
65  }

References m_geoForPF.

Referenced by IdealZPrism(), and operator=().

◆ initCorners()

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

Implements CaloCellGeometry.

Definition at line 105 of file IdealZPrism.cc.

105  {
106  if (co.uninitialized()) {
107  CornersVec& corners(co);
108 
109  const GlobalPoint p(getPosition());
110  const CCGFloat z_near(p.z());
111  const CCGFloat z_far(z_near + 2 * dz() * p.z() / fabs(p.z()));
112  const CCGFloat eta(p.eta());
113  const CCGFloat phi(p.phi());
114 
115  corners[0] = etaPhiZ(eta + dEta(), phi + dPhi(), z_near); // (+,+,near)
116  corners[1] = etaPhiZ(eta + dEta(), phi - dPhi(), z_near); // (+,-,near)
117  corners[2] = etaPhiZ(eta - dEta(), phi - dPhi(), z_near); // (-,-,near)
118  corners[3] = etaPhiZ(eta - dEta(), phi + dPhi(), z_near); // (-,+,near)
119  corners[4] = GlobalPoint(corners[0].x(), corners[0].y(), z_far); // (+,+,far)
120  corners[5] = GlobalPoint(corners[1].x(), corners[1].y(), z_far); // (+,-,far)
121  corners[6] = GlobalPoint(corners[2].x(), corners[2].y(), z_far); // (-,-,far)
122  corners[7] = GlobalPoint(corners[3].x(), corners[3].y(), z_far); // (-,+,far)
123  }
124 }

References cms::cuda::co, dEta(), dPhi(), dz(), eta(), etaPhiZ(), CaloCellGeometry::getPosition(), AlCaHLTBitMon_ParallelJobs::p, phi, x, and y.

◆ localCorners()

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

Definition at line 73 of file IdealZPrism.cc.

73  {
74  assert(8 == lc.size());
75  assert(nullptr != pv);
76 
81  const CCGFloat z(pv[IdealZPrism::k_Z]);
82 
83  std::vector<GlobalPoint> gc(8, GlobalPoint(0, 0, 0));
84 
85  const GlobalPoint p(etaPhiZ(eta, 0, z));
86 
87  const float z_near(z);
88  const float z_far(z * (1 - 2 * dz / p.mag()));
89  gc[0] = etaPhiZ(eta + dEta, +dPhi, z_near); // (+,+,near)
90  gc[1] = etaPhiZ(eta + dEta, -dPhi, z_near); // (+,-,near)
91  gc[2] = etaPhiZ(eta - dEta, -dPhi, z_near); // (-,-,near)
92  gc[3] = etaPhiZ(eta - dEta, +dPhi, z_near); // (-,+,far)
93  gc[4] = GlobalPoint(gc[0].x(), gc[0].y(), z_far); // (+,+,far)
94  gc[5] = GlobalPoint(gc[1].x(), gc[1].y(), z_far); // (+,-,far)
95  gc[6] = GlobalPoint(gc[2].x(), gc[2].y(), z_far); // (-,-,far)
96  gc[7] = GlobalPoint(gc[3].x(), gc[3].y(), z_far); // (-,+,far)
97 
98  for (unsigned int i(0); i != 8; ++i) {
99  lc[i] = Pt3D(gc[i].x(), gc[i].y(), gc[i].z());
100  }
101 
102  ref = 0.25 * (lc[0] + lc[1] + lc[2] + lc[3]);
103 }

References cms::cuda::assert(), dEta(), dPhi(), dz(), eta(), 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::addHcalCaloGeometryForward(), HcalGeometry::localCorners(), and vocalCorners().

◆ operator=()

IdealZPrism & IdealZPrism::operator= ( const IdealZPrism idzp)

Definition at line 32 of file IdealZPrism.cc.

32  {
33  if (&idzp != this) {
34  CaloCellGeometry::operator=(idzp);
35  if (idzp.forPF())
36  m_geoForPF = std::make_unique<IdealZPrism>(*idzp.forPF());
37  }
38  return *this;
39 }

References forPF(), and m_geoForPF.

◆ vocalCorners()

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

Implements CaloCellGeometry.

Definition at line 59 of file IdealZPrism.cc.

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

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

◆ z()

CCGFloat IdealZPrism::z ( ) const

Member Data Documentation

◆ k_dEta

constexpr uint32_t IdealZPrism::k_dEta = 0
staticconstexpr

Definition at line 34 of file IdealZPrism.h.

Referenced by dEta(), and localCorners().

◆ k_dPhi

constexpr uint32_t IdealZPrism::k_dPhi = 1
staticconstexpr

Definition at line 35 of file IdealZPrism.h.

Referenced by dPhi(), and localCorners().

◆ k_dZ

constexpr uint32_t IdealZPrism::k_dZ = 2
staticconstexpr

Definition at line 36 of file IdealZPrism.h.

Referenced by dz(), and localCorners().

◆ k_Eta

constexpr uint32_t IdealZPrism::k_Eta = 3
staticconstexpr

Definition at line 37 of file IdealZPrism.h.

Referenced by eta(), and localCorners().

◆ k_Z

constexpr uint32_t IdealZPrism::k_Z = 4
staticconstexpr

Definition at line 38 of file IdealZPrism.h.

Referenced by localCorners(), and z().

◆ m_geoForPF

std::unique_ptr<IdealZPrism> IdealZPrism::m_geoForPF
private

Definition at line 78 of file IdealZPrism.h.

Referenced by forPF(), IdealZPrism(), and operator=().

IdealZPrism::dPhi
CCGFloat dPhi() const
Definition: IdealZPrism.cc:51
DDAxes::y
IdealZPrism::z
CCGFloat z() const
Definition: IdealZPrism.cc:57
mps_fire.i
i
Definition: mps_fire.py:428
IdealZPrism::HADR
Definition: IdealZPrism.h:28
IdealZPrism::etaPhiZ
static GlobalPoint etaPhiZ(float eta, float phi, float z)
Definition: IdealZPrism.cc:69
IdealZPrism::k_dEta
static constexpr uint32_t k_dEta
Definition: IdealZPrism.h:34
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
CCGFloat
CaloCellGeometry::CCGFloat CCGFloat
Definition: CaloCellGeometry.cc:4
IdealZPrism::IdealZPrism
IdealZPrism()
Definition: IdealZPrism.cc:9
IdealZPrism::k_dZ
static constexpr uint32_t k_dZ
Definition: IdealZPrism.h:36
cms::cuda::assert
assert(be >=bs)
DDAxes::x
perp
T perp() const
Magnitude of transverse component.
Definition: Basic3DVectorLD.h:133
IdealZPrism::dz
CCGFloat dz() const
Definition: IdealZPrism.cc:53
IdealZPrism::eta
CCGFloat eta() const
Definition: IdealZPrism.cc:55
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
IdealZPrism::k_Z
static constexpr uint32_t k_Z
Definition: IdealZPrism.h:38
Point3DBase< float, GlobalTag >
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
CaloCellGeometry::initSpan
void initSpan()
Definition: CaloCellGeometry.h:120
IdealZPrism::k_dPhi
static constexpr uint32_t k_dPhi
Definition: IdealZPrism.h:35
CaloCellGeometry::getPosition
virtual const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
Definition: CaloCellGeometry.h:80
IdealZPrism::localCorners
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
Definition: IdealZPrism.cc:73
CaloCellGeometry::param
const CCGFloat * param() const
Definition: CaloCellGeometry.h:99
IdealZPrism::k_Eta
static constexpr uint32_t k_Eta
Definition: IdealZPrism.h:37
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
IdealZPrism::m_geoForPF
std::unique_ptr< IdealZPrism > m_geoForPF
Definition: IdealZPrism.h:78
IdealZPrism::EM
Definition: IdealZPrism.h:28
DDAxes::phi
CaloCellGeometry::CornersVec
EZArrayFL< GlobalPoint > CornersVec
Definition: CaloCellGeometry.h:57
IdealZPrism::Pt3D
CaloCellGeometry::Pt3D Pt3D
Definition: IdealZPrism.h:31
IdealZPrism::None
Definition: IdealZPrism.h:28
cms::cuda::co
VT * co
Definition: prefixScan.h:46
CaloCellGeometry::CaloCellGeometry
CaloCellGeometry(void)
Definition: CaloCellGeometry.cc:19
IdealZPrism::forPF
std::shared_ptr< const IdealZPrism > forPF() const
Definition: IdealZPrism.h:61
IdealZPrism::dEta
CCGFloat dEta() const
Definition: IdealZPrism.cc:49