CMS 3D CMS Logo

TruncatedPyramid.h
Go to the documentation of this file.
1 #ifndef TruncatedPyramid_h
2 #define TruncatedPyramid_h
3 
5 #include <CLHEP/Geometry/Point3D.h>
6 #include <CLHEP/Geometry/Plane3D.h>
7 #include <CLHEP/Geometry/Vector3D.h>
8 #include <CLHEP/Geometry/Transform3D.h>
9 #include <vector>
10 #include <cstdint>
11 
20 class TruncatedPyramid final : public CaloCellGeometry {
21 public:
26 
27  static constexpr uint32_t k_Dz = 0; //Half-length along the z-axis
28  static constexpr uint32_t k_Theta = 1; //Polar angle of the line joining the
29  //centres of the faces at -/+ Dz
30  static constexpr uint32_t k_Phi = 2; //Azimuthal angle of the line joing the
31  //centres of the faces at -/+ Dz
32  static constexpr uint32_t k_Dy1 = 3; //Half-length along y of the face at -Dz
33  static constexpr uint32_t k_Dx1 = 4; //Half-length along x of the side at
34  //y=-Dy1 of the face at -Dz
35  static constexpr uint32_t k_Dx2 = 5; //Half-length along x of the side at
36  //y=+Dy1 of the face at -Dz
37  static constexpr uint32_t k_Alp1 = 6; //Angle w.r.t the y axis from the center
38  //of the sides at y=-Dy1 to at y=+Dy1
39  static constexpr uint32_t k_Dy2 = 7; //Half-length along y of the face at +Dz
40  static constexpr uint32_t k_Dx3 = 8; //Half-length along x of the side at
41  //y=-Dy2 of the face at +Dz
42  static constexpr uint32_t k_Dx4 = 9; //Half-length along x of the side at
43  //y=+Dy2 of the face at +Dz
44  static constexpr uint32_t k_Alp2 = 10; //Angle w.r.t the y axis from the center
45  //of the sides at y=-Dy2 to at y=+Dy2
46 
47  TruncatedPyramid(void);
48 
50 
52 
54  const GlobalPoint& fCtr,
55  const GlobalPoint& bCtr,
56  const GlobalPoint& cor1,
57  const CCGFloat* parV);
58 
59  TruncatedPyramid(const CornersVec& corn, const CCGFloat* par);
60 
61  ~TruncatedPyramid() override;
62 
63  GlobalPoint getPosition(CCGFloat depth) const override;
64 
65  // Return thetaAxis polar angle of axis of the crystal
66  CCGFloat getThetaAxis() const;
67 
68  // Return phiAxis azimuthal angle of axis of the crystal
69  CCGFloat getPhiAxis() const;
70 
71  const GlobalVector& axis() const;
72 
73  // for geometry creation in other classes
74  static void createCorners(const std::vector<CCGFloat>& pv, const Tr3D& tr, std::vector<GlobalPoint>& co);
75 
76  void vocalCorners(Pt3DVec& vec, const CCGFloat* pv, Pt3D& ref) const override;
77 
78  static void localCorners(Pt3DVec& vec, const CCGFloat* pv, Pt3D& ref);
79 
80  static void localCornersReflection(Pt3DVec& vec, const CCGFloat* pv, Pt3D& ref);
81 
82  static void localCornersSwap(Pt3DVec& vec, const CCGFloat* pv, Pt3D& ref);
83 
84  void getTransform(Tr3D& tr, Pt3DVec* lptr) const override;
85 
86 private:
87  void initCorners(CornersVec&) override;
88 
89  GlobalVector makeAxis(void);
90 
91  const GlobalPoint backCtr(void) const;
94 };
95 
96 std::ostream& operator<<(std::ostream& s, const TruncatedPyramid& cell);
97 
98 #endif
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
CaloCellGeometry::Tr3D Tr3D
CCGFloat getPhiAxis() const
static constexpr uint32_t k_Dx4
static constexpr uint32_t k_Alp2
CaloCellGeometry::Pt3D Pt3D
HepGeom::Transform3D Tr3D
std::vector< Pt3D > Pt3DVec
void getTransform(Tr3D &tr, Pt3DVec *lptr) const override
--------— only needed by specific utility; overloaded when needed -—
__host__ __device__ VT * co
Definition: prefixScan.h:47
static constexpr uint32_t k_Dy2
static constexpr uint32_t k_Phi
std::ostream & operator<<(std::ostream &s, const TruncatedPyramid &cell)
static void localCornersSwap(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
static constexpr uint32_t k_Alp1
CaloCellGeometry::Pt3DVec Pt3DVec
const GlobalVector & axis() const
static constexpr uint32_t k_Dx3
static constexpr uint32_t k_Dx2
TruncatedPyramid & operator=(const TruncatedPyramid &tr)
GlobalVector makeAxis(void)
const GlobalPoint backCtr(void) const
CaloCellGeometry::CCGFloat CCGFloat
void initCorners(CornersVec &) override
void vocalCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref) const override
HepGeom::Point3D< CCGFloat > Pt3D
Definition: EZMgrFL.h:8
virtual const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
static constexpr uint32_t k_Theta
A base class to handle the particular shape of Ecal Xtals. Taken from ORCA Calorimetry Code...
GlobalVector m_axis
static constexpr uint32_t k_Dy1
static void createCorners(const std::vector< CCGFloat > &pv, const Tr3D &tr, std::vector< GlobalPoint > &co)
static constexpr uint32_t k_Dz
~TruncatedPyramid() override
static void localCornersReflection(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
static constexpr uint32_t k_Dx1
CCGFloat getThetaAxis() const