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);
40 Hep2Vector
operator / (
const Hep2Vector & p,
double a);
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;
98 inline void setPhi(
double phi);
101 inline void setMag(
double r);
104 inline void setR(
double r);
107 inline void setPolar(
double r,
double phi);
213 #include "CLHEP/Vector/TwoVector.icc"
HepLorentzRotation operator*(const HepRotation &r, const HepLorentzRotation <)
double howParallel(const Hep2Vector &p) const
bool operator!=(const Hep2Vector &v) const
Hep2Vector & operator*=(double a)
friend std::ostream & operator<<(std::ostream &, const Hep2Vector &)
int compare(const Hep2Vector &v) const
static const Hep2Vector Y_HAT2(0.0, 1.0)
friend Hep2Vector operator/(const Hep2Vector &p, double a)
double operator[](int i) const
bool operator>(const Hep2Vector &v) const
double angle(const Hep2Vector &) const
static double getTolerance()
Hep3Vector operator+(const Hep3Vector &, const Hep3Vector &)
friend double operator*(const Hep2Vector &a, const Hep2Vector &b)
bool isNear(const Hep2Vector &p, double epsilon=tolerance) 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)
double howNear(const Hep2Vector &p) const
friend Hep2Vector operator+(const Hep2Vector &a, const Hep2Vector &b)
void setPolar(double r, double phi)
bool operator>=(const Hep2Vector &v) const
HepLorentzVector operator/(const HepLorentzVector &, double a)
Hep2Vector & operator+=(const Hep2Vector &p)
bool operator==(const Hep2Vector &v) const
Hep3Vector operator-(const Hep3Vector &, const Hep3Vector &)
double operator()(int i) const
double dot(const Hep2Vector &p) const
static const Hep2Vector X_HAT2(1.0, 0.0)
Hep2Vector orthogonal() const
Hep2Vector & operator-=(const Hep2Vector &p)
bool isOrthogonal(const Hep2Vector &p, double epsilon=tolerance) const
bool operator<=(const Hep2Vector &v) const
Hep2Vector & operator=(const Hep2Vector &p)
double howOrthogonal(const Hep2Vector &p) const
static double setTolerance(double tol)
std::istream & operator>>(std::istream &is, HepRandom &dist)
Hep2Vector operator-() const
double epsilon(double density, double temperature)
bool isParallel(const Hep2Vector &p, double epsilon=tolerance) const