class ROOT::Math::Cartesian2D<Double32_t>


       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<Double32_t>,ROOT::Math::DefaultCoordinateSystemTag>::CoordinateType

Function Members (Methods)

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

Data Members

private:
Double32_tfX
Double32_tfY

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

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

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

{ fX=xx; fY=yy; }
void GetCoordinates(ROOT::Math::Cartesian2D<Double32_t>::Scalar& xx, ROOT::Math::Cartesian2D<Double32_t>::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<Double32_t>::Scalar a)
       set the x coordinate value keeping y constant

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

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

void Scale(ROOT::Math::Cartesian2D<Double32_t>::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<Double32_t>::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<Double32_t>::Scalar r)
 ====== Set member functions for coordinates in other systems =======
void SetPhi(ROOT::Math::Cartesian2D<Double32_t>::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.