CMS 3D CMS Logo

Point2DBase.h
Go to the documentation of this file.
1 #ifndef GeometryVector_Point2DBase_h
2 #define GeometryVector_Point2DBase_h
3 
7 
8 template <class T, class FrameTag>
9 class Point2DBase : public PV2DBase<T, PointTag, FrameTag> {
10 public:
14  typedef typename BaseClass::Polar Polar;
15 
21 
25  template <class U>
27 
29  Point2DBase(const T& x, const T& y) : BaseClass(x, y) {}
30 
32  explicit Point2DBase(const Polar& set) : BaseClass(set) {}
33 
38  template <class U>
39  explicit Point2DBase(const Basic2DVector<U>& v) : BaseClass(v) {}
40 
44  template <class U>
46  this->basicVector() += v.basicVector();
47  return *this;
48  }
49 
50  template <class U>
52  this->basicVector() -= v.basicVector();
53  return *this;
54  }
55 };
56 
61 template <typename T, typename U, class Frame>
63  const Vector2DBase<U, Frame>& v) {
65  return RT(p.basicVector() + v.basicVector());
66 }
67 
70 template <typename T, typename U, class Frame>
72  const Point2DBase<U, Frame>& v) {
74  return RT(p.basicVector() + v.basicVector());
75 }
76 
81 template <typename T, typename U, class Frame>
83  const Point2DBase<U, Frame>& p2) {
85  return RT(p1.basicVector() - p2.basicVector());
86 }
87 
88 #endif // GeometryVector_Point2DBase_h
Point2DBase
Definition: Point2DBase.h:9
PV2DBase.h
Point2DBase::BaseClass
PV2DBase< T, PointTag, FrameTag > BaseClass
Definition: Point2DBase.h:11
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
PV2DBase< T, PointTag, FrameTag >::basicVector
const BasicVectorType & basicVector() const
Definition: PV2DBase.h:37
findQualityFiles.v
v
Definition: findQualityFiles.py:179
operator-
Vector2DBase< typename PreciseFloatType< T, U >::Type, Frame > operator-(const Point2DBase< T, Frame > &p1, const Point2DBase< U, Frame > &p2)
Definition: Point2DBase.h:82
Point2DBase::BasicVectorType
Basic2DVector< T > BasicVectorType
Definition: Point2DBase.h:13
Geom::Polar2Cartesian
Definition: CoordinateSets.h:14
operator+
Point2DBase< typename PreciseFloatType< T, U >::Type, Frame > operator+(const Point2DBase< T, Frame > &p, const Vector2DBase< U, Frame > &v)
Definition: Point2DBase.h:62
Point2DBase::Point2DBase
Point2DBase(const T &x, const T &y)
construct from cartesian coordinates
Definition: Point2DBase.h:29
p2
double p2[4]
Definition: TauolaWrapper.h:90
Vector2DBase
Definition: Vector2DBase.h:8
Vector2DBase.h
Point2DBase::Point2DBase
Point2DBase(const Polar &set)
construct from polar coordinates
Definition: Point2DBase.h:32
Basic2DVector
Definition: extBasic2DVector.h:15
PointTag.h
Point2DBase::Point2DBase
Point2DBase(const Point2DBase< U, FrameTag > &p)
Definition: Point2DBase.h:26
PV2DBase< T, PointTag, FrameTag >::y
T y() const
Definition: PV2DBase.h:44
PV2DBase< T, PointTag, FrameTag >::x
T x() const
Definition: PV2DBase.h:43
p1
double p1[4]
Definition: TauolaWrapper.h:89
Point2DBase::VectorType
Vector2DBase< T, FrameTag > VectorType
Definition: Point2DBase.h:12
T
long double T
Definition: Basic3DVectorLD.h:48
PV2DBase
Definition: PV2DBase.h:10
Point2DBase::Point2DBase
Point2DBase(const Basic2DVector< U > &v)
Definition: Point2DBase.h:39
Point2DBase::Polar
BaseClass::Polar Polar
Definition: Point2DBase.h:14
Point2DBase::operator-=
Point2DBase & operator-=(const Vector2DBase< U, FrameTag > &v)
Definition: Point2DBase.h:51
Point2DBase::Point2DBase
Point2DBase()
Definition: Point2DBase.h:20
Point2DBase::operator+=
Point2DBase & operator+=(const Vector2DBase< U, FrameTag > &v)
Definition: Point2DBase.h:45