Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Math::Polar3D< T > Class Template Reference

template<class T>
class ROOT::Math::Polar3D< T >

Class describing a polar coordinate system based on r, theta and phi Phi is restricted to be in the range [-PI,PI)

Class describing a 3D Polar coordinate system (r, theta, phi coordinates)

See also
Overview of the physics vector library

Definition at line 45 of file Polar3D.h.

Public Types

typedefScalar
 

Public Member Functions

 Polar3D ()
 Default constructor with r=theta=phi=0.
 
template<class CoordSystem >
constexpr Polar3D (const CoordSystem &v)
 Construct from any Vector or coordinate system implementing R(), Theta() and Phi()
 
 Polar3D (const Polar3D &v)
 copy constructor
 
 Polar3D (T r, T theta, T phi)
 Construct from the polar coordinates: r, theta and phi.
 
Scalar Eta () const
 
void GetCoordinates (Scalar &r, Scalar &theta, Scalar &phi) const
 get internal data into 3 Scalar numbers
 
void GetCoordinates (Scalar dest[]) const
 get internal data into an array of 3 Scalar numbers
 
Scalar Mag2 () const
 
void Negate ()
 negate the vector
 
bool operator!= (const Polar3D &rhs) const
 
template<class CoordSystem >
Polar3Doperator= (const CoordSystem &c)
 generic assignment operator from any coordinate system
 
Polar3Doperator= (const Polar3D &v)
 assignment operator
 
bool operator== (const Polar3D &rhs) const
 Exact equality.
 
Scalar Perp2 () const
 
Scalar Phi () const
 
Scalar R () const
 
Scalar Rho () const
 
void Scale (T a)
 scale by a scalar quantity - for polar coordinates r changes
 
void SetCoordinates (const Scalar src[])
 Set internal data based on an array of 3 Scalar numbers.
 
void SetCoordinates (Scalar r, Scalar theta, Scalar phi)
 Set internal data based on 3 Scalar numbers.
 
void SetPhi (const T &phi)
 set the phi coordinate value keeping r and theta constant
 
void SetR (const T &r)
 set the r coordinate value keeping theta and phi constant
 
void SetTheta (const T &theta)
 set the theta coordinate value keeping r and phi constant
 
void SetXYZ (Scalar x, Scalar y, Scalar z)
 set all values using cartesian coordinates
 
Scalar Theta () const
 
Scalar X () const
 
x () const
 
Scalar Y () const
 
y () const
 
Scalar Z () const
 
z () const
 

Static Public Attributes

static constexpr unsigned int Dimension = 3U
 

Private Member Functions

void Restrict ()
 

Static Private Member Functions

static Scalar pi ()
 

Private Attributes

fPhi
 
fR
 
fTheta
 

#include <Math/GenVector/Polar3D.h>

Member Typedef Documentation

◆ Scalar

template<class T >
typedef T ROOT::Math::Polar3D< T >::Scalar

Definition at line 49 of file Polar3D.h.

Constructor & Destructor Documentation

◆ Polar3D() [1/4]

template<class T >
ROOT::Math::Polar3D< T >::Polar3D ( )
inline

Default constructor with r=theta=phi=0.

Definition at line 55 of file Polar3D.h.

◆ Polar3D() [2/4]

template<class T >
ROOT::Math::Polar3D< T >::Polar3D ( T r,
T theta,
T phi )
inline

Construct from the polar coordinates: r, theta and phi.

Definition at line 60 of file Polar3D.h.

◆ Polar3D() [3/4]

template<class T >
template<class CoordSystem >
constexpr ROOT::Math::Polar3D< T >::Polar3D ( const CoordSystem & v)
inlineexplicitconstexpr

Construct from any Vector or coordinate system implementing R(), Theta() and Phi()

Definition at line 67 of file Polar3D.h.

◆ Polar3D() [4/4]

template<class T >
ROOT::Math::Polar3D< T >::Polar3D ( const Polar3D< T > & v)
inline

copy constructor

Definition at line 76 of file Polar3D.h.

Member Function Documentation

◆ Eta()

template<class T >
Scalar ROOT::Math::Polar3D< T >::Eta ( ) const
inline

Definition at line 124 of file Polar3D.h.

◆ GetCoordinates() [1/2]

template<class T >
void ROOT::Math::Polar3D< T >::GetCoordinates ( Scalar & r,
Scalar & theta,
Scalar & phi ) const
inline

get internal data into 3 Scalar numbers

Definition at line 110 of file Polar3D.h.

◆ GetCoordinates() [2/2]

template<class T >
void ROOT::Math::Polar3D< T >::GetCoordinates ( Scalar dest[]) const
inline

get internal data into an array of 3 Scalar numbers

Definition at line 98 of file Polar3D.h.

◆ Mag2()

template<class T >
Scalar ROOT::Math::Polar3D< T >::Mag2 ( ) const
inline

Definition at line 120 of file Polar3D.h.

◆ Negate()

template<class T >
void ROOT::Math::Polar3D< T >::Negate ( )
inline

negate the vector

Definition at line 184 of file Polar3D.h.

◆ operator!=()

template<class T >
bool ROOT::Math::Polar3D< T >::operator!= ( const Polar3D< T > & rhs) const
inline

