12#ifndef ROOT_TEveVector
13#define ROOT_TEveVector
33 template <
typename OO>
48 Error(
"TEveVectorT",
"Subsequent nembers cannot be accessed as array!");
54 Error(
"TEveVectorT",
"Subsequent nembers cannot be accessed as array!");
61 "Subsequent nembers cannot be accessed as array!");
67 "Subsequent nembers cannot be accessed as array!");
72 operator const TT*()
const {
return Arr(); }
73 operator TT*() {
return Arr(); }
87 template <
typename OO>
161 return ((
fX -
b.fX) * (
fX -
b.fX) +
162 (
fY -
b.fY) * (
fY -
b.fY) +
163 (
fZ -
b.fZ) * (
fZ -
b.fZ));
241template <
typename TT>
250 template <
typename OO>
252 template <
typename OO>
254 template <
typename OO>
266 using TP::operator+=;
267 using TP::operator-=;
309template <
typename TT>
316 template <
typename OO>
324 operator const TT*()
const {
return &
fX; }
325 operator TT*() {
return &
fX; }
334 const TT*
Arr()
const {
return &
fX; }
341 template <
typename OO>
388 return ((
fX -
b.fX) * (
fX -
b.fX) +
389 (
fY -
b.fY) * (
fY -
b.fY));
403 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).
#define ClassDefNV(name, id)
Error("WriteTObject","The current directory (%s) is not associated with a file. The object (%s) has not been written.", GetName(), objname)
TEveVector2T< Float_t > TEveVector2
TEveVectorT< Float_t > TEveVectorF
TEveVectorT< TT > operator+(const TEveVectorT< TT > &a, const TEveVectorT< TT > &b)
TEveVectorT< Double_t > TEveVectorD
TEveVectorT< TT > operator*(const TEveVectorT< TT > &a, TT b)
TEveVectorT< Float_t > TEveVector
TEveVector4T< Float_t > TEveVector4F
TEveVector4T< Double_t > TEveVector4D
TEveVector2T< Double_t > TEveVector2D
TEveVector2T< Float_t > TEveVector2F
TEveVectorT< TT > operator-(const TEveVectorT< TT > &a, const TEveVectorT< TT > &b)
TEveVector4T< Float_t > TEveVector4
Minimal, templated two-vector.
TEveVector2T(const TEveVector2T< OO > &v)
void Set(const Double_t *v)
TT Cross(const TEveVector2T &a) const
void Dump() const
Dump to stdout as "(x, y)\n".
TT Distance(const TEveVector2T &v) const
TT Dot(const TEveVector2T &a) const
TEveVector2T(const Double_t *v)
TEveVector2T & Mult(const TEveVector2T &a, TT af)
void Normalize(TT length=1)
Normalize the vector to length if current length is non-zero.
TT SquareDistance(const TEveVector2T &v) const
TT operator[](Int_t idx) const
TEveVector2T(const Float_t *v)
TEveVector2T & operator-=(const TEveVector2T &v)
void Set(const Float_t *v)
TT & operator[](Int_t idx)
void Set(const TEveVector2T< OO > &v)
TEveVector2T & operator+=(const TEveVector2T &v)
TEveVector2T & operator*=(TT s)
TEveVector2T & Sub(const TEveVector2T &p, const TEveVector2T &q)
Minimal, templated four-vector.
TEveVector4T(const TEveVectorT< OO > &v)
TEveVector4T(const Float_t *v)
void Dump() const
Dump to stdout as "(x, y, z; t)\n".
TEveVector4T(TT x, TT y, TT z, TT t=0)
TEveVector4T & operator-=(const TEveVector4T &v)
TEveVector4T & operator*=(TT s)
TEveVector4T & operator+=(const TEveVector4T &v)
TEveVector4T(const TEveVectorT< OO > &v, Float_t t)
TEveVector4T(const TEveVector4T< OO > &v)
TEveVector4T(const Double_t *v)
Minimal, templated three-vector.
TEveVectorT Cross(const TEveVectorT &a) const
void OrthoNormBase(TEveVectorT &a, TEveVectorT &b) const
Set vectors a and b to be normal to this and among themselves, both of length 1.
void Set(TT x, TT y, TT z)
void Set(const Double_t *v)
TT Distance(const TEveVectorT &v) const
TEveVectorT(TT x, TT y, TT z)
TEveVectorT & Mult(const TEveVectorT &a, TT af)
TT Normalize(TT length=1)
Normalize the vector to length if current length is non-zero.
TEveVectorT(const Float_t *v)
TEveVectorT & operator+=(const TEveVectorT &v)
TT Eta() const
Calculate eta of the point, pretending it's a momentum vector.
TEveVectorT & operator-=(const TEveVectorT &v)
TT Dot(const TEveVectorT &a) const
void Set(const TEveVectorT< OO > &v)
TEveVectorT & operator*=(TT s)
TEveVectorT(const Double_t *v)
TT operator[](Int_t idx) const
TEveVectorT Orthogonal() const
Returns an orthogonal vector (not normalized).
void Dump() const
Dump to stdout as "(x, y, z)\n".
TEveVectorT & Sub(const TEveVectorT &a, const TEveVectorT &b)
void Set(const Float_t *v)
TEveVectorT(const TEveVectorT< OO > &v)
void Set(const TVector3 &v)
Set from TVector3.
TT SquareDistance(const TEveVectorT &v) const
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.