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 final : 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  virtual const GlobalPoint& getPosition() const { return m_global; }
47  GlobalPoint getPosition( const Pt3D& local ) const;
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 private:
75 
76  void initCorners(CornersVec& ) override;
77 
78  GlobalVector makeAxis( void );
79 
80  const GlobalPoint backCtr( void ) const;
84  Tr3D m_tr;
85 };
86 
87 std::ostream& operator<<( std::ostream& s, const FlatTrd& cell ) ;
88 
89 #endif
const GlobalVector & axis() const
Definition: FlatTrd.cc:130
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
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:84
std::ostream & operator<<(std::ostream &s, const FlatTrd &cell)
Definition: FlatTrd.cc:270
const GlobalPoint backCtr(void) const
Definition: FlatTrd.cc:258
Pt3D m_local
Definition: FlatTrd.h:82
void vocalCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref) const override
Definition: FlatTrd.cc:134
CaloCellGeometry::CCGFloat CCGFloat
Definition: FlatTrd.h:22
def pv(vc)
Definition: MetAnalyzer.py:6
Pt3D m_corOne
Definition: FlatTrd.h:82
virtual const GlobalPoint & getPosition() const
Definition: FlatTrd.h:46
static void localCorners(Pt3DVec &vec, const CCGFloat *pv, Pt3D &ref)
Definition: FlatTrd.cc:163
void getTransform(Tr3D &tr, Pt3DVec *lptr) const override
--------— only needed by specific utility; overloaded when needed -—
Definition: FlatTrd.cc:194
~FlatTrd() override
Definition: FlatTrd.cc:96
Pt3D getLocal(const GlobalPoint &global) const
Definition: FlatTrd.cc:112
GlobalVector makeAxis(void)
Definition: FlatTrd.cc:254
void initCorners(CornersVec &) override
Definition: FlatTrd.cc:239
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:140
T eta() const
Definition: PV3DBase.h:76
GlobalPoint m_global
Definition: FlatTrd.h:83
CaloCellGeometry::Tr3D Tr3D
Definition: FlatTrd.h:25
CCGFloat getThetaAxis() const
Definition: FlatTrd.cc:122
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:126
GlobalVector m_axis
Definition: FlatTrd.h:81