16#ifdef TRKRECO_DEBUG_DETAIL
22#define HEP_SHORT_NAMES
23#include "CLHEP/Geometry/Vector3D.h"
24#ifndef ENABLE_BACKWARDS_COMPATIBILITY
27#ifndef CLHEP_POINT3D_H
28#include "CLHEP/Geometry/Point3D.h"
30#ifndef ENABLE_BACKWARDS_COMPATIBILITY
52 double mag(
void)
const;
53 double mag2(
void)
const;
54 double phi(
void)
const;
78#ifdef TPOINT2D_NO_INLINE
82#define TPOINT2D_INLINE_DEFINE_HERE
84#ifdef TPOINT2D_INLINE_DEFINE_HERE
113 return sqrt(_p[0] * _p[0] + _p[1] * _p[1]);
119 return _p[0] * _p[0] + _p[1] * _p[1];
125 if (_p[0] == 0.0 && _p[1] == 0.0)
return 0.;
126 double a = atan2(_p[1], _p[0]);
128 return a + 2. *
M_PI;
134 return _p[0] * a.
x() + _p[1] * a.
y();
140 return _p[0] * a.
y() - a.
x() * _p[1];
146 return TPoint2D(_p[0] + a.
x(), _p[1] + a.
y());
152 return TPoint2D(_p[0] - a.
x(), _p[1] - a.
y());
164 if (a.
x() == _p[0] && a.
y() == _p[1])
return true;
171 double sum2 = _p[0] * _p[0] + _p[1] * _p[1];
172 if (sum2 == 0.)
return TPoint2D(0., 0.);
173 double sum = sqrt(sum2);
174 return TPoint2D(_p[0] / sum, _p[1] / sum);
std::ostream & operator<<(std::ostream &, const TPoint2D &)
HepGeom::Point3D< double > HepPoint3D
HepGeom::Vector3D< double > HepVector3D
A class to represent a point in 2D.
TPoint2D operator-() const
double dot(const TPoint2D &) const
double cross(const TPoint2D &) const
bool operator==(const TPoint2D &) const
virtual ~TPoint2D()
Destructor.
TPoint2D unit(void) const
TPoint2D operator+(const TPoint2D &) const