CMS 3D CMS Logo

FlatTrd.h
Go to the documentation of this file.
1 #ifndef GeometryCaloGeometryFlatTrd_h
2 #define GeometryCaloGeometryFlatTrd_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 FlatTrd : public CaloCellGeometry {
20 public:
21 
26 
27  FlatTrd( void );
28 
29  FlatTrd( const FlatTrd& tr ) ;
30 
31  FlatTrd& operator=( const FlatTrd& tr ) ;
32 
33  FlatTrd( CornersMgr* cMgr ,
34  const GlobalPoint& fCtr ,
35  const GlobalPoint& bCtr ,
36  const GlobalPoint& cor1 ,
37  const CCGFloat* parV ) ;
38 
39  FlatTrd( const CornersVec& corn ,
40  const CCGFloat* par ) ;
41 
42  FlatTrd( const FlatTrd& tr, const Pt3D& local) ;
43 
44  ~FlatTrd() override ;
45 
46  GlobalPoint const & getPosition() const override { return m_global; }
47  GlobalPoint getPosition( const Pt3D& local ) const override;
48  virtual float etaPos() const { return m_global.eta(); }
49  virtual float phiPos() const { return m_global.phi(); }
50  Pt3D getLocal( const GlobalPoint& global ) const;
51 
52  // Return thetaAxis polar angle of axis of the crystal
53  CCGFloat getThetaAxis() const ;
54 
55  // Return phiAxis azimuthal angle of axis of the crystal
56  CCGFloat getPhiAxis() const ;
57 
58  void vocalCorners( Pt3DVec& vec ,
59  const CCGFloat* pv ,
60  Pt3D& ref ) const override;
61 
62  const GlobalVector& axis() const ;
63 
64  static void createCorners( const std::vector<CCGFloat>& pv ,
65  const Tr3D& tr ,
66  std::vector<GlobalPoint>& co ) ;
67 
68  static void localCorners( Pt3DVec& vec ,
69  const CCGFloat* pv ,
70  Pt3D& ref ) ;
71 
72  void getTransform( Tr3D& tr, Pt3DVec* lptr ) const override;
73 
74  void setPosition ( const GlobalPoint& p ) { m_global = p; setRefPoint(p); }
75 
76 private:
77 
78  void initCorners(CornersVec& ) override;
79 
80  GlobalVector makeAxis( void );
81 
82  GlobalPoint backCtr( void ) const;
86  Tr3D m_tr;
87 };
88 
89 std::ostream& operator<<( std::ostream& s, const FlatTrd& cell ) ;
90 
91 #endif
const GlobalVector & axis() const
Definition: FlatTrd.cc:129
A base class to handle the particular shape of HGCal volumes.
Definition: FlatTrd.h:19
FlatTrd & operator=(const FlatTrd &tr)
Definition: FlatTrd.cc:31
CaloCellGeometry::Pt3D Pt3D
Definition: FlatTrd.h:23
void setRefPoint(const GlobalPoint &pos)
GlobalPoint const & getPosition() const override
Returns the position of reference for this cell.
Definition: FlatTrd.h:46
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
CaloCellGeometry::Pt3DVec Pt3DVec
Definition: FlatTrd.h:24
HepGeom::Transform3D Tr3D
std::vector< Pt3D > Pt3DVec
Tr3D m_tr
Definition: FlatTrd.h:86
void setPosition(const GlobalPoint &p)
Definition: FlatTrd.h:74
std::ostream & operator<<(std::ostream &s, const FlatTrd &cell)
Definition: FlatTrd.cc:269
Pt3D m_local
Definition: FlatTrd.h:84
void vocalCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref) const override
Definition: FlatTrd.cc:133
CaloCellGeometry::CCGFloat CCGFloat
Definition: FlatTrd.h:22
def pv(vc)
Definition: MetAnalyzer.py:6
GlobalPoint backCtr(void) const
Definition: FlatTrd.cc:257
Pt3D m_corOne
Definition: FlatTrd.h:84
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
Definition: FlatTrd.cc:162
void getTransform(Tr3D &tr, Pt3DVec *lptr) const override
--------— only needed by specific utility; overloaded when needed -—
Definition: FlatTrd.cc:193
~FlatTrd() override
Definition: FlatTrd.cc:95
Pt3D getLocal(const GlobalPoint &global) const
Definition: FlatTrd.cc:111
GlobalVector makeAxis(void)
Definition: FlatTrd.cc:253
void initCorners(CornersVec &) override
Definition: FlatTrd.cc:238
HepGeom::Point3D< CCGFloat > Pt3D
Definition: EZMgrFL.h:8
static void createCorners(const std::vector< CCGFloat > &pv, const Tr3D &tr, std::vector< GlobalPoint > &co)
Definition: FlatTrd.cc:139
T eta() const
Definition: PV3DBase.h:76
GlobalPoint m_global
Definition: FlatTrd.h:85
CaloCellGeometry::Tr3D Tr3D
Definition: FlatTrd.h:25
CCGFloat getThetaAxis() const
Definition: FlatTrd.cc:121
virtual float phiPos() const
Definition: FlatTrd.h:49
virtual float etaPos() const
Definition: FlatTrd.h:48
FlatTrd(void)
Definition: FlatTrd.cc:22
CCGFloat getPhiAxis() const
Definition: FlatTrd.cc:125
GlobalVector m_axis
Definition: FlatTrd.h:83