12#ifndef ROOT7_REveVector
13#define ROOT7_REveVector
34 template <
typename OO>
46 Error(
"REveVectorT",
"Subsequent members cannot be accessed as array!");
52 Error(
"REveVectorT",
"Subsequent members cannot be accessed as array!");
59 "Subsequent members cannot be accessed as array!");
65 "Subsequent members cannot be accessed as array!");
70 operator const TT*()
const {
return Arr(); }
71 operator TT*() {
return Arr(); }
85 template <
typename OO>
157 return ((
fX -
b.fX) * (
fX -
b.fX) +
158 (
fY -
b.fY) * (
fY -
b.fY) +
159 (
fZ -
b.fZ) * (
fZ -
b.fZ));
237template <
typename TT>
246 template <
typename OO>
248 template <
typename OO>
250 template <
typename OO>
262 using TP::operator+=;
263 using TP::operator-=;
303template <
typename TT>
310 template <
typename OO>
318 operator const TT*()
const {
return &
fX; }
319 operator TT*() {
return &
fX; }
328 const TT*
Arr()
const {
return &
fX; }
335 template <
typename OO>
380 return ((
fX -
b.fX) * (
fX -
b.fX) +
381 (
fY -
b.fY) * (
fY -
b.fY));
395 return fX *
a.fY -
fY *
a.fX;
int Int_t
Signed integer 4 bytes (int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
float Float_t
Float 4 bytes (float).
Error("WriteTObject","The current directory (%s) is not associated with a file. The object (%s) has not been written.", GetName(), objname)
REveVector2T A two-vector template without TObject inheritance and virtual functions.
REveVector2T & operator-=(const REveVector2T &v)
REveVector2T & Mult(const REveVector2T &a, TT af)
REveVector2T(const Float_t *v)
void Normalize(TT length=1)
Normalize the vector to length if current length is non-zero.
void Set(const Float_t *v)
void Set(const REveVector2T< OO > &v)
TT & operator[](Int_t idx)
REveVector2T(const Double_t *v)
TT SquareDistance(const REveVector2T &v) const
TT operator[](Int_t idx) const
REveVector2T & operator+=(const REveVector2T &v)
TT Distance(const REveVector2T &v) const
TT Dot(const REveVector2T &a) const
REveVector2T & operator*=(TT s)
REveVector2T(const REveVector2T< OO > &v)
void Dump() const
Dump to stdout as "(x, y)\n".
REveVector2T & Sub(const REveVector2T &p, const REveVector2T &q)
TT Cross(const REveVector2T &a) const
void Set(const Double_t *v)
REveVector4T A four-vector template without TObject inheritance and virtual functions.
REveVector4T & operator-=(const REveVector4T &v)
REveVector4T(const REveVector4T< OO > &v)
REveVector4T(const REveVectorT< OO > &v)
REveVector4T(const Double_t *v)
void Dump() const
Dump to stdout as "(x, y, z; t)\n".
REveVector4T(const Float_t *v)
REveVector4T(const REveVectorT< OO > &v, Float_t t)
REveVector4T(TT x, TT y, TT z, TT t=0)
REveVector4T & operator+=(const REveVector4T &v)
REveVector4T & operator*=(TT s)
REveVectorT A three-vector template without TObject inheritance and virtual functions.
void Set(TT x, TT y, TT z)
TT Normalize(TT length=1)
Normalize the vector to length if current length is non-zero.
REveVectorT(const REveVectorT< OO > &v)
REveVectorT & operator*=(TT s)
REveVectorT & operator-=(const REveVectorT &v)
REveVectorT & Mult(const REveVectorT &a, TT af)
REveVectorT(TT x, TT y, TT z)
REveVectorT Cross(const REveVectorT &a) const
TT Distance(const REveVectorT &v) const
void Set(const REveVectorT< OO > &v)
void Set(const Double_t *v)
TT operator[](Int_t idx) const
REveVectorT(const Float_t *v)
REveVectorT & Sub(const REveVectorT &a, const REveVectorT &b)
REveVectorT Orthogonal() const
Returns an orthogonal vector (not normalized).
TT SquareDistance(const REveVectorT &v) const
void Set(const TVector3 &v)
Set from TVector3.
void Set(const Float_t *v)
void OrthoNormBase(REveVectorT &a, REveVectorT &b) const
Set vectors a and b to be normal to this and among themselves, both of length 1.
TT Eta() const
Calculate eta of the point, pretending it's a momentum vector.
REveVectorT(const Double_t *v)
TT Dot(const REveVectorT &a) const
REveVectorT & operator+=(const REveVectorT &v)
void Dump() const
Dump to stdout as "(x, y, z)\n".
Namespace for ROOT features in testing.
REveVector4T< Double_t > REveVector4D
REveVector2T< Double_t > REveVector2D
REveVectorT< Float_t > REveVectorF
REveVector2T< Float_t > REveVector2F
REveVector4T< Float_t > REveVector4F
REveVector2T< Float_t > REveVector2
REveVectorT< TT > operator-(const REveVectorT< TT > &a, const REveVectorT< TT > &b)
REveVectorT< TT > operator*(const REveVectorT< TT > &a, TT b)
REveVector4T< Float_t > REveVector4
REveVectorT< Float_t > REveVector
REveVectorT< Double_t > REveVectorD
REveException operator+(const REveException &s1, const std::string &s2)
Double_t ATan2(Double_t y, Double_t x)
Returns the principal value of the arc tangent of y/x, expressed in radians.
Double_t Sqrt(Double_t x)
Returns the square root of x.