19#ifndef ROOT_Math_GenVector_Polar2D
20#define ROOT_Math_GenVector_Polar2D 1
63 template <
class CoordSystem >
131 inline static double pi() {
return M_PI; }
174 template <
class CoordSystem >
194 T
x()
const {
return X();}
195 T
y()
const {
return Y();}
201#if defined(__MAKECINT__) || defined(G__DICTIONARY)
226#if defined(__MAKECINT__) || defined(G__DICTIONARY)
240#if defined(__MAKECINT__) || defined(G__DICTIONARY)
252 void Polar2D<T>::SetY(
Scalar a) {
253 GenVector_exception
e(
"Polar2D::SetY() is not supposed to be called");
255 Cartesian2D<Scalar>
v(*
this);
v.SetY(
a); *
this = Polar2D<Scalar>(
v);
Class describing a 2D cartesian coordinate system (x, y coordinates)
Class describing a polar 2D coordinate system based on r and phi Phi is restricted to be in the range...
void Negate()
negate the vector
void SetR(const T &r)
set the r coordinate value keeping phi constant
Polar2D()
Default constructor with r=1,phi=0.
void SetXY(Scalar a, Scalar b)
set all values using cartesian coordinates
void SetCoordinates(Scalar r, Scalar phi)
Set internal data based on 2 Scalar numbers.
void Scale(T a)
scale by a scalar quantity - for polar coordinates r changes
Polar2D(const Polar2D &v)
copy constructor
Polar2D & operator=(const Polar2D &v)
assignment operator
bool operator==(const Polar2D &rhs) const
Exact equality.
Polar2D(T r, T phi)
Construct from the polar coordinates: r and phi.
void Rotate(T angle)
rotate the vector
void SetPhi(const T &phi)
set the phi coordinate value keeping r constant
void GetCoordinates(Scalar &r, Scalar &phi) const
get internal data into 2 Scalar numbers
bool operator!=(const Polar2D &rhs) const
Polar2D(const CoordSystem &v)
Construct from any Vector or coordinate system implementing R() and Phi()
void Restrict()
restrict abgle hi to be between -PI and PI
Namespace for new Math classes and functions.
Rotation3D::Scalar Scalar
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...