12 #ifndef ROOT_TEveVector 13 #define ROOT_TEveVector 25 template <
typename TT>
32 template <
typename OO>
40 const TT*
Arr()
const {
42 "Subsequent nembers cannot be accessed as array!");
46 "Subsequent nembers cannot be accessed as array!");
49 operator const TT*()
const {
return Arr(); }
50 operator TT*() {
return Arr(); }
59 void Set(
const Float_t*
v) { fX = v[0]; fY = v[1]; fZ = v[2]; }
61 void Set(TT
x, TT
y, TT
z) { fX =
x; fY =
y; fZ =
z; }
64 template <
typename OO>
75 TT
Mag2()
const {
return fX*fX + fY*fY + fZ*
fZ; }
78 TT
Perp2()
const {
return fX*fX + fY*
fY; }
105 template<
typename TT>
112 template<
typename TT>
119 template<
typename TT>
126 template<
typename TT>
135 template<
typename TT>
144 template<
typename TT>
151 template<
typename TT>
162 template<
typename TT>
172 template<
typename TT>
182 template<
typename TT>
190 template<
typename TT>
198 template<
typename TT>
206 template<
typename TT>
218 template <
typename TT>
227 template <
typename OO>
229 template <
typename OO>
231 template <
typename OO>
243 using TP::operator+=;
244 using TP::operator-=;
254 template<
typename TT>
261 template<
typename TT>
268 template<
typename TT>
275 template<
typename TT>
286 template <
typename TT>
293 template <
typename OO>
301 operator const TT*()
const {
return &
fX; }
302 operator TT*() {
return &
fX; }
311 const TT*
Arr()
const {
return &
fX; }
318 template <
typename OO>
347 template<
typename TT>
354 template<
typename TT>
362 template<
typename TT>
370 template<
typename TT>
377 template<
typename TT>
384 template<
typename TT>
393 template<
typename TT>
402 template<
typename TT>
410 template<
typename TT>
418 template<
typename TT>
426 template<
typename TT>
TT Cross(const TEveVector2T &a) const
void Set(const TEveVector2T< OO > &v)
TEveVectorT & operator*=(TT s)
TEveVector4T< Float_t > TEveVector4
TEveVectorT & operator-=(const TEveVectorT &v)
void Set(const Float_t *v)
TT operator[](Int_t idx) const
TT SquareDistance(const TEveVectorT &v) const
TEveVector4T< Double_t > TEveVector4D
TT Dot(const TEveVectorT &a) const
TEveVectorT(TT x, TT y, TT z)
void Dump() const
Dump to stdout as "(x, y, z)\n".
TT & operator[](Int_t idx)
TEveVector4T(TT x, TT y, TT z, TT t=0)
TEveVectorT Cross(const TEveVectorT &a) const
void Set(const Double_t *v)
TEveVector2T< Float_t > TEveVector2
TEveVector4T & operator+=(const TEveVector4T &v)
void Set(const Double_t *v)
void Set(const TEveVectorT< OO > &v)
TEveVector4T(const Double_t *v)
Minimal, templated four-vector.
Minimal, templated three-vector.
ClassDefNV(TEveVectorT, 2)
TEveVectorT< Double_t > TEveVectorD
void Set(TT x, TT y, TT z)
TT Dot(const TEveVector2T &a) const
Double_t ATan2(Double_t, Double_t)
TT Distance(const TEveVector2T &v) const
TEveVector2T & operator*=(TT s)
TEveVector4T(const TEveVectorT< OO > &v, Float_t t)
TVector3 is a general three vector class, which can be used for the description of different vectors ...
TEveVectorT< TT > operator*(const TEveVectorT< TT > &a, TT b)
TEveVector4T & operator*=(TT s)
TEveVectorT< TT > operator-(const TEveVectorT< TT > &a, const TEveVectorT< TT > &b)
TEveVectorT(const Double_t *v)
TEveVector2T & Mult(const TEveVector2T &a, TT af)
TT SquareDistance(const TEveVector2T &v) 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.
TEveVector4T(const Float_t *v)
Minimal, templated two-vector.
TEveVectorT & Mult(const TEveVectorT &a, TT af)
TEveVector2T(const TEveVector2T< OO > &v)
TEveVector2T< Double_t > TEveVector2D
TEveVector2T(const Double_t *v)
void Set(const Float_t *v)
TEveVector2T(const Float_t *v)
TEveVectorT< TT > operator+(const TEveVectorT< TT > &a, const TEveVectorT< TT > &b)
TT Distance(const TEveVectorT &v) const
TEveVectorT(const Float_t *v)
TEveVectorT & operator+=(const TEveVectorT &v)
TEveVector4T(const TEveVector4T< OO > &v)
TEveVectorT< Float_t > TEveVector
you should not use this method at all Int_t Int_t z
TEveVector4T & operator-=(const TEveVector4T &v)
TT Eta() const
Calculate eta of the point, pretending it's a momentum vector.
TEveVectorT(const TEveVectorT< OO > &v)
TEveVectorT< Float_t > TEveVectorF
TEveVector2T & Sub(const TEveVector2T &p, const TEveVector2T &q)
TEveVector4T< Float_t > TEveVector4F
TT Normalize(TT length=1)
Normalize the vector to length if current length is non-zero.
TEveVector2T & operator+=(const TEveVector2T &v)
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
TEveVector2T & operator-=(const TEveVector2T &v)
TEveVectorT & Sub(const TEveVectorT &a, const TEveVectorT &b)
TEveVector2T< Float_t > TEveVector2F
TEveVectorT Orthogonal() const
Returns an orthogonal vector (not normalized).
TEveVector4T(const TEveVectorT< OO > &v)
Double_t Sqrt(Double_t x)
TT operator[](Int_t idx) const
std::string & operator+=(std::string &left, const TString &right)