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:
21 
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 
49  TruncatedPyramid( const TruncatedPyramid& tr ) ;
50 
52 
54  const GlobalPoint& fCtr ,
55  const GlobalPoint& bCtr ,
56  const GlobalPoint& cor1 ,
57  const CCGFloat* parV ) ;
58 
59  TruncatedPyramid( const CornersVec& corn ,
60  const CCGFloat* par ) ;
61 
62  ~TruncatedPyramid() override ;
63 
64  GlobalPoint getPosition( CCGFloat depth ) const override ;
65 
66  // Return thetaAxis polar angle of axis of the crystal
67  CCGFloat getThetaAxis() const ;
68 
69  // Return phiAxis azimuthal angle of axis of the crystal
70  CCGFloat getPhiAxis() const ;
71 
72  const GlobalVector& axis() const ;
73 
74  // for geometry creation in other classes
75  static void createCorners( const std::vector<CCGFloat>& pv ,
76  const Tr3D& tr ,
77  std::vector<GlobalPoint>& co ) ;
78 
79  void vocalCorners( Pt3DVec& vec ,
80  const CCGFloat* pv ,
81  Pt3D& ref ) const override;
82 
83  static void localCorners( Pt3DVec& vec ,
84  const CCGFloat* pv ,
85  Pt3D& ref ) ;
86 
87  static void localCornersReflection( Pt3DVec& vec ,
88  const CCGFloat* pv ,
89  Pt3D& ref ) ;
90 
91  static void localCornersSwap( Pt3DVec& vec ,
92  const CCGFloat* pv ,
93  Pt3D& ref ) ;
94 
95  void getTransform( Tr3D& tr, Pt3DVec* lptr ) const override;
96 
97 private:
98  void initCorners(CornersVec&) override;
99 
100  GlobalVector makeAxis( void );
101 
102  const GlobalPoint backCtr( void ) const;
104  Pt3D m_corOne;
105 };
106 
107 std::ostream& operator<<( std::ostream& s, const TruncatedPyramid& cell ) ;
108 
109 #endif
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
CaloCellGeometry::Tr3D Tr3D
static constexpr uint32_t k_Dx4
static constexpr uint32_t k_Alp2
virtual const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
CaloCellGeometry::Pt3D Pt3D
HepGeom::Transform3D Tr3D
std::vector< Pt3D > Pt3DVec
CCGFloat getPhiAxis() const
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
def pv(vc)
Definition: MetAnalyzer.py:7
static constexpr uint32_t k_Dx3
static constexpr uint32_t k_Dx2
CCGFloat getThetaAxis() const
TruncatedPyramid & operator=(const TruncatedPyramid &tr)
GlobalVector makeAxis(void)
CaloCellGeometry::CCGFloat CCGFloat
void initCorners(CornersVec &) override
void getTransform(Tr3D &tr, Pt3DVec *lptr) const override
--------— only needed by specific utility; overloaded when needed -—
HepGeom::Point3D< CCGFloat > Pt3D
Definition: EZMgrFL.h:8
void vocalCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref) const override
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
const GlobalVector & axis() const
static void createCorners(const std::vector< CCGFloat > &pv, const Tr3D &tr, std::vector< GlobalPoint > &co)
static constexpr uint32_t k_Dz
~TruncatedPyramid() override
const GlobalPoint backCtr(void) const
static void localCornersReflection(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
static constexpr uint32_t k_Dx1
#define constexpr