16 #ifndef ROOT_Math_GenVector_PositionVector2D 17 #define ROOT_Math_GenVector_PositionVector2D 1 47 template <
class CoordSystem,
class Tag = DefaultCoordinateSystemTag >
91 template <
class ForeignVector>
102 template <
class OtherCoords>
112 template <
class OtherCoords>
123 template <
class ForeignVector>
125 SetXY( v.x(), v.y() );
250 template<
class OtherCoords >
252 return X()*v.
x() +
Y()*v.
y();
263 template <
class OtherCoords>
273 template <
class OtherCoords>
339 template <
class OtherCoords,
class OtherTag>
342 template <
class OtherCoords,
class OtherTag>
345 template <
class OtherCoords,
class OtherTag>
348 template <
class OtherCoords,
class OtherTag>
351 template <
class OtherCoords,
class OtherTag>
354 template <
class OtherCoords,
class OtherTag>
373 template <
class CoordSystem,
class U>
390 template <
class CoordSystem1,
class CoordSystem2,
class U>
396 v1.
X()-v2.
X(), v1.
Y()-v2.
Y() )
405 template <
class CoordSystem1,
class CoordSystem2,
class U>
418 template <
class CoordSystem1,
class CoordSystem2,
class U>
431 template <
class CoordSystem1,
class CoordSystem2,
class U>
443 template<
class char_t,
class traits_t,
class T,
class U >
445 std::basic_ostream<char_t,traits_t> &
446 operator << ( std::basic_ostream<char_t,traits_t> & os
453 v.GetCoordinates(a, b);
472 template<
class char_t,
class traits_t,
class T,
class U >
474 std::basic_istream<char_t,traits_t> &
PositionVector2D(const Scalar &a, const Scalar &b)
Construct from three values of type Scalar.
PositionVector2D & operator-=(const DisplacementVector2D< OtherCoords, Tag > &v)
Self Difference with a displacement vector.
Namespace for new ROOT classes and functions.
PositionVector2D(const PositionVector2D< T, Tag > &v)
Construct from a position vector expressed in different coordinates, or using a different Scalar type...
PositionVector2D(const DisplacementVector2D< T, Tag > &p)
Construct from an arbitrary displacement vector.
Scalar Mag2() const
Magnitute squared ( r^2 in spherical coordinate)
std::basic_istream< char_t, traits_t > & operator>>(std::basic_istream< char_t, traits_t > &is, DisplacementVector2D< T, U > &v)
bool operator!=(const PositionVector2D &rhs) const
PositionVector2D< CoordSystem, Tag > & SetR(Scalar a)
Change R - Polar2D coordinates only.
PositionVector2D & operator=(const PositionVector2D< OtherCoords, Tag > &v)
Assignment operator from a position vector of arbitrary type.
DisplacementVector2D< CoordSystem1, U > operator+(DisplacementVector2D< CoordSystem1, U > v1, const DisplacementVector2D< CoordSystem2, U > &v2)
Addition of DisplacementVector2D vectors.
PositionVector2D< CoordSystem, Tag > & SetCoordinates(Scalar a, Scalar b)
Set internal data based on 2 Scalar numbers.
CoordSystem::Scalar Scalar
CoordSystem CoordinateType
const CoordSystem & Coordinates() const
Retrieve a copy of the coordinates object.
DisplacementVector2D< CoordSystem1, U > operator-(DisplacementVector2D< CoordSystem1, U > v1, DisplacementVector2D< CoordSystem2, U > const &v2)
Difference between two DisplacementVector2D vectors.
void Rotate(Scalar angle)
Rotate by an angle.
PositionVector2D< CoordSystem, Tag > & SetX(Scalar a)
Change X - Cartesian2D coordinates only.
Scalar R() const
Polar R, converting if necessary from internal coordinate system.
Scalar X() const
Cartesian X, converting if necessary from internal coordinate system.
PositionVector2D< CoordSystem, Tag > & SetXY(Scalar a, Scalar b)
set the values of the vector from the cartesian components (x,y) (if the vector is held in polar coor...
char_t get_manip(std::basic_ios< char_t, traits_t > &ios, manip_t m)
Scalar Y() const
Cartesian Y, converting if necessary from internal coordinate system.
Scalar Y() const
Cartesian Y, converting if necessary from internal coordinate system.
void GetCoordinates(Scalar &a, Scalar &b) const
get internal data into 2 Scalar numbers.
PositionVector2D & operator/=(Scalar a)
divide this vector by a scalar quantity
PositionVector2D operator*(Scalar a) const
Multiply a vector by a real number.
PositionVector2D & operator*=(Scalar a)
multiply this vector by a scalar quantity
Class describing a generic position vector (point) in 2 dimensions.
PositionVector2D< CoordSystem, Tag > & SetPhi(Scalar ang)
Change Phi - Polar2D coordinates.
PositionVector2D< CoordSystem, Tag > & SetY(Scalar a)
Change Y - Cartesian2D coordinates only.
Class describing a 2D cartesian coordinate system (x, y coordinates)
PositionVector2D(const ForeignVector &v)
Construct from a foreign 2D vector type, for example, Hep2Vector Precondition: v must implement metho...
void set_manip(std::basic_ios< char_t, traits_t > &ios, manip_t m, char_t ch)
Namespace for new Math classes and functions.
Scalar Phi() const
Polar phi, converting if necessary from internal coordinate system.
bool operator==(const PositionVector2D &rhs) const
Exact equality.
std::basic_istream< char_t, traits_t > & require_delim(std::basic_istream< char_t, traits_t > &is, manip_t m)
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Scalar Dot(const DisplacementVector2D< OtherCoords, Tag > &v) const
Return the scalar (Dot) product of this with a displacement vector in any coordinate system...
PositionVector2D()
Default constructor.
PositionVector2D operator/(Scalar a) const
Division of a vector with a real number.
Rotation3D::Scalar Scalar
Scalar X() const
Cartesian X, converting if necessary from internal coordinate system.
Class describing a generic displacement vector in 2 dimensions.
PositionVector2D & operator+=(const DisplacementVector2D< OtherCoords, Tag > &v)
Self Addition with a displacement vector.