Definition at line 207 of file Polar3D.h.

◆ operator=() [1/2]

template<class T >
template<class CoordSystem >
Polar3D & ROOT::Math::Polar3D< T >::operator= ( const CoordSystem & c)
inline

generic assignment operator from any coordinate system

Definition at line 194 of file Polar3D.h.

◆ operator=() [2/2]

template<class T >
Polar3D & ROOT::Math::Polar3D< T >::operator= ( const Polar3D< T > & v)
inline

assignment operator

Definition at line 82 of file Polar3D.h.

◆ operator==()

template<class T >
bool ROOT::Math::Polar3D< T >::operator== ( const Polar3D< T > & rhs) const
inline

Exact equality.

Definition at line 204 of file Polar3D.h.

◆ Perp2()

template<class T >
Scalar ROOT::Math::Polar3D< T >::Perp2 ( ) const
inline

Definition at line 121 of file Polar3D.h.

◆ Phi()

template<class T >
Scalar ROOT::Math::Polar3D< T >::Phi ( ) const
inline

Definition at line 114 of file Polar3D.h.

◆ pi()

template<class T >
static Scalar ROOT::Math::Polar3D< T >::pi ( )
inlinestaticprivate

Definition at line 161 of file Polar3D.h.

◆ R()

template<class T >
Scalar ROOT::Math::Polar3D< T >::R ( ) const
inline

Definition at line 113 of file Polar3D.h.

◆ Restrict()

template<class T >
void ROOT::Math::Polar3D< T >::Restrict ( )
inlineprivate

Definition at line 162 of file Polar3D.h.

◆ Rho()

template<class T >
Scalar ROOT::Math::Polar3D< T >::Rho ( ) const
inline

Definition at line 116 of file Polar3D.h.

◆ Scale()

template<class T >
void ROOT::Math::Polar3D< T >::Scale ( T a)
inline

scale by a scalar quantity - for polar coordinates r changes

Definition at line 172 of file Polar3D.h.

◆ SetCoordinates() [1/2]

template<class T >
void ROOT::Math::Polar3D< T >::SetCoordinates ( const Scalar src[])
inline

Set internal data based on an array of 3 Scalar numbers.

Definition at line 92 of file Polar3D.h.

◆ SetCoordinates() [2/2]

template<class T >
void ROOT::Math::Polar3D< T >::SetCoordinates ( Scalar r,
Scalar theta,
Scalar phi )
inline

Set internal data based on 3 Scalar numbers.

Definition at line 104 of file Polar3D.h.

◆ SetPhi()

template<class T >
void ROOT::Math::Polar3D< T >::SetPhi ( const T & phi)
inline

set the phi coordinate value keeping r and theta constant

Definition at line 149 of file Polar3D.h.

◆ SetR()

template<class T >
void ROOT::Math::Polar3D< T >::SetR ( const T & r)
inline

set the r coordinate value keeping theta and phi constant

Definition at line 135 of file Polar3D.h.

◆ SetTheta()

template<class T >
void ROOT::Math::Polar3D< T >::SetTheta ( const T & theta)
inline

set the theta coordinate value keeping r and phi constant

Definition at line 142 of file Polar3D.h.

◆ SetXYZ()

template<class T >
void ROOT::Math::Polar3D< T >::SetXYZ ( Scalar x,
Scalar y,
Scalar z )

set all values using cartesian coordinates

Definition at line 265 of file Polar3D.h.

◆ Theta()

template<class T >
Scalar ROOT::Math::Polar3D< T >::Theta ( ) const
inline

Definition at line 115 of file Polar3D.h.

◆ X()

template<class T >
Scalar ROOT::Math::Polar3D< T >::X ( ) const
inline

Definition at line 117 of file Polar3D.h.

◆ x()

template<class T >
T ROOT::Math::Polar3D< T >::x ( ) const
inline

Definition at line 214 of file Polar3D.h.

◆ Y()

template<class T >
Scalar ROOT::Math::Polar3D< T >::Y ( ) const
inline

Definition at line 118 of file Polar3D.h.

◆ y()

template<class T >
T ROOT::Math::Polar3D< T >::y ( ) const
inline

Definition at line 215 of file Polar3D.h.

◆ Z()

template<class T >
Scalar ROOT::Math::Polar3D< T >::Z ( ) const
inline

Definition at line 119 of file Polar3D.h.

◆ z()

template<class T >
T ROOT::Math::Polar3D< T >::z ( ) const
inline

Definition at line 216 of file Polar3D.h.

Member Data Documentation

◆ Dimension

template<class T >
constexpr unsigned int ROOT::Math::Polar3D< T >::Dimension = 3U
staticconstexpr

Definition at line 50 of file Polar3D.h.

◆ fPhi

template<class T >
T ROOT::Math::Polar3D< T >::fPhi
private

Definition at line 241 of file Polar3D.h.

◆ fR

template<class T >
T ROOT::Math::Polar3D< T >::fR
private

Definition at line 239 of file Polar3D.h.

◆ fTheta

template<class T >
T ROOT::Math::Polar3D< T >::fTheta
private

Definition at line 240 of file Polar3D.h.

  • math/genvector/inc/Math/GenVector/Polar3D.h