Class describing a generic position vector (point) in 2 dimensions. This class is templated on the type of Coordinate system. One example is the XYPoint which is a vector based on double precision x,y data members by using the ROOT::Math::Cartesian2D<double> Coordinate system. The class is having also an extra template parameter, the coordinate system tag, to be able to identify (tag) vector described in different reference coordinate system, like global or local coordinate systems. @ingroup GenVector
ROOT::Math::Cartesian2D<double> | fCoordinates |
get internal data into 2 Scalar numbers. These are for example (x,y) for a cartesian vector or (r,phi) for a polar vector
{ fCoordinates.GetCoordinates(a, b); }
------------------- Equality ----------------- Exact equality
------ Individual element access, in various coordinate systems ------ Cartesian X, converting if necessary from internal coordinate system.
{ return fCoordinates.X(); }
Cartesian Y, converting if necessary from internal coordinate system.
{ return fCoordinates.Y(); }
Polar R, converting if necessary from internal coordinate system.
{ return fCoordinates.R(); }
Polar phi, converting if necessary from internal coordinate system.
{ return fCoordinates.Phi(); }
It is physically meaningless to speak of the unit vector corresponding to a point. ------ Setting individual elements present in coordinate system ------ Change X - Cartesian2D coordinates only
Change Y - Cartesian2D coordinates only
Change R - Polar2D coordinates only
Change Phi - Polar2D coordinates
Rotate by an angle