class ROOT::Math::Cartesian2D<double>


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

@ingroup GenVector

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 x, ROOT::Math::Cartesian2D<double>::Scalar y)
voidGetCoordinates(ROOT::Math::Cartesian2D<double>::Scalar& x, ROOT::Math::Cartesian2D<double>::Scalar& y) 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 x, ROOT::Math::Cartesian2D<double>::Scalar y)
voidSetPhi(ROOT::Math::Cartesian2D<double>::Scalar phi)
voidSetR(ROOT::Math::Cartesian2D<double>::Scalar r)
voidSetX(ROOT::Math::Cartesian2D<double>::Scalar x)
voidSetXY(ROOT::Math::Cartesian2D<double>::Scalar x, ROOT::Math::Cartesian2D<double>::Scalar y)
voidSetY(ROOT::Math::Cartesian2D<double>::Scalar y)
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 x, ROOT::Math::Cartesian2D<double>::Scalar y)
Set internal data based on 2 Scalar numbers

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

{x=fX; y=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 x)
set the x coordinate value keeping y constant

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

{ fY = y; }
void SetXY(ROOT::Math::Cartesian2D<double>::Scalar x, ROOT::Math::Cartesian2D<double>::Scalar y)
 all values using cartesian coordina

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 update: root/mathcore:$Id: Cartesian2D.h 21503 2007-12-19 17:34:54Z moneta $
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.