 |
Belle II Software
release-05-02-19
|
14 #ifndef TRGPoint2D_FLAG_
15 #define TRGPoint2D_FLAG_
18 #include "CLHEP/Geometry/Point3D.h"
19 #include "CLHEP/Geometry/Vector3D.h"
27 typedef HepGeom::Vector3D<double>
Vector3D;
55 double mag(
void)
const;
57 double mag2(
void)
const;
59 double phi(
void)
const;
126 return sqrt(
_p[0] *
_p[0] +
_p[1] *
_p[1]);
133 return _p[0] *
_p[0] +
_p[1] *
_p[1];
140 if (
_p[0] == 0.0 &&
_p[1] == 0.0)
return 0.;
141 double a = atan2(
_p[1],
_p[0]);
143 return a + 2. * M_PI;
150 return _p[0] * a.x() +
_p[1] * a.y();
157 return _p[0] * a.y() - a.x() *
_p[1];
185 if (a.x() ==
_p[0] && a.y() ==
_p[1])
return true;
193 double sum2 =
_p[0] *
_p[0] +
_p[1] *
_p[1];
195 double sum = sqrt(sum2);
double mag2(void) const
magnitude square of the point
HepGeom::Vector3D< double > Vector3D
3D Vector
std::ostream & operator<<(std::ostream &output, const IntervalOfValidity &iov)
A class to represent a point in 2D.
TRGPoint2D operator+(const TRGPoint2D &) const
double mag(void) const
magnitude of the point
double y(void) const
y of the point
TRGPoint2D operator-() const
double x(void) const
x of the point
double phi(void) const
phi of the point
double cross(const TRGPoint2D &) const
outer product
Abstract base class for different kinds of events.
virtual ~TRGPoint2D()
Destructor.
bool operator==(const TRGPoint2D &) const
equal operator
TRGPoint2D unit(void) const
unit vector
double dot(const TRGPoint2D &) const
inner product