ROOT » MATH » GENVECTOR » ROOT::Math::Cylindrical3D<double>

class ROOT::Math::Cylindrical3D<double>


      Class describing a cylindrical coordinate system based on rho, z and phi.
      The base coordinates are rho (transverse component) , z and phi
      Phi is restricted to be in the range [-PI,PI)

      @ingroup GenVector

Function Members (Methods)

public:
~Cylindrical3D<double>()
ROOT::Math::Cylindrical3D<double>Cylindrical3D<double>()
ROOT::Math::Cylindrical3D<double>Cylindrical3D<double>(const ROOT::Math::Cylindrical3D<double>& v)
ROOT::Math::Cylindrical3D<double>Cylindrical3D<double>(const ROOT::Math::Cylindrical3D<double>& v)
ROOT::Math::Cylindrical3D<double>Cylindrical3D<double>(ROOT::Math::Cylindrical3D<double>::Scalar rho, ROOT::Math::Cylindrical3D<double>::Scalar zz, ROOT::Math::Cylindrical3D<double>::Scalar phi)
ROOT::Math::Cylindrical3D<double>::ScalarEta() const
voidGetCoordinates(Scalar[] dest) const
voidGetCoordinates(ROOT::Math::Cylindrical3D<double>::Scalar& rho, ROOT::Math::Cylindrical3D<double>::Scalar& zz, ROOT::Math::Cylindrical3D<double>::Scalar& phi) const
ROOT::Math::Cylindrical3D<double>::ScalarMag2() const
voidNegate()
booloperator!=(const ROOT::Math::Cylindrical3D<double>& rhs) const
ROOT::Math::Cylindrical3D<double>&operator=(const ROOT::Math::Cylindrical3D<double>& v)
ROOT::Math::Cylindrical3D<double>&operator=<ROOT::Math::Cylindrical3D<double> >(const ROOT::Math::Cylindrical3D<double>& c)
booloperator==(const ROOT::Math::Cylindrical3D<double>& rhs) const
ROOT::Math::Cylindrical3D<double>::ScalarPerp2() const
ROOT::Math::Cylindrical3D<double>::ScalarPhi() const
ROOT::Math::Cylindrical3D<double>::ScalarR() const
ROOT::Math::Cylindrical3D<double>::ScalarRho() const
voidScale(double a)
voidSetCoordinates(const Scalar[] src)
voidSetCoordinates(ROOT::Math::Cylindrical3D<double>::Scalar rho, ROOT::Math::Cylindrical3D<double>::Scalar zz, ROOT::Math::Cylindrical3D<double>::Scalar phi)
voidSetPhi(double phi)
voidSetRho(double rho)
voidSetXYZ(ROOT::Math::Cylindrical3D<double>::Scalar x, ROOT::Math::Cylindrical3D<double>::Scalar y, ROOT::Math::Cylindrical3D<double>::Scalar z)
voidSetZ(double zz)
ROOT::Math::Cylindrical3D<double>::ScalarTheta() const
ROOT::Math::Cylindrical3D<double>::ScalarX() const
doublex() const
ROOT::Math::Cylindrical3D<double>::ScalarY() const
doubley() const
ROOT::Math::Cylindrical3D<double>::ScalarZ() const
doublez() const
private:
static ROOT::Math::Cylindrical3D<double>::Scalarpi()
voidRestrict()

Data Members

private:
doublefPhi
doublefRho
doublefZ

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

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

void SetCoordinates(const Scalar[] src)
      Set internal data based on an array of 3 Scalar numbers ( rho, z , phi)

{ fRho=src[0]; fZ=src[1]; fPhi=src[2]; Restrict(); }
void GetCoordinates(Scalar[] dest) const
      get internal data into an array of 3 Scalar numbers ( rho, z , phi)

{ dest[0] = fRho; dest[1] = fZ; dest[2] = fPhi; }
void SetCoordinates(ROOT::Math::Cylindrical3D<double>::Scalar rho, ROOT::Math::Cylindrical3D<double>::Scalar zz, ROOT::Math::Cylindrical3D<double>::Scalar phi)
      Set internal data based on 3 Scalar numbers ( rho, z , phi)

{ fRho=rho; fZ=zz; fPhi=phi; Restrict(); }
void GetCoordinates(ROOT::Math::Cylindrical3D<double>::Scalar& rho, ROOT::Math::Cylindrical3D<double>::Scalar& zz, ROOT::Math::Cylindrical3D<double>::Scalar& phi) const
      get internal data into 3 Scalar numbers ( rho, z , phi)

{rho=fRho; zz=fZ; phi=fPhi;}
Scalar pi()
{ return M_PI; }
void Restrict()
Scalar Rho() const
 accessors
{ return fRho; }
Scalar Z() const
{ return fZ; }
Scalar Phi() const
{ return fPhi; }
Scalar X() const
{ return fRho*std::cos(fPhi); }
Scalar Y() const
{ return fRho*std::sin(fPhi); }
Scalar Mag2() const
{ return fRho*fRho + fZ*fZ; }
Scalar R() const
{ return std::sqrt( Mag2()); }
Scalar Perp2() const
{ return fRho*fRho; }
Scalar Theta() const
{ return (fRho==0 && fZ==0 ) ? 0 : atan2(fRho,fZ); }
Scalar Eta() const
 pseudorapidity - use same implementation as in Cartesian3D
void SetRho(double rho)
 setters (only for data members)

       set the rho coordinate value keeping z and phi constant

void SetZ(double zz)
       set the z coordinate value keeping rho and phi constant

void SetPhi(double phi)
       set the phi coordinate value keeping rho and z constant

void SetXYZ(ROOT::Math::Cylindrical3D<double>::Scalar x, ROOT::Math::Cylindrical3D<double>::Scalar y, ROOT::Math::Cylindrical3D<double>::Scalar z)
       set all values using cartesian coordinates

void Scale(double a)
      scale by a scalar quantity a --
      for cylindrical coords only rho and z change

Negate()
bool operator==(const ROOT::Math::Cylindrical3D<double>& rhs) const
      Exact component-by-component equality

bool operator!=(const ROOT::Math::Cylindrical3D<double>& rhs) const
{return !(operator==(rhs));}
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(); }