class ROOT::Math::Polar2D<double>


       Class describing a polar 2D coordinate system based on r 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::DisplacementVector2D<ROOT::Math::Polar2D<double>,ROOT::Math::DefaultCoordinateSystemTag>::CoordinateType, ROOT::Math::PositionVector2D<ROOT::Math::Polar2D<double>,ROOT::Math::DefaultCoordinateSystemTag>::CoordinateType

Function Members (Methods)

public:
~Polar2D<double>()
voidGetCoordinates(ROOT::Math::Polar2D<double>::Scalar& r, ROOT::Math::Polar2D<double>::Scalar& phi) const
ROOT::Math::Polar2D<double>::ScalarMag2() const
voidNegate()
booloperator!=(const ROOT::Math::Polar2D<double>& rhs) const
ROOT::Math::Polar2D<double>&operator=(const ROOT::Math::Polar2D<double>& v)
booloperator==(const ROOT::Math::Polar2D<double>& rhs) const
ROOT::Math::Polar2D<double>::ScalarPhi() const
ROOT::Math::Polar2D<double>Polar2D<double>()
ROOT::Math::Polar2D<double>Polar2D<double>(const ROOT::Math::Polar2D<double>& v)
ROOT::Math::Polar2D<double>Polar2D<double>(double r, double phi)
ROOT::Math::Polar2D<double>::ScalarR() const
voidRotate(double angle)
voidScale(double a)
voidSetCoordinates(ROOT::Math::Polar2D<double>::Scalar r, ROOT::Math::Polar2D<double>::Scalar phi)
voidSetPhi(const double& phi)
voidSetR(const double& r)
voidSetX(ROOT::Math::Polar2D<double>::Scalar a)
voidSetXY(ROOT::Math::Polar2D<double>::Scalar a, ROOT::Math::Polar2D<double>::Scalar b)
voidSetY(ROOT::Math::Polar2D<double>::Scalar a)
ROOT::Math::Polar2D<double>::ScalarX() const
doublex() const
ROOT::Math::Polar2D<double>::ScalarY() const
doubley() const
private:
static doublepi()
voidRestrict()

Data Members

private:
doublefPhi
doublefR

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

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

void SetCoordinates(ROOT::Math::Polar2D<double>::Scalar r, ROOT::Math::Polar2D<double>::Scalar phi)
      Set internal data based on 2 Scalar numbers

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

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

       set the r coordinate value keeping phi constant

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

Restrict()
void SetXY(ROOT::Math::Polar2D<double>::Scalar a, ROOT::Math::Polar2D<double>::Scalar b)
       set all values using cartesian coordinates

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

Negate()
void Rotate(double angle)
      rotate the vector

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

bool operator!=(const ROOT::Math::Polar2D<double>& rhs) const
{return !(operator==(rhs));}
T x()
 ============= 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()
{ return Y();}
void SetX(ROOT::Math::Polar2D<double>::Scalar a)
 ============= Specializations for improved speed ==================
 (none)
 ====== Set member functions for coordinates in other systems =======
void SetY(ROOT::Math::Polar2D<double>::Scalar a)

Last change: root/mathcore:$Id: Polar2D.h 23735 2008-05-07 21:18:33Z moneta $
Last generated: 2008-06-25 08:29
Copyright (c) 2005 , LCG ROOT MathLib Team and *

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.