class HPoint<double>
HPoint -- a simple 3D point
This class is also known as (typedefs to this class)
HPoint<
Double_t>,
HPointD::
TP
Function Members (Methods)
Class Charts
Function documentation
TT HPoint<TT> Distance(const HPoint<double>& b) const
HPoint<TT> HPoint<TT> Cross(const HPoint<double>& b) const
HPoint<TT>& HPoint<TT> Cross(const HPoint<double>& a, const HPoint<double>& b)
void Set(double _x, double _y, double _z)
{ x = _x; y = _y; z = _z; }
HPoint& Neg()
{ x = -x; y = -y; z = -z; return *this; }
HPoint& Add(double _x, double _y, double _z)
{ x += _x; y += _y; z += _z; return *this; }
HPoint& operator+=(const HPoint& a)
{ x += a.x; y += a.y; z += a.z; return *this; }
HPoint& operator-=(const HPoint& a)
{ x -= a.x; y -= a.y; z -= a.z; return *this; }
HPoint& operator*=(double f)
{ x *= f; y *= f; z *= f; return *this; }
HPoint& operator/=(double d)
{ return operator*=(1/d); }
TT Dot(const HPoint& v)
{ return x*v.x + y*v.y + z*v.z; }
TT Dot(const Float_t* v) const
{ return x*v[0] + y*v[1] + z*v[2]; }
TT Perp() const
{ return TMath::Sqrt(Perp2()); }
TT Phi() const
{ return TMath::ATan2(y, x); }
TT Theta() const
{ return TMath::ATan2(Perp(), z); }
TT CosTheta() const
{ TT m = Mag(); return m == 0 ? 1 : z / m; }