19 #ifndef ROOT_Math_GenVector_Polar2D
20 #define ROOT_Math_GenVector_Polar2D 1
22 #ifndef ROOT_Math_Math
26 #ifndef ROOT_Math_GenVector_etaMax
67 template <
class CoordSystem >
102 Scalar
R()
const {
return fR;}
131 void SetXY(Scalar
a, Scalar b);
135 inline static double pi() {
return M_PI; }
179 template <
class CoordSystem >
199 T x()
const {
return X();}
200 T y()
const {
return Y();}
206 #if defined(__MAKECINT__) || defined(G__DICTIONARY)
229 #ifndef ROOT_Math_GenVector_Cartesian2D
233 #if defined(__MAKECINT__) || defined(G__DICTIONARY)
234 #ifndef ROOT_Math_GenVector_GenVector_exception
249 #if defined(__MAKECINT__) || defined(G__DICTIONARY)
261 void Polar2D<T>::SetY(
Scalar a) {
262 GenVector_exception e(
"Polar2D::SetY() is not supposed to be called");
264 Cartesian2D<Scalar>
v(*
this);
v.SetY(a); *
this = Polar2D<Scalar>(
v);
void GetCoordinates(Scalar &r, Scalar &phi) const
get internal data into 2 Scalar numbers
bool operator!=(const Polar2D &rhs) const
Namespace for new ROOT classes and functions.
void SetR(const T &r)
set the r coordinate value keeping phi constant
void Rotate(T angle)
rotate the vector
Polar2D(const CoordSystem &v)
Construct from any Vector or coordinate system implementing R() and Phi()
bool operator==(const Polar2D &rhs) const
Exact equality.
void SetPhi(const T &phi)
set the phi coordinate value keeping r constant
Polar2D(const Polar2D &v)
copy constructor
Class describing a polar 2D coordinate system based on r and phi Phi is restricted to be in the range...
void Restrict()
restrict abgle hi to be between -PI and PI
void Negate()
negate the vector
Polar2D()
Default constructor with r=1,phi=0.
void SetCoordinates(Scalar r, Scalar phi)
Set internal data based on 2 Scalar numbers.
Class describing a 2D cartesian coordinate system (x, y coordinates)
void SetXY(Scalar a, Scalar b)
set all values using cartesian coordinates
Namespace for new Math classes and functions.
Polar2D & operator=(const Polar2D &v)
assignment operator
void Scale(T a)
scale by a scalar quantity - for polar coordinates r changes
Polar2D(T r, T phi)
Construct from the polar coordinates: r and phi.