class ROOT::Math::Cylindrical3D<Double32_t>

```
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

```

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

ROOT::Math::PositionVector3D<ROOT::Math::Cylindrical3D<Double32_t>,ROOT::Math::DefaultCoordinateSystemTag>::CoordinateType, ROOT::Math::DisplacementVector3D<ROOT::Math::Cylindrical3D<Double32_t>,ROOT::Math::DefaultCoordinateSystemTag>::CoordinateType

Function Members (Methods)

public:
 ~Cylindrical3D() ROOT::Math::Cylindrical3D Cylindrical3D() ROOT::Math::Cylindrical3D Cylindrical3D(const ROOT::Math::Cylindrical3D& v) ROOT::Math::Cylindrical3D Cylindrical3D(ROOT::Math::Cylindrical3D::Scalar rho, ROOT::Math::Cylindrical3D::Scalar zz, ROOT::Math::Cylindrical3D::Scalar phi) ROOT::Math::Cylindrical3D::Scalar Eta() const void GetCoordinates(ROOT::Math::Cylindrical3D::Scalar* dest) const void GetCoordinates(ROOT::Math::Cylindrical3D::Scalar& rho, ROOT::Math::Cylindrical3D::Scalar& zz, ROOT::Math::Cylindrical3D::Scalar& phi) const ROOT::Math::Cylindrical3D::Scalar Mag2() const void Negate() bool operator!=(const ROOT::Math::Cylindrical3D& rhs) const ROOT::Math::Cylindrical3D& operator=(const ROOT::Math::Cylindrical3D& v) bool operator==(const ROOT::Math::Cylindrical3D& rhs) const ROOT::Math::Cylindrical3D::Scalar Perp2() const ROOT::Math::Cylindrical3D::Scalar Phi() const ROOT::Math::Cylindrical3D::Scalar R() const ROOT::Math::Cylindrical3D::Scalar Rho() const void Scale(Double32_t a) void SetCoordinates(const ROOT::Math::Cylindrical3D::Scalar* src) void SetCoordinates(ROOT::Math::Cylindrical3D::Scalar rho, ROOT::Math::Cylindrical3D::Scalar zz, ROOT::Math::Cylindrical3D::Scalar phi) void SetEta(ROOT::Math::Cylindrical3D::Scalar eta) void SetPhi(Double32_t phi) void SetR(ROOT::Math::Cylindrical3D::Scalar r) void SetRho(Double32_t rho) void SetTheta(ROOT::Math::Cylindrical3D::Scalar theta) void SetX(ROOT::Math::Cylindrical3D::Scalar xx) void SetXYZ(ROOT::Math::Cylindrical3D::Scalar xx, ROOT::Math::Cylindrical3D::Scalar yy, ROOT::Math::Cylindrical3D::Scalar zz) void SetY(ROOT::Math::Cylindrical3D::Scalar yy) void SetZ(Double32_t zz) ROOT::Math::Cylindrical3D::Scalar Theta() const ROOT::Math::Cylindrical3D::Scalar X() const Double32_t x() const ROOT::Math::Cylindrical3D::Scalar Y() const Double32_t y() const ROOT::Math::Cylindrical3D::Scalar Z() const Double32_t z() const
private:
 static ROOT::Math::Cylindrical3D::Scalar pi() void Restrict()

Data Members

private:
 Double32_t fPhi Double32_t fRho Double32_t fZ

Function documentation

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

```
void SetCoordinates(const ROOT::Math::Cylindrical3D<Double32_t>::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(ROOT::Math::Cylindrical3D<Double32_t>::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<Double32_t>::Scalar rho, ROOT::Math::Cylindrical3D<Double32_t>::Scalar zz, ROOT::Math::Cylindrical3D<Double32_t>::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<Double32_t>::Scalar& rho, ROOT::Math::Cylindrical3D<Double32_t>::Scalar& zz, ROOT::Math::Cylindrical3D<Double32_t>::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(Double32_t rho)
``` setters (only for data members)

set the rho coordinate value keeping z and phi constant

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

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

```
void SetXYZ(ROOT::Math::Cylindrical3D<Double32_t>::Scalar xx, ROOT::Math::Cylindrical3D<Double32_t>::Scalar yy, ROOT::Math::Cylindrical3D<Double32_t>::Scalar zz)
```       set all values using cartesian coordinates

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

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

```
bool operator!=(const ROOT::Math::Cylindrical3D<Double32_t>& 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(); }`
void SetX(ROOT::Math::Cylindrical3D<Double32_t>::Scalar xx)
``` ============= Specializations for improved speed ==================
(none)
====== Set member functions for coordinates in other systems =======
```
void SetY(ROOT::Math::Cylindrical3D<Double32_t>::Scalar yy)
void SetEta(ROOT::Math::Cylindrical3D<Double32_t>::Scalar eta)
void SetR(ROOT::Math::Cylindrical3D<Double32_t>::Scalar r)
void SetTheta(ROOT::Math::Cylindrical3D<Double32_t>::Scalar theta)