9#ifndef TRGPoint2D_FLAG_
10#define TRGPoint2D_FLAG_
13#include "CLHEP/Geometry/Point3D.h"
14#include "CLHEP/Geometry/Vector3D.h"
22 typedef HepGeom::Vector3D<double>
Vector3D;
51 double mag(
void)
const;
53 double mag2(
void)
const;
55 double phi(
void)
const;
129 return _p[0] *
_p[0] +
_p[1] *
_p[1];
136 if (
_p[0] == 0.0 &&
_p[1] == 0.0)
return 0.;
137 double a = atan2(
_p[1],
_p[0]);
139 return a + 2. * M_PI;
146 return _p[0] * a.x() +
_p[1] * a.y();
153 return _p[0] * a.y() - a.x() *
_p[1];
181 if (a.x() ==
_p[0] && a.y() ==
_p[1])
return true;
189 double sum2 =
_p[0] *
_p[0] +
_p[1] *
_p[1];
191 double sum =
sqrt(sum2);
A class to represent a point in 2D.
std::ostream & operator<<(std::ostream &output, const IntervalOfValidity &iov)
double sqrt(double a)
sqrt for double
double phi(void) const
phi of the point
HepGeom::Vector3D< double > Vector3D
3D Vector
double y(void) const
y of the point
double mag2(void) const
magnitude square of the point
double mag(void) const
magnitude of the point
bool operator==(const TRGPoint2D &) const
equal operator
TRGPoint2D operator-() const
double x(void) const
x of the point
double cross(const TRGPoint2D &) const
outer product
TRGPoint2D operator+(const TRGPoint2D &) const
virtual ~TRGPoint2D()
Destructor.
double dot(const TRGPoint2D &) const
inner product
TRGPoint2D unit(void) const
unit vector
Abstract base class for different kinds of events.