ROOT logo
ROOT » MATH » GENVECTOR » ROOT::Math::Cartesian3D<double>

class ROOT::Math::Cartesian3D<double>


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

      @ingroup GenVector

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

ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> >::Cartesian3D, ROOT::Math::LorentzVector<ROOT::Math::PxPyPzM4D<double> >::Cartesian3D, ROOT::Math::AxisAngle::Cartesian3D, ROOT::Math::PositionVector3D<ROOT::Math::Cartesian3D<double>,ROOT::Math::DefaultCoordinateSystemTag>::CoordinateType, ROOT::Math::LorentzVector<ROOT::Math::PtEtaPhiM4D<Double32_t> >::Cartesian3D, ROOT::Math::AxisAngle::Cartesian3D<Scalar>, ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<Double32_t> >::Cartesian3D<Scalar>, ROOT::Math::LorentzVector<ROOT::Math::PxPyPzM4D<Double32_t> >::Cartesian3D<Scalar>, ROOT::Math::LorentzVector<ROOT::Math::PtEtaPhiE4D<double> >::Cartesian3D<Scalar>, ROOT::Math::LorentzVector<ROOT::Math::PxPyPzM4D<double> >::Cartesian3D<Scalar>, ROOT::Math::LorentzVector<ROOT::Math::PtEtaPhiE4D<double> >::Cartesian3D, ROOT::Math::LorentzVector<ROOT::Math::PtEtaPhiM4D<double> >::Cartesian3D<Scalar>, ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> >::Cartesian3D<Scalar>, ROOT::Math::LorentzVector<ROOT::Math::PtEtaPhiM4D<Double32_t> >::Cartesian3D<Scalar>, ROOT::Math::LorentzVector<ROOT::Math::PtEtaPhiE4D<Double32_t> >::Cartesian3D<Scalar>, ROOT::Math::LorentzVector<ROOT::Math::PtEtaPhiM4D<double> >::Cartesian3D, ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D<double>,ROOT::Math::DefaultCoordinateSystemTag>::CoordinateType, ROOT::Math::LorentzVector<ROOT::Math::PxPyPzM4D<Double32_t> >::Cartesian3D, ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<Double32_t> >::Cartesian3D, ROOT::Math::LorentzVector<ROOT::Math::PtEtaPhiE4D<Double32_t> >::Cartesian3D

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 xx, ROOT::Math::Cartesian3D<double>::Scalar yy, ROOT::Math::Cartesian3D<double>::Scalar zz)
ROOT::Math::Cartesian3D<double>::ScalarEta() const
voidGetCoordinates(ROOT::Math::Cartesian3D<double>::Scalar* dest) const
voidGetCoordinates(ROOT::Math::Cartesian3D<double>::Scalar& xx, ROOT::Math::Cartesian3D<double>::Scalar& yy, ROOT::Math::Cartesian3D<double>::Scalar& zz) 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 xx, ROOT::Math::Cartesian3D<double>::Scalar yy, ROOT::Math::Cartesian3D<double>::Scalar zz)
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 xx)
voidSetXYZ(ROOT::Math::Cartesian3D<double>::Scalar xx, ROOT::Math::Cartesian3D<double>::Scalar yy, ROOT::Math::Cartesian3D<double>::Scalar zz)
voidSetY(ROOT::Math::Cartesian3D<double>::Scalar yy)
voidSetZ(ROOT::Math::Cartesian3D<double>::Scalar zz)
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 xx, ROOT::Math::Cartesian3D<double>::Scalar yy, ROOT::Math::Cartesian3D<double>::Scalar zz)
      Set internal data based on 3 Scalar numbers

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

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

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

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

{ fZ = zz; }
void SetXYZ(ROOT::Math::Cartesian3D<double>::Scalar xx, ROOT::Math::Cartesian3D<double>::Scalar yy, ROOT::Math::Cartesian3D<double>::Scalar zz)
       set all values using cartesian coordinates

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() const
 ============= 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() const
{ return Y();}
T z() const
{ 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)