CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
IdealZPrism.h
Go to the documentation of this file.
1 #ifndef GEOMETRY_CALOGEOMETRY_IDEALZPRISM_H
2 #define GEOMETRY_CALOGEOMETRY_IDEALZPRISM_H 1
3 
5 #include <memory>
6 
26 class IdealZPrism final : public CaloCellGeometry {
27 public:
28  enum DEPTH { None, EM, HADR };
29 
33 
34  static constexpr uint32_t k_dEta = 0; //Eta-width
35  static constexpr uint32_t k_dPhi = 1; //Phi-width
36  static constexpr uint32_t k_dZ = 2; //Signed thickness
37  static constexpr uint32_t k_Eta = 3; //Eta of the reference point
38  static constexpr uint32_t k_Z = 4; //Z of the reference point
39 
40  IdealZPrism();
41 
42  IdealZPrism(const IdealZPrism& idzp);
43 
44  IdealZPrism& operator=(const IdealZPrism& idzp);
45 
46  IdealZPrism(const GlobalPoint& faceCenter, CornersMgr* mgr, const CCGFloat* parm, IdealZPrism::DEPTH depth);
47 
48  ~IdealZPrism() override;
49 
50  CCGFloat dEta() const;
51  CCGFloat dPhi() const;
52  CCGFloat dz() const;
53  CCGFloat eta() const;
54  CCGFloat z() const;
55 
56  static void localCorners(Pt3DVec& vec, const CCGFloat* pv, Pt3D& ref);
57 
58  void vocalCorners(Pt3DVec& vec, const CCGFloat* pv, Pt3D& ref) const override;
59 
60  // corrected geom for PF
61  std::shared_ptr<const IdealZPrism> forPF() const {
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  }
66 
67 private:
68  void initCorners(CornersVec&) override;
69 
70  static GlobalPoint etaPhiR(float eta, float phi, float rad);
71 
72  static GlobalPoint etaPhiPerp(float eta, float phi, float perp);
73 
74  static GlobalPoint etaPhiZ(float eta, float phi, float z);
75 
76 private:
77  // corrected geom for PF
78  std::unique_ptr<IdealZPrism> m_geoForPF;
79 };
80 
81 std::ostream& operator<<(std::ostream& s, const IdealZPrism& cell);
82 
83 #endif
EZArrayFL< GlobalPoint > CornersVec
static constexpr uint32_t k_dEta
Definition: IdealZPrism.h:34
CaloCellGeometry::CCGFloat CCGFloat
Definition: IdealZPrism.h:30
CCGFloat eta() const
Definition: IdealZPrism.cc:55
static GlobalPoint etaPhiZ(float eta, float phi, float z)
Definition: IdealZPrism.cc:69
void initCorners(CornersVec &) override
Definition: IdealZPrism.cc:105
static constexpr uint32_t k_dZ
Definition: IdealZPrism.h:36
std::shared_ptr< const IdealZPrism > forPF() const
Definition: IdealZPrism.h:61
static GlobalPoint etaPhiR(float eta, float phi, float rad)
Definition: IdealZPrism.cc:61
std::vector< Pt3D > Pt3DVec
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
CCGFloat dz() const
Definition: IdealZPrism.cc:53
std::unique_ptr< IdealZPrism > m_geoForPF
Definition: IdealZPrism.h:78
static constexpr uint32_t k_Z
Definition: IdealZPrism.h:38
static constexpr uint32_t k_Eta
Definition: IdealZPrism.h:37
IdealZPrism & operator=(const IdealZPrism &idzp)
Definition: IdealZPrism.cc:32
void vocalCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref) const override
Definition: IdealZPrism.cc:59
~IdealZPrism() override
Definition: IdealZPrism.cc:47
static constexpr uint32_t k_dPhi
Definition: IdealZPrism.h:35
CCGFloat dEta() const
Definition: IdealZPrism.cc:49
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
Definition: IdealZPrism.cc:73
HepGeom::Point3D< CCGFloat > Pt3D
CaloCellGeometry::Pt3D Pt3D
Definition: IdealZPrism.h:31
Definition: EZMgrFL.h:8
CaloCellGeometry::Pt3DVec Pt3DVec
Definition: IdealZPrism.h:32
CCGFloat dPhi() const
Definition: IdealZPrism.cc:51
T perp() const
Magnitude of transverse component.
static GlobalPoint etaPhiPerp(float eta, float phi, float perp)
Definition: IdealZPrism.cc:65
CCGFloat z() const
Definition: IdealZPrism.cc:57