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  static constexpr unsigned int ncorner_ = 8;
77  static constexpr unsigned int ncornerBy2_ = 4;
78 
79 private:
80 
81  void initCorners(CornersVec& ) override;
82 
83  GlobalVector makeAxis( void );
84 
85  GlobalPoint backCtr( void ) const;
89  Tr3D m_tr;
90 };
91 
92 std::ostream& operator<<( std::ostream& s, const FlatTrd& cell ) ;
93 
94 #endif
const GlobalVector & axis() const
Definition: FlatTrd.cc:142
A base class to handle the particular shape of HGCal volumes.
Definition: FlatTrd.h:19
FlatTrd & operator=(const FlatTrd &tr)
Definition: FlatTrd.cc:32
static constexpr unsigned int ncornerBy2_
Definition: FlatTrd.h:77
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:89
void setPosition(const GlobalPoint &p)
Definition: FlatTrd.h:74
#define constexpr
std::ostream & operator<<(std::ostream &s, const FlatTrd &cell)
Definition: FlatTrd.cc:283
static constexpr unsigned int ncorner_
Definition: FlatTrd.h:76
Pt3D m_local
Definition: FlatTrd.h:87
void vocalCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref) const override
Definition: FlatTrd.cc:146
CaloCellGeometry::CCGFloat CCGFloat
Definition: FlatTrd.h:22
def pv(vc)
Definition: MetAnalyzer.py:6
GlobalPoint backCtr(void) const
Definition: FlatTrd.cc:271
Pt3D m_corOne
Definition: FlatTrd.h:87
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
Definition: FlatTrd.cc:175
void getTransform(Tr3D &tr, Pt3DVec *lptr) const override
--------— only needed by specific utility; overloaded when needed -—
Definition: FlatTrd.cc:207
~FlatTrd() override
Definition: FlatTrd.cc:104
Pt3D getLocal(const GlobalPoint &global) const
Definition: FlatTrd.cc:123
GlobalVector makeAxis(void)
Definition: FlatTrd.cc:267
void initCorners(CornersVec &) override
Definition: FlatTrd.cc:252
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:152
T eta() const
Definition: PV3DBase.h:76
GlobalPoint m_global
Definition: FlatTrd.h:88
CaloCellGeometry::Tr3D Tr3D
Definition: FlatTrd.h:25
CCGFloat getThetaAxis() const
Definition: FlatTrd.cc:134
virtual float phiPos() const
Definition: FlatTrd.h:49
virtual float etaPos() const
Definition: FlatTrd.h:48
FlatTrd(void)
Definition: FlatTrd.cc:23
CCGFloat getPhiAxis() const
Definition: FlatTrd.cc:138
GlobalVector m_axis
Definition: FlatTrd.h:86