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 8 of file IdealZPrism.cc.

8 : CaloCellGeometry() {}

◆ IdealZPrism() [2/3]

IdealZPrism::IdealZPrism ( const IdealZPrism idzp)

Definition at line 26 of file IdealZPrism.cc.

26  : CaloCellGeometry(idzp) {
27  if (idzp.forPF())
28  m_geoForPF.reset(new IdealZPrism(*idzp.forPF()));
29 }

References forPF(), and m_geoForPF.

◆ IdealZPrism() [3/3]

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

Definition at line 40 of file IdealZPrism.cc.

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

References CaloCellGeometry::initSpan().

◆ ~IdealZPrism()

IdealZPrism::~IdealZPrism ( )
override

Definition at line 46 of file IdealZPrism.cc.

46 {}

Member Function Documentation

◆ dEta()

CCGFloat IdealZPrism::dEta ( ) const

Definition at line 48 of file IdealZPrism.cc.

48 { 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 50 of file IdealZPrism.cc.

50 { 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 64 of file IdealZPrism.cc.

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

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

◆ etaPhiR()

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

Definition at line 60 of file IdealZPrism.cc.

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

References eta(), and phi.

◆ etaPhiZ()

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

Definition at line 68 of file IdealZPrism.cc.

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

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 104 of file IdealZPrism.cc.

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

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 72 of file IdealZPrism.cc.

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

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 31 of file IdealZPrism.cc.

31  {
32  if (&idzp != this) {
33  CaloCellGeometry::operator=(idzp);
34  if (idzp.forPF())
35  m_geoForPF.reset(new IdealZPrism(*idzp.forPF()));
36  }
37  return *this;
38 }

References forPF(), and m_geoForPF.

◆ vocalCorners()

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

Implements CaloCellGeometry.

Definition at line 58 of file IdealZPrism.cc.

58 { 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:50
DDAxes::y
IdealZPrism::z
CCGFloat z() const
Definition: IdealZPrism.cc:56
mps_fire.i
i
Definition: mps_fire.py:355
IdealZPrism::HADR
Definition: IdealZPrism.h:28
IdealZPrism::etaPhiZ
static GlobalPoint etaPhiZ(float eta, float phi, float z)
Definition: IdealZPrism.cc:68
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:8
IdealZPrism::k_dZ
static constexpr uint32_t k_dZ
Definition: IdealZPrism.h:36
cms::cuda::assert
assert(be >=bs)
DDAxes::x
cms::cuda::co
T *__restrict__ co
Definition: prefixScan.h:46
perp
T perp() const
Magnitude of transverse component.
Definition: Basic3DVectorLD.h:133
IdealZPrism::dz
CCGFloat dz() const
Definition: IdealZPrism.cc:52
IdealZPrism::eta
CCGFloat eta() const
Definition: IdealZPrism.cc:54
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
IdealZPrism::k_Z
static constexpr uint32_t k_Z
Definition: IdealZPrism.h:38
Point3DBase< float, GlobalTag >
IdealZPrism
Definition: IdealZPrism.h:26
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:72
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
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:48