class ROOT::Math::Cartesian2D<double>


       Class describing a 2D cartesian coordinate system
       (x, y coordinates)

       @ingroup GenVector

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

ROOT::Math::DisplacementVector2D<ROOT::Math::Cartesian2D<double>,ROOT::Math::DefaultCoordinateSystemTag>::CoordinateType, ROOT::Math::PositionVector2D<ROOT::Math::Cartesian2D<double>,ROOT::Math::DefaultCoordinateSystemTag>::CoordinateType

Function Members (Methods)

public:
~Cartesian2D<double>()
ROOT::Math::Cartesian2D<double>Cartesian2D<double>()
ROOT::Math::Cartesian2D<double>Cartesian2D<double>(const ROOT::Math::Cartesian2D<double>& v)
ROOT::Math::Cartesian2D<double>Cartesian2D<double>(ROOT::Math::Cartesian2D<double>::Scalar xx, ROOT::Math::Cartesian2D<double>::Scalar yy)
voidGetCoordinates(ROOT::Math::Cartesian2D<double>::Scalar& xx, ROOT::Math::Cartesian2D<double>::Scalar& yy) const
ROOT::Math::Cartesian2D<double>::ScalarMag2() const
voidNegate()
booloperator!=(const ROOT::Math::Cartesian2D<double>& rhs) const
ROOT::Math::Cartesian2D<double>&operator=(const ROOT::Math::Cartesian2D<double>& v)
booloperator==(const ROOT::Math::Cartesian2D<double>& rhs) const
ROOT::Math::Cartesian2D<double>::ScalarPhi() const
ROOT::Math::Cartesian2D<double>::ScalarR() const
voidRotate(ROOT::Math::Cartesian2D<double>::Scalar angle)
voidScale(ROOT::Math::Cartesian2D<double>::Scalar a)
voidSetCoordinates(ROOT::Math::Cartesian2D<double>::Scalar xx, ROOT::Math::Cartesian2D<double>::Scalar yy)
voidSetPhi(ROOT::Math::Cartesian2D<double>::Scalar phi)
voidSetR(ROOT::Math::Cartesian2D<double>::Scalar r)
voidSetX(ROOT::Math::Cartesian2D<double>::Scalar a)
voidSetXY(ROOT::Math::Cartesian2D<double>::Scalar xx, ROOT::Math::Cartesian2D<double>::Scalar yy)
voidSetY(ROOT::Math::Cartesian2D<double>::Scalar a)
ROOT::Math::Cartesian2D<double>::ScalarX() const
ROOT::Math::Cartesian2D<double>::Scalarx() const
ROOT::Math::Cartesian2D<double>::ScalarY() const
ROOT::Math::Cartesian2D<double>::Scalary() const

Data Members

private:
doublefX
doublefY

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

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

void SetCoordinates(ROOT::Math::Cartesian2D<double>::Scalar xx, ROOT::Math::Cartesian2D<double>::Scalar yy)
      Set internal data based on 2 Scalar numbers

{ fX=xx; fY=yy; }
void GetCoordinates(ROOT::Math::Cartesian2D<double>::Scalar& xx, ROOT::Math::Cartesian2D<double>::Scalar& yy) const
      get internal data into 2 Scalar numbers

{xx=fX; yy=fY; }
Scalar X()
{ return fX;}
Scalar Y()
{ return fY;}
Scalar Mag2()
{ return fX*fX + fY*fY; }
Scalar R()
{ return std::sqrt( Mag2());}
Scalar Phi()
{ return (fX==0 && fY==0) ? 0.0 : atan2(fY,fX);}
void SetX(ROOT::Math::Cartesian2D<double>::Scalar a)
       set the x coordinate value keeping y constant

{ fX = a; }
void SetY(ROOT::Math::Cartesian2D<double>::Scalar a)
       set the y coordinate value keeping x constant

{ fY = a; }
void SetXY(ROOT::Math::Cartesian2D<double>::Scalar xx, ROOT::Math::Cartesian2D<double>::Scalar yy)
       set all values using cartesian coordinates

void Scale(ROOT::Math::Cartesian2D<double>::Scalar a)
      scale the vector by a scalar quantity a

{ fX *= a; fY *= a; }
void Negate()
      negate the vector

{ fX = -fX; fY = -fY; }
void Rotate(ROOT::Math::Cartesian2D<double>::Scalar angle)
       rotate by an angle

Scalar 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();}
Scalar y()
{ return Y();}
void SetR(ROOT::Math::Cartesian2D<double>::Scalar r)
 ====== Set member functions for coordinates in other systems =======
void SetPhi(ROOT::Math::Cartesian2D<double>::Scalar phi)

Last change: root/mathcore:$Id: Cartesian2D.h 24027 2008-05-26 20:50:41Z moneta $
Last generated: 2008-06-25 08:29
Copyright (c) 2005 , LCG ROOT MathLib Team *

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.