ROOT
6.06/09
Reference Guide
|
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)
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... | |
Polar2D & | operator= (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 > | |
Polar2D & | operator= (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 |
T | x () const |
T | 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 | |
T | fR |
T | fPhi |
#include <Math/GenVector/Polar2D.h>
typedef T ROOT::Math::Polar2D< T >::Scalar |
|
inline |
|
inline |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
|
inline |
negate the vector
Definition at line 163 of file Polar2D.h.
Referenced by ROOT::Math::Polar2D< T >::Scale().
|
inline |
|
inline |
|
inline |
|
inline |
Exact equality.
Definition at line 189 of file Polar2D.h.
Referenced by ROOT::Math::Polar2D< T >::operator!=().
|
inline |
Definition at line 103 of file Polar2D.h.
Referenced by ROOT::Math::Cartesian2D< T >::Cartesian2D(), ROOT::Math::Polar2D< T >::operator=(), and ROOT::Math::Cartesian2D< T >::operator=().
|
inlinestaticprivate |
Definition at line 135 of file Polar2D.h.
Referenced by ROOT::Math::Polar2D< T >::Negate(), and ROOT::Math::Polar2D< T >::Restrict().
|
inline |
Definition at line 102 of file Polar2D.h.
Referenced by ROOT::Math::Cartesian2D< T >::Cartesian2D(), ROOT::Math::Polar2D< T >::operator=(), and ROOT::Math::Cartesian2D< T >::operator=().
|
inlineprivate |
restrict abgle hi to be between -PI and PI
Definition at line 140 of file Polar2D.h.
Referenced by ROOT::Math::Polar2D< T >::Polar2D(), ROOT::Math::Polar2D< T >::Rotate(), ROOT::Math::Polar2D< T >::SetCoordinates(), and ROOT::Math::Polar2D< T >::SetPhi().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void ROOT::Math::Polar2D< T >::SetXY | ( | Scalar | a, |
Scalar | b | ||
) |
|
inline |
Definition at line 104 of file Polar2D.h.
Referenced by ROOT::Math::Polar2D< T >::x().
|
inline |
|
inline |
Definition at line 105 of file Polar2D.h.
Referenced by ROOT::Math::Polar2D< T >::y().
|
inline |
|
private |
Definition at line 218 of file Polar2D.h.
Referenced by ROOT::Math::Polar2D< T >::GetCoordinates(), ROOT::Math::Polar2D< T >::Negate(), ROOT::Math::Polar2D< T >::operator=(), ROOT::Math::Polar2D< T >::operator==(), ROOT::Math::Polar2D< T >::Phi(), ROOT::Math::Polar2D< T >::Restrict(), ROOT::Math::Polar2D< T >::Rotate(), ROOT::Math::Polar2D< T >::SetCoordinates(), ROOT::Math::Polar2D< T >::SetPhi(), ROOT::Math::Polar2D< T >::X(), and ROOT::Math::Polar2D< T >::Y().
|
private |
Definition at line 217 of file Polar2D.h.
Referenced by ROOT::Math::Polar2D< T >::GetCoordinates(), ROOT::Math::Polar2D< T >::Mag2(), ROOT::Math::Polar2D< T >::operator=(), ROOT::Math::Polar2D< T >::operator==(), ROOT::Math::Polar2D< T >::R(), ROOT::Math::Polar2D< T >::Scale(), ROOT::Math::Polar2D< T >::SetCoordinates(), ROOT::Math::Polar2D< T >::SetR(), ROOT::Math::Polar2D< T >::X(), and ROOT::Math::Polar2D< T >::Y().