CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Point3DBase.h
Go to the documentation of this file.
1 #ifndef GeometryVector_Point3DBase_h
2 #define GeometryVector_Point3DBase_h
3 
4 
9 
10 template <class T, class FrameTag>
11 class Point3DBase : public PV3DBase< T, PointTag, FrameTag> {
12 public:
13 
17  typedef typename BaseClass::Spherical Spherical;
18  typedef typename BaseClass::Polar Polar;
20 
26 
30  template <class U>
32 
34  Point3DBase(const T& x, const T& y, const T& z) : BaseClass(x, y, z) {}
35 
38  explicit Point3DBase( const Cylindrical& set) : BaseClass( set) {}
39 
41  explicit Point3DBase( const Polar& set) : BaseClass( set) {}
42 
47  const Geom::Phi<T>& ph, const T& r) : BaseClass(th,ph,r) {}
48 
52  Point3DBase( const T& x, const T& y) : BaseClass( x, y, 0) {}
54  BaseClass( p.x(), p.y(), 0) {}
55 
60  template <class U>
61  explicit Point3DBase( const Basic3DVector<U>& v) : BaseClass(v) {}
62 
63  // equality
64  bool operator==(const Point3DBase & rh) const {
65  return this->basicVector()==rh.basicVector();
66  }
67 
71  template <class U>
73  this->theVector += v.basicVector();
74  return *this;
75  }
76 
77  template <class U>
79  this->theVector -= v.basicVector();
80  return *this;
81  }
82 
83 };
84 
89 template< typename T, typename U, class Frame>
93  return RT( p.basicVector() + v.basicVector());
94 }
95 
98 template< typename T, typename U, class Frame>
102  return RT( p.basicVector() + v.basicVector());
103 }
104 
109 template< typename T, typename U, class Frame>
113  return RT( p1.basicVector() - p2.basicVector());
114 }
115 
120 template< typename T, typename U, class Frame>
124  return RT( p.basicVector() - v.basicVector());
125 }
126 #endif // GeometryVector_Point3DBase_h
Point3DBase & operator+=(const Vector3DBase< U, FrameTag > &v)
Definition: Point3DBase.h:72
PV3DBase< T, PointTag, FrameTag > BaseClass
Definition: Point3DBase.h:14
BaseClass::BasicVectorType BasicVectorType
Definition: Point3DBase.h:19
Point3DBase & operator-=(const Vector3DBase< U, FrameTag > &v)
Definition: Point3DBase.h:78
Point3DBase(const Polar &set)
construct from polar coordinates
Definition: Point3DBase.h:41
MatrixMeschach operator+(const MatrixMeschach &mat1, const MatrixMeschach &mat2)
MatrixMeschach operator-(const MatrixMeschach &mat1, const MatrixMeschach &mat2)
Point3DBase(const T &x, const T &y, const T &z)
construct from cartesian coordinates
Definition: Point3DBase.h:34
Vector3DBase< T, FrameTag > VectorType
Definition: Point3DBase.h:15
bool operator==(const Point3DBase &rh) const
Definition: Point3DBase.h:64
BaseClass::Cylindrical Cylindrical
Definition: Point3DBase.h:16
BaseClass::Polar Polar
Definition: Point3DBase.h:18
Point3DBase(const T &x, const T &y)
Definition: Point3DBase.h:52
Point3DBase(const Geom::Theta< T > &th, const Geom::Phi< T > &ph, const T &r)
Definition: Point3DBase.h:46
BaseClass::Spherical Spherical
Definition: Point3DBase.h:17
Point3DBase(const Basic3DVector< U > &v)
Definition: Point3DBase.h:61
Point3DBase(Point2DBase< T, FrameTag > p)
Definition: Point3DBase.h:53
double p2[4]
Definition: TauolaWrapper.h:90
double p1[4]
Definition: TauolaWrapper.h:89
Point3DBase(const Cylindrical &set)
Definition: Point3DBase.h:38
Point3DBase(const Point3DBase< U, FrameTag > &p)
Definition: Point3DBase.h:31
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:54
Definition: Phi.h:20
mathSSE::Vec4< T > v