78 (
double r1,
double theta1,
double phi1 ) {
83 (
double r1,
double eta1,
double phi1 ) {
88 (
double rho1,
double phi1,
double z1) {
97 : data{0.0, 0.0, 0.0} {}
99 : data{ x , 0.0, 0.0} {}
101 : data{ x , y , 0.0} {}
103 : data{ x , y , z } {}
106 : data{p.x(), p.y(), p.z()} {}
126 return x() == 0.0 &&
y() == 0.0 &&
z() == 0.0 ? 0.0 : std::atan2(
perp(),
z());
129 return x() == 0.0 &&
y() == 0.0 ? 0.0 : std::atan2(
y(),
x());
139 return ptot == 0.0 ? 1.0 :
z()/ptot;
143 double ptot2 =
mag2();
144 return ptot2 == 0.0 ? 1.0 :
z()*
z()/ptot2;
152 setX(ma*std::sin(th)*std::cos(ph));
153 setY(ma*std::sin(th)*std::sin(ph));
154 setZ(ma*std::cos(th));
159 setX(xy*std::cos(ph));
160 setY(xy*std::sin(ph));
187 return (v.
x()==
x() && v.
y()==
y() && v.
z()==
z()) ? true :
false;
191 return (v.
x()!=
x() || v.
y()!=
y() || v.
z()!=
z()) ? true :
false;
232 return (*
this-p).
mag2();
236 return x()*p.
x() +
y()*p.
y() +
z()*p.
z();
244 double tot = p.
mag2();
246 return tot > 0.0 ?
mag2()-ss*ss/tot :
mag2();
250 return std::sqrt(
perp2(p));
261 return ( *
this -
project(v2) );
283 return tot > 0.0 ? p *= (1.0/std::sqrt(tot)) : p;
287 double xx =
x() < 0.0 ? -
x() :
x();
288 double yy =
y() < 0.0 ? -
y() :
y();
289 double zz =
z() < 0.0 ? -
z() :
z();
Hep3Vector & operator-=(const Hep3Vector &)
double azimAngle(const Hep3Vector &v2) const
Hep3Vector orthogonal() const
double operator()(int) const
double diff2(const Hep3Vector &v) const
void setRhoPhiZ(double rho, double phi, double z)
void setSpherical(double r, double theta, double phi)
Hep3Vector cross(const Hep3Vector &) const
double operator[](int) const
void setRThetaPhi(double r, double theta, double phi)
Hep3Vector & operator=(const Hep3Vector &)
double dot(const Hep3Vector &) const
static double getTolerance()
Hep3Vector perpPart() const
bool operator!=(const Hep3Vector &) const
Hep3Vector & operator*=(double)
double pseudoRapidity() const
double deltaPhi(const Hep3Vector &v2) const
void setCylindrical(double r, double phi, double z)
void set(double x, double y, double z)
Hep3Vector operator-() const
bool operator==(const Hep3Vector &) const
void setREtaPhi(double r, double eta, double phi)
Hep3Vector & operator+=(const Hep3Vector &)
Hep3Vector project() const
HepMatrix operator+(const HepMatrix &hm1, const HepDiagMatrix &d2)
HepMatrix operator-(const HepMatrix &hm1, const HepDiagMatrix &d2)
HepMatrix operator*(const HepMatrix &hm1, const HepDiagMatrix &hm2)