20 #ifndef HEP_TWOVECTOR_H
21 #define HEP_TWOVECTOR_H
35 std::ostream &
operator << (std::ostream &,
const Hep2Vector &);
36 std::istream &
operator >> (std::istream &, Hep2Vector &);
37 inline double operator * (
const Hep2Vector &
a,
const Hep2Vector &
b);
38 inline Hep2Vector
operator * (
const Hep2Vector &
p,
double a);
39 inline Hep2Vector
operator * (
double a,
const Hep2Vector &
p);
41 inline Hep2Vector
operator + (
const Hep2Vector &
a,
const Hep2Vector &
b);
42 inline Hep2Vector
operator - (
const Hep2Vector &
a,
const Hep2Vector &
b);
69 inline double x()
const;
70 inline double y()
const;
81 inline void setX(
double x);
82 inline void setY(
double y);
83 inline void set (
double x,
double y);
86 inline double phi()
const;
89 inline double mag2()
const;
92 inline double mag()
const;
95 inline double r()
const;
104 inline void setR(
double r);
132 (
const Hep2Vector &
p,
double epsilon=tolerance)
const;
136 (
const Hep2Vector &
p,
double epsilon=tolerance)
const;
203 static double tolerance;
208 static const Hep2Vector X_HAT2(1.0, 0.0);
209 static const Hep2Vector Y_HAT2(0.0, 1.0);
213 #include "CLHEP/Vector/TwoVector.icc"
double operator[](int i) const
bool operator==(const Hep2Vector &v) const
double howNear(const Hep2Vector &p) const
HepLorentzRotation operator*(const HepRotation &r, const HepLorentzRotation <)
bool operator>=(const Hep2Vector &v) const
bool isOrthogonal(const Hep2Vector &p, double epsilon=tolerance) const
Hep2Vector & operator*=(double a)
Hep2Vector operator-() const
friend std::ostream & operator<<(std::ostream &, const Hep2Vector &)
bool operator<=(const Hep2Vector &v) const
friend Hep2Vector operator/(const Hep2Vector &p, double a)
static double getTolerance()
Hep3Vector operator+(const Hep3Vector &, const Hep3Vector &)
bool isNear(const Hep2Vector &p, double epsilon=tolerance) const
friend double operator*(const Hep2Vector &a, const Hep2Vector &b)
bool operator>(const Hep2Vector &v) const
double operator()(int i) const
Hep2Vector(double x=0.0, double y=0.0)
bool operator<(const Hep2Vector &v) const
std::ostream & operator<<(std::ostream &os, const HepRandom &dist)
void set(double x, double y)
friend Hep2Vector operator+(const Hep2Vector &a, const Hep2Vector &b)
void setPolar(double r, double phi)
double howParallel(const Hep2Vector &p) const
HepLorentzVector operator/(const HepLorentzVector &, double a)
Hep2Vector & operator+=(const Hep2Vector &p)
Hep3Vector operator-(const Hep3Vector &, const Hep3Vector &)
Hep2Vector orthogonal() const
Hep2Vector & operator-=(const Hep2Vector &p)
bool operator!=(const Hep2Vector &v) const
Hep2Vector & operator=(const Hep2Vector &p)
static double setTolerance(double tol)
double howOrthogonal(const Hep2Vector &p) const
std::istream & operator>>(std::istream &is, HepRandom &dist)
bool isParallel(const Hep2Vector &p, double epsilon=tolerance) const
double dot(const Hep2Vector &p) const
int compare(const Hep2Vector &v) const
double angle(const Hep2Vector &) const