ROOT  6.06/09
Reference Guide
Public Types | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
ROOT::Math::Polar2D< T > Class Template Reference

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

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

Class describing a 2D Polar coordinate system

(r, phi coordinates)

Definition at line 47 of file Polar2D.h.

Public Types

typedef T Scalar
 

Public Member Functions

 Polar2D ()
 Default constructor with r=1,phi=0. More...
 
 Polar2D (T r, T phi)
 Construct from the polar coordinates: r and phi. More...
 
template<class CoordSystem >
 Polar2D (const CoordSystem &v)
 Construct from any Vector or coordinate system implementing R() and Phi() More...
 
 Polar2D (const Polar2D &v)
 copy constructor More...
 
Polar2Doperator= (const Polar2D &v)
 assignment operator More...
 
void SetCoordinates (Scalar r, Scalar phi)
 Set internal data based on 2 Scalar numbers. More...
 
void GetCoordinates (Scalar &r, Scalar &phi) const
 get internal data into 2 Scalar numbers More...
 
Scalar R () const
 
Scalar Phi () const
 
Scalar X () const
 
Scalar Y () const
 
Scalar Mag2 () const
 
void SetR (const T &r)
 set the r coordinate value keeping phi constant More...
 
void SetPhi (const T &phi)
 set the phi coordinate value keeping r constant More...
 
void SetXY (Scalar a, Scalar b)
 set all values using cartesian coordinates More...
 
void Scale (T a)
 scale by a scalar quantity - for polar coordinates r changes More...
 
void Negate ()
 negate the vector More...
 
void Rotate (T angle)
 rotate the vector More...
 
template<class CoordSystem >
Polar2Doperator= (const CoordSystem &c)
 generic assignment operator from any coordinate system More...
 
bool operator== (const Polar2D &rhs) const
 Exact equality. More...
 
bool operator!= (const Polar2D &rhs) const
 
x () const
 
y () const
 

Private Member Functions

void Restrict ()
 restrict abgle hi to be between -PI and PI More...
 

Static Private Member Functions

static double pi ()
 

Private Attributes

fR
 
fPhi
 

#include <Math/GenVector/Polar2D.h>

+ Collaboration diagram for ROOT::Math::Polar2D< T >:

Member Typedef Documentation

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

Definition at line 51 of file Polar2D.h.

Constructor & Destructor Documentation

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

Default constructor with r=1,phi=0.

Definition at line 56 of file Polar2D.h.

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

Construct from the polar coordinates: r and phi.

Definition at line 61 of file Polar2D.h.

template<class T>
template<class CoordSystem >
ROOT::Math::Polar2D< T >::Polar2D ( const CoordSystem &  v)
inlineexplicit

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

Definition at line 68 of file Polar2D.h.

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

copy constructor

Definition at line 77 of file Polar2D.h.

Member Function Documentation

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

get internal data into 2 Scalar numbers

Definition at line 99 of file Polar2D.h.

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

Definition at line 106 of file Polar2D.h.

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

negate the vector

Definition at line 163 of file Polar2D.h.

Referenced by ROOT::Math::Polar2D< T >::Scale().

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

Definition at line 192 of file Polar2D.h.

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

assignment operator

Definition at line 83 of file Polar2D.h.

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

generic assignment operator from any coordinate system

Definition at line 180 of file Polar2D.h.

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

Exact equality.

Definition at line 189 of file Polar2D.h.

Referenced by ROOT::Math::Polar2D< T >::operator!=().

template<class T>
Scalar ROOT::Math::Polar2D< T >::Phi ( ) const
inline
template<class T>
static double ROOT::Math::Polar2D< T >::pi ( )
inlinestaticprivate
template<class T>
Scalar ROOT::Math::Polar2D< T >::R ( ) const
inline
template<class T>
void ROOT::Math::Polar2D< T >::Restrict ( )
inlineprivate
template<class T>
void ROOT::Math::Polar2D< T >::Rotate ( angle)
inline

rotate the vector

Definition at line 170 of file Polar2D.h.

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

scale by a scalar quantity - for polar coordinates r changes

Definition at line 151 of file Polar2D.h.

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

Set internal data based on 2 Scalar numbers.

Definition at line 93 of file Polar2D.h.

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

set the phi coordinate value keeping r constant

Definition at line 123 of file Polar2D.h.

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

set the r coordinate value keeping phi constant

Definition at line 115 of file Polar2D.h.

template<class T >
void ROOT::Math::Polar2D< T >::SetXY ( Scalar  a,
Scalar  b 
)

set all values using cartesian coordinates

Definition at line 244 of file Polar2D.h.

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

Definition at line 104 of file Polar2D.h.

Referenced by ROOT::Math::Polar2D< T >::x().

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

Definition at line 199 of file Polar2D.h.

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

Definition at line 105 of file Polar2D.h.

Referenced by ROOT::Math::Polar2D< T >::y().

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

Definition at line 200 of file Polar2D.h.

Member Data Documentation

template<class T>
T ROOT::Math::Polar2D< T >::fPhi
private
template<class T>
T ROOT::Math::Polar2D< T >::fR
private

The documentation for this class was generated from the following file: