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
CaloCellGeometry::Tr3D
HepGeom::Transform3D Tr3D
Definition: CaloCellGeometry.h:53
Vector3DBase
Definition: Vector3DBase.h:8
CaloCellGeometry::Pt3DVec
std::vector< Pt3D > Pt3DVec
Definition: CaloCellGeometry.h:55
TruncatedPyramid::initCorners
void initCorners(CornersVec &) override
Definition: TruncatedPyramid.cc:129
TruncatedPyramid::getTransform
void getTransform(Tr3D &tr, Pt3DVec *lptr) const override
--------— only needed by specific utility; overloaded when needed -—
Definition: TruncatedPyramid.cc:65
CaloCellGeometry::CCGFloat
float CCGFloat
Definition: CaloCellGeometry.h:52
TruncatedPyramid::k_Alp1
static constexpr uint32_t k_Alp1
Definition: TruncatedPyramid.h:36
TruncatedPyramid::k_Dy1
static constexpr uint32_t k_Dy1
Definition: TruncatedPyramid.h:31
TruncatedPyramid::k_Dx3
static constexpr uint32_t k_Dx3
Definition: TruncatedPyramid.h:39
TruncatedPyramid::m_corOne
Pt3D m_corOne
Definition: TruncatedPyramid.h:92
TruncatedPyramid::k_Dx1
static constexpr uint32_t k_Dx1
Definition: TruncatedPyramid.h:32
TruncatedPyramid::Pt3DVec
CaloCellGeometry::Pt3DVec Pt3DVec
Definition: TruncatedPyramid.h:23
TruncatedPyramid
A base class to handle the particular shape of Ecal Xtals. Taken from ORCA Calorimetry Code.
Definition: TruncatedPyramid.h:19
TruncatedPyramid::axis
const GlobalVector & axis() const
Definition: TruncatedPyramid.cc:53
EZArrayFL< GlobalPoint >
cms::cuda::co
T *__restrict__ co
Definition: prefixScan.h:46
TruncatedPyramid::localCornersReflection
static void localCornersReflection(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
Definition: TruncatedPyramid.cc:147
TruncatedPyramid::CCGFloat
CaloCellGeometry::CCGFloat CCGFloat
Definition: TruncatedPyramid.h:21
TruncatedPyramid::operator=
TruncatedPyramid & operator=(const TruncatedPyramid &tr)
Definition: TruncatedPyramid.cc:23
alignCSCRings.s
s
Definition: alignCSCRings.py:92
TruncatedPyramid::vocalCorners
void vocalCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref) const override
Definition: TruncatedPyramid.cc:55
TruncatedPyramid::k_Theta
static constexpr uint32_t k_Theta
Definition: TruncatedPyramid.h:27
TruncatedPyramid::m_axis
GlobalVector m_axis
Definition: TruncatedPyramid.h:91
TruncatedPyramid::TruncatedPyramid
TruncatedPyramid(void)
Definition: TruncatedPyramid.cc:19
TruncatedPyramid::createCorners
static void createCorners(const std::vector< CCGFloat > &pv, const Tr3D &tr, std::vector< GlobalPoint > &co)
Definition: TruncatedPyramid.cc:237
Point3DBase< float, GlobalTag >
CaloCellGeometry::Pt3D
HepGeom::Point3D< CCGFloat > Pt3D
Definition: CaloCellGeometry.h:54
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
CaloCellGeometry::getPosition
virtual const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
Definition: CaloCellGeometry.h:80
CaloCellGeometry
Definition: CaloCellGeometry.h:50
TruncatedPyramid::k_Dz
static constexpr uint32_t k_Dz
Definition: TruncatedPyramid.h:26
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
operator<<
std::ostream & operator<<(std::ostream &s, const TruncatedPyramid &cell)
Definition: TruncatedPyramid.cc:305
TruncatedPyramid::getThetaAxis
CCGFloat getThetaAxis() const
Definition: TruncatedPyramid.cc:49
TruncatedPyramid::~TruncatedPyramid
~TruncatedPyramid() override
Definition: TruncatedPyramid.cc:43
TruncatedPyramid::k_Phi
static constexpr uint32_t k_Phi
Definition: TruncatedPyramid.h:29
CaloCellGeometry.h
TruncatedPyramid::Tr3D
CaloCellGeometry::Tr3D Tr3D
Definition: TruncatedPyramid.h:24
TruncatedPyramid::localCorners
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
Definition: TruncatedPyramid.cc:177
TruncatedPyramid::localCornersSwap
static void localCornersSwap(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
Definition: TruncatedPyramid.cc:214
TruncatedPyramid::k_Dx2
static constexpr uint32_t k_Dx2
Definition: TruncatedPyramid.h:34
TruncatedPyramid::makeAxis
GlobalVector makeAxis(void)
Definition: TruncatedPyramid.cc:57
TruncatedPyramid::getPhiAxis
CCGFloat getPhiAxis() const
Definition: TruncatedPyramid.cc:51
EZMgrFL
Definition: EZMgrFL.h:8
TruncatedPyramid::k_Alp2
static constexpr uint32_t k_Alp2
Definition: TruncatedPyramid.h:43
TruncatedPyramid::k_Dx4
static constexpr uint32_t k_Dx4
Definition: TruncatedPyramid.h:41
TruncatedPyramid::Pt3D
CaloCellGeometry::Pt3D Pt3D
Definition: TruncatedPyramid.h:22
TruncatedPyramid::k_Dy2
static constexpr uint32_t k_Dy2
Definition: TruncatedPyramid.h:38
TruncatedPyramid::backCtr
const GlobalPoint backCtr(void) const
Definition: TruncatedPyramid.cc:59