class ROOT::Math::Cartesian3D<double>


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

@ingroup GenVector

Function Members (Methods)

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

Data Members

private:
doublefXx coordinate
doublefYy coordinate
doublefZz coordinate

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

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

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

{ fX=src[0]; fY=src[1]; fZ=src[2]; }
void GetCoordinates(ROOT::Math::Cartesian3D<double>::Scalar* dest) const
get internal data into an array of 3 Scalar numbers

{ dest[0] = fX; dest[1] = fY; dest[2] = fZ; }
void SetCoordinates(ROOT::Math::Cartesian3D<double>::Scalar x, ROOT::Math::Cartesian3D<double>::Scalar y, ROOT::Math::Cartesian3D<double>::Scalar z)
Set internal data based on 3 Scalar numbers

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

{x=fX; y=fY; z=fZ;}
Scalar X()
{ return fX;}
Scalar Y()
{ return fY;}
Scalar Z()
{ return fZ;}
Scalar Mag2()
{ return fX*fX + fY*fY + fZ*fZ;}
Scalar Perp2()
{ return fX*fX + fY*fY ;}
Scalar Rho()
{ return std::sqrt( Perp2());}
Scalar R()
{ return std::sqrt( Mag2());}
Scalar Theta()
Scalar Phi()
{ return (fX==0 && fY==0) ? 0.0 : atan2(fY,fX);}
Scalar Eta()
 pseudorapidity
void SetX(ROOT::Math::Cartesian3D<double>::Scalar x)
set the x coordinate value keeping y and z constant

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

{ fY = y; }
void SetZ(ROOT::Math::Cartesian3D<double>::Scalar z)
set the z coordinate value keeping x and y constant

{ fZ = z; }
void SetXYZ(ROOT::Math::Cartesian3D<double>::Scalar x, ROOT::Math::Cartesian3D<double>::Scalar y, ROOT::Math::Cartesian3D<double>::Scalar z)
 all values using cartesian coordina

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

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

{ fX = -fX; fY = -fY; fZ = -fZ; }
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();}
T z()
{ return Z(); }
void SetR(ROOT::Math::Cartesian3D<double>::Scalar r)
 ====== Set member functions for coordinates in other systems =======
void SetTheta(ROOT::Math::Cartesian3D<double>::Scalar theta)
void SetPhi(ROOT::Math::Cartesian3D<double>::Scalar phi)
void SetRho(ROOT::Math::Cartesian3D<double>::Scalar rho)
void SetEta(ROOT::Math::Cartesian3D<double>::Scalar eta)

Last update: root/mathcore:$Id: Cartesian3D.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.