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 | |
| constexpr | Polar2D () noexcept=default |
| Default constructor with r=1,phi=0. | |
| template<class CoordSystem > | |
| constexpr | Polar2D (const CoordSystem &v) |
| Construct from any Vector or coordinate system implementing R() and Phi() | |
| Polar2D (T r, T phi) | |
| Construct from the polar coordinates: r and phi. | |
| void | GetCoordinates (Scalar &r, Scalar &phi) const |
| get internal data into 2 Scalar numbers | |
| Scalar | Mag2 () const |
| void | Negate () |
| negate the vector | |
| bool | operator!= (const Polar2D &rhs) const |
| template<class CoordSystem > | |
| Polar2D & | operator= (const CoordSystem &c) |
| generic assignment operator from any coordinate system | |
| bool | operator== (const Polar2D &rhs) const |
| Exact equality. | |
| Scalar | Phi () const |
| Scalar | R () const |
| void | Rotate (T angle) |
| rotate the vector | |
| void | Scale (T a) |
| scale by a scalar quantity - for polar coordinates r changes | |
| void | SetCoordinates (Scalar r, Scalar phi) |
| Set internal data based on 2 Scalar numbers. | |
| void | SetPhi (const T &phi) |
| set the phi coordinate value keeping r constant | |
| void | SetR (const T &r) |
| set the r coordinate value keeping phi constant | |
| void | SetXY (Scalar a, Scalar b) |
| set all values using cartesian coordinates | |
| Scalar | X () const |
| T | x () const |
| Scalar | Y () const |
| T | y () const |
Static Public Attributes | |
| static constexpr unsigned int | Dimension = 2U |
Private Member Functions | |
| void | Restrict () |
| restrict abgle hi to be between -PI and PI | |
Static Private Member Functions | |
| static double | pi () |
Private Attributes | |
| T | fPhi = 0. |
| T | fR = 1. |
#include <Math/GenVector/Polar2D.h>
| typedef T ROOT::Math::Polar2D< T >::Scalar |
|
constexprdefaultnoexcept |
Default constructor with r=1,phi=0.
|
inline |
|
inlineexplicitconstexpr |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestaticprivate |
|
inline |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void ROOT::Math::Polar2D< T >::SetXY | ( | Scalar | a, |
| Scalar | b ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
staticconstexpr |
|
private |
|
private |