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 
19 class TruncatedPyramid final : public CaloCellGeometry {
20 public:
25 
26  static constexpr uint32_t k_Dz = 0; //Half-length along the z-axis
27  static constexpr uint32_t k_Theta = 1; //Polar angle of the line joining the
28  //centres of the faces at -/+ Dz
29  static constexpr uint32_t k_Phi = 2; //Azimuthal angle of the line joing the
30  //centres of the faces at -/+ Dz
31  static constexpr uint32_t k_Dy1 = 3; //Half-length along y of the face at -Dz
32  static constexpr uint32_t k_Dx1 = 4; //Half-length along x of the side at
33  //y=-Dy1 of the face at -Dz
34  static constexpr uint32_t k_Dx2 = 5; //Half-length along x of the side at
35  //y=+Dy1 of the face at -Dz
36  static constexpr uint32_t k_Alp1 = 6; //Angle w.r.t the y axis from the center
37  //of the sides at y=-Dy1 to at y=+Dy1
38  static constexpr uint32_t k_Dy2 = 7; //Half-length along y of the face at +Dz
39  static constexpr uint32_t k_Dx3 = 8; //Half-length along x of the side at
40  //y=-Dy2 of the face at +Dz
41  static constexpr uint32_t k_Dx4 = 9; //Half-length along x of the side at
42  //y=+Dy2 of the face at +Dz
43  static constexpr uint32_t k_Alp2 = 10; //Angle w.r.t the y axis from the center
44  //of the sides at y=-Dy2 to at y=+Dy2
45 
46  TruncatedPyramid(void);
47 
49 
51 
53  const GlobalPoint& fCtr,
54  const GlobalPoint& bCtr,
55  const GlobalPoint& cor1,
56  const CCGFloat* parV);
57 
58  TruncatedPyramid(const CornersVec& corn, const CCGFloat* par);
59 
60  ~TruncatedPyramid() override;
61 
62  GlobalPoint getPosition(CCGFloat depth) const override;
63 
64  // Return thetaAxis polar angle of axis of the crystal
65  CCGFloat getThetaAxis() const;
66 
67  // Return phiAxis azimuthal angle of axis of the crystal
68  CCGFloat getPhiAxis() const;
69 
70  const GlobalVector& axis() const;
71 
72  // for geometry creation in other classes
73  static void createCorners(const std::vector<CCGFloat>& pv, const Tr3D& tr, std::vector<GlobalPoint>& co);
74 
75  void vocalCorners(Pt3DVec& vec, const CCGFloat* pv, Pt3D& ref) const override;
76 
77  static void localCorners(Pt3DVec& vec, const CCGFloat* pv, Pt3D& ref);
78 
79  static void localCornersReflection(Pt3DVec& vec, const CCGFloat* pv, Pt3D& ref);
80 
81  static void localCornersSwap(Pt3DVec& vec, const CCGFloat* pv, Pt3D& ref);
82 
83  void getTransform(Tr3D& tr, Pt3DVec* lptr) const override;
84 
85 private:
86  void initCorners(CornersVec&) override;
87 
88  GlobalVector makeAxis(void);
89 
90  const GlobalPoint backCtr(void) const;
93 };
94 
95 std::ostream& operator<<(std::ostream& s, const TruncatedPyramid& cell);
96 
97 #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