16#ifndef ROOT_Math_GenVector_Cartesian2D
17#define ROOT_Math_GenVector_Cartesian2D 1
38template <
class T =
double>
61 template <
class CoordSystem>
124 template <
class CoordSystem>
155 fX =
r * cos(
v.Phi());
157 fY =
r * sin(
v.Phi());
169 fX =
r * cos(
v.Phi());
171 fY =
r * sin(
v.Phi());
177#if defined(__MAKECINT__) || defined(G__DICTIONARY)
203#if defined(__MAKECINT__) || defined(G__DICTIONARY)
218 void Cartesian2D<T>::SetR(Scalar
r) {
219 GenVector_exception
e(
"Cartesian2D::SetR() is not supposed to be called");
226 void Cartesian2D<T>::SetPhi(Scalar phi) {
227 GenVector_exception
e(
"Cartesian2D::SetPhi() is not supposed to be called");
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint angle
Class describing a 2D cartesian coordinate system (x, y coordinates)
void SetX(Scalar a)
set the x coordinate value keeping y constant
bool operator!=(const Cartesian2D &rhs) const
bool operator==(const Cartesian2D &rhs) const
Exact equality.
void Scale(Scalar a)
scale the vector by a scalar quantity a
void Negate()
negate the vector
void SetY(Scalar a)
set the y coordinate value keeping x constant
void SetXY(Scalar xx, Scalar yy)
set all values using cartesian coordinates
static constexpr unsigned int Dimension
void GetCoordinates(Scalar &xx, Scalar &yy) const
get internal data into 2 Scalar numbers
constexpr Cartesian2D(const CoordSystem &v)
Construct from any Vector or coordinate system implementing X() and Y()
constexpr Cartesian2D(const Polar2D< T2 > &v)
Cartesian2D & operator=(const CoordSystem &v)
Assignment from any class implementing x(),y() (can assign from any coordinate system)
void SetCoordinates(Scalar xx, Scalar yy)
Set internal data based on 2 Scalar numbers.
T fX
(Contiguous) data containing the coordinates values x and y
constexpr Cartesian2D() noexcept=default
Default constructor with x=y=0.
void Rotate(Scalar angle)
rotate by an angle
Namespace for new Math classes and functions.
VecExpr< UnaryOp< Sqrt< T >, VecExpr< A, T, D >, T >, T, D > sqrt(const VecExpr< A, T, D > &rhs)
Rotation3D::Scalar Scalar
Namespace for new ROOT classes and functions.