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