ROOT logo
ROOT » MATH » GENVECTOR » ROOT::Math::Polar3D<double>

class ROOT::Math::Polar3D<double>

       Class describing a polar coordinate system based on r, theta and phi
       Phi is restricted to be in the range [-PI,PI)

       @ingroup GenVector

This class is also known as (typedefs to this class)

ROOT::Math::DisplacementVector3D<ROOT::Math::Polar3D<double>,ROOT::Math::DefaultCoordinateSystemTag>::CoordinateType, ROOT::Math::PositionVector3D<ROOT::Math::Polar3D<double>,ROOT::Math::DefaultCoordinateSystemTag>::CoordinateType

Function Members (Methods)

ROOT::Math::Polar3D<double>::ScalarEta() const
voidGetCoordinates(ROOT::Math::Polar3D<double>::Scalar* dest) const
voidGetCoordinates(ROOT::Math::Polar3D<double>::Scalar& r, ROOT::Math::Polar3D<double>::Scalar& theta, ROOT::Math::Polar3D<double>::Scalar& phi) const
ROOT::Math::Polar3D<double>::ScalarMag2() const
booloperator!=(const ROOT::Math::Polar3D<double>& rhs) const
ROOT::Math::Polar3D<double>&operator=(const ROOT::Math::Polar3D<double>& v)
booloperator==(const ROOT::Math::Polar3D<double>& rhs) const
ROOT::Math::Polar3D<double>::ScalarPerp2() const
ROOT::Math::Polar3D<double>::ScalarPhi() const
ROOT::Math::Polar3D<double>Polar3D<double>(const ROOT::Math::Polar3D<double>& v)
ROOT::Math::Polar3D<double>Polar3D<double>(double r, double theta, double phi)
ROOT::Math::Polar3D<double>::ScalarR() const
ROOT::Math::Polar3D<double>::ScalarRho() const
voidScale(double a)
voidSetCoordinates(const ROOT::Math::Polar3D<double>::Scalar* src)
voidSetCoordinates(ROOT::Math::Polar3D<double>::Scalar r, ROOT::Math::Polar3D<double>::Scalar theta, ROOT::Math::Polar3D<double>::Scalar phi)
voidSetEta(ROOT::Math::Polar3D<double>::Scalar eta)
voidSetPhi(const double& phi)
voidSetR(const double& r)
voidSetRho(ROOT::Math::Polar3D<double>::Scalar rho)
voidSetTheta(const double& theta)
voidSetX(ROOT::Math::Polar3D<double>::Scalar xx)
voidSetXYZ(ROOT::Math::Polar3D<double>::Scalar xx, ROOT::Math::Polar3D<double>::Scalar yy, ROOT::Math::Polar3D<double>::Scalar zz)
voidSetY(ROOT::Math::Polar3D<double>::Scalar yy)
voidSetZ(ROOT::Math::Polar3D<double>::Scalar zz)
ROOT::Math::Polar3D<double>::ScalarTheta() const
ROOT::Math::Polar3D<double>::ScalarX() const
doublex() const
ROOT::Math::Polar3D<double>::ScalarY() const
doubley() const
ROOT::Math::Polar3D<double>::ScalarZ() const
doublez() const
static ROOT::Math::Polar3D<double>::Scalarpi()

Data Members


Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

Polar3D & operator=(const ROOT::Math::Polar3D<double>& v)
      assignment operator

void SetCoordinates(const ROOT::Math::Polar3D<double>::Scalar* src)
      Set internal data based on an array of 3 Scalar numbers

{ fR=src[0]; fTheta=src[1]; fPhi=src[2]; Restrict(); }
void GetCoordinates(ROOT::Math::Polar3D<double>::Scalar* dest) const
      get internal data into an array of 3 Scalar numbers

{ dest[0] = fR; dest[1] = fTheta; dest[2] = fPhi; }
void SetCoordinates(ROOT::Math::Polar3D<double>::Scalar r, ROOT::Math::Polar3D<double>::Scalar theta, ROOT::Math::Polar3D<double>::Scalar phi)
      Set internal data based on 3 Scalar numbers

{ fR=r; fTheta=theta; fPhi=phi; Restrict(); }
void GetCoordinates(ROOT::Math::Polar3D<double>::Scalar& r, ROOT::Math::Polar3D<double>::Scalar& theta, ROOT::Math::Polar3D<double>::Scalar& phi) const
      get internal data into 3 Scalar numbers

{r=fR; theta=fTheta; phi=fPhi;}
Scalar R() const
{ return fR;}
Scalar Phi() const
{ return fPhi; }
Scalar Theta() const
{ return fTheta; }
Scalar Rho() const
{ return fR*std::sin(fTheta); }
Scalar X() const
{ return Rho()*std::cos(fPhi);}
Scalar Y() const
{ return Rho()*std::sin(fPhi);}
Scalar Z() const
{ return fR*std::cos(fTheta); }
Scalar Mag2() const
{ return fR*fR;}
Scalar Perp2() const
{ return Rho()*Rho(); }
Scalar Eta() const
void SetR(const double& r)
 setters (only for data members)

       set the r coordinate value keeping theta and phi constant

void SetTheta(const double& theta)
       set the theta coordinate value keeping r and phi constant

void SetPhi(const double& phi)
       set the phi coordinate value keeping r and theta constant

void SetXYZ(ROOT::Math::Polar3D<double>::Scalar xx, ROOT::Math::Polar3D<double>::Scalar yy, ROOT::Math::Polar3D<double>::Scalar zz)
       set all values using cartesian coordinates

Scalar pi()
{ return M_PI; }
void Scale(double a)
       scale by a scalar quantity - for polar coordinates r changes

bool operator==(const ROOT::Math::Polar3D<double>& rhs) const
      Exact equality

bool operator!=(const ROOT::Math::Polar3D<double>& rhs) const
{return !(operator==(rhs));}
T x() const
 ============= Compatibility section ==================
 The following make this coordinate system look enough like a CLHEP
 vector that an assignment member template can work with either
{ return X();}
T y() const
{ return Y();}
T z() const
{ return Z(); }
void SetX(ROOT::Math::Polar3D<double>::Scalar xx)
 ============= Specializations for improved speed ==================
 ====== Set member functions for coordinates in other systems =======
void SetY(ROOT::Math::Polar3D<double>::Scalar yy)
void SetZ(ROOT::Math::Polar3D<double>::Scalar zz)
void SetRho(ROOT::Math::Polar3D<double>::Scalar rho)
void SetEta(ROOT::Math::Polar3D<double>::Scalar eta)