19#ifndef ROOT_Math_GenVector_Polar3D
20#define ROOT_Math_GenVector_Polar3D 1
67 template <
class CoordSystem >
68 explicit constexpr Polar3D(
const CoordSystem &
v ) :
175 template <
class CoordSystem >
196 T
x()
const {
return X(); }
197 T
y()
const {
return Y(); }
198 T
z()
const {
return Z(); }
204#if defined(__ROOTCLING__) || defined(G__DICTIONARY)
236#if defined(__ROOTCLING__) || defined(G__DICTIONARY)
251#if defined(__ROOTCLING__) || defined(G__DICTIONARY)
263void Polar3D<T>::SetY(Scalar yy) {
264 GenVector_exception
e(
"Polar3D::SetY() is not supposed to be called");
266 Cartesian3D<Scalar>
v(*
this);
v.SetY(yy); *
this = Polar3D<Scalar>(
v);
269void Polar3D<T>::SetZ(Scalar zz) {
270 GenVector_exception
e(
"Polar3D::SetZ() is not supposed to be called");
272 Cartesian3D<Scalar>
v(*
this);
v.SetZ(zz); *
this = Polar3D<Scalar>(
v);
Class describing a 3D cartesian coordinate system (x, y, z coordinates).
Class describing a cylindrical coordinate system based on eta (pseudorapidity) instead of z.
Class describing a polar coordinate system based on r, theta and phi Phi is restricted to be in the r...
void Negate()
negate the vector
void SetTheta(const T &theta)
set the theta coordinate value keeping r and phi constant
void SetCoordinates(Scalar r, Scalar theta, Scalar phi)
Set internal data based on 3 Scalar numbers.
bool operator!=(const Polar3D &rhs) const
void SetR(const T &r)
set the r coordinate value keeping theta and phi constant
void SetPhi(const T &phi)
set the phi coordinate value keeping r and theta constant
void Scale(T a)
scale by a scalar quantity - for polar coordinates r changes
void SetCoordinates(const Scalar src[])
Set internal data based on an array of 3 Scalar numbers.
constexpr Polar3D() noexcept=default
Default constructor with r=theta=phi=0.
void GetCoordinates(Scalar &r, Scalar &theta, Scalar &phi) const
get internal data into 3 Scalar numbers
void GetCoordinates(Scalar dest[]) const
get internal data into an array of 3 Scalar numbers
Polar3D & operator=(const CoordSystem &c)
generic assignment operator from any coordinate system
constexpr Polar3D(const CoordSystem &v)
Construct from any Vector or coordinate system implementing R(), Theta() and Phi().
static constexpr unsigned int Dimension
bool operator==(const Polar3D &rhs) const
Exact equality.
void SetXYZ(Scalar x, Scalar y, Scalar z)
set all values using cartesian coordinates
Namespace for new Math classes and functions.
Scalar Eta_FromTheta(Scalar theta, Scalar r)
Implementation of eta from -log(tan(theta/2)).
Rotation3D::Scalar Scalar