File indexing completed on 2024-04-06 12:14:16
0001 #ifndef TruncatedPyramid_h
0002 #define TruncatedPyramid_h
0003
0004 #include "Geometry/CaloGeometry/interface/CaloCellGeometry.h"
0005 #include <CLHEP/Geometry/Point3D.h>
0006 #include <CLHEP/Geometry/Plane3D.h>
0007 #include <CLHEP/Geometry/Vector3D.h>
0008 #include <CLHEP/Geometry/Transform3D.h>
0009 #include <vector>
0010 #include <cstdint>
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 class TruncatedPyramid final : public CaloCellGeometry {
0021 public:
0022 typedef CaloCellGeometry::CCGFloat CCGFloat;
0023 typedef CaloCellGeometry::Pt3D Pt3D;
0024 typedef CaloCellGeometry::Pt3DVec Pt3DVec;
0025 typedef CaloCellGeometry::Tr3D Tr3D;
0026
0027 static constexpr uint32_t k_Dz = 0;
0028 static constexpr uint32_t k_Theta = 1;
0029
0030 static constexpr uint32_t k_Phi = 2;
0031
0032 static constexpr uint32_t k_Dy1 = 3;
0033 static constexpr uint32_t k_Dx1 = 4;
0034
0035 static constexpr uint32_t k_Dx2 = 5;
0036
0037 static constexpr uint32_t k_Alp1 = 6;
0038
0039 static constexpr uint32_t k_Dy2 = 7;
0040 static constexpr uint32_t k_Dx3 = 8;
0041
0042 static constexpr uint32_t k_Dx4 = 9;
0043
0044 static constexpr uint32_t k_Alp2 = 10;
0045
0046
0047 TruncatedPyramid(void);
0048
0049 TruncatedPyramid(const TruncatedPyramid& tr);
0050
0051 TruncatedPyramid& operator=(const TruncatedPyramid& tr);
0052
0053 TruncatedPyramid(CornersMgr* cMgr,
0054 const GlobalPoint& fCtr,
0055 const GlobalPoint& bCtr,
0056 const GlobalPoint& cor1,
0057 const CCGFloat* parV);
0058
0059 TruncatedPyramid(const CornersVec& corn, const CCGFloat* par);
0060
0061 ~TruncatedPyramid() override;
0062
0063 GlobalPoint getPosition(CCGFloat depth) const override;
0064
0065
0066 CCGFloat getThetaAxis() const;
0067
0068
0069 CCGFloat getPhiAxis() const;
0070
0071 const GlobalVector& axis() const;
0072
0073
0074 static void createCorners(const std::vector<CCGFloat>& pv, const Tr3D& tr, std::vector<GlobalPoint>& co);
0075
0076 void vocalCorners(Pt3DVec& vec, const CCGFloat* pv, Pt3D& ref) const override;
0077
0078 static void localCorners(Pt3DVec& vec, const CCGFloat* pv, Pt3D& ref);
0079
0080 static void localCornersReflection(Pt3DVec& vec, const CCGFloat* pv, Pt3D& ref);
0081
0082 static void localCornersSwap(Pt3DVec& vec, const CCGFloat* pv, Pt3D& ref);
0083
0084 void getTransform(Tr3D& tr, Pt3DVec* lptr) const override;
0085
0086 private:
0087 void initCorners(CornersVec&) override;
0088
0089 GlobalVector makeAxis(void);
0090
0091 const GlobalPoint backCtr(void) const;
0092 GlobalVector m_axis;
0093 Pt3D m_corOne;
0094 };
0095
0096 std::ostream& operator<<(std::ostream& s, const TruncatedPyramid& cell);
0097
0098 #endif