Logo ROOT  
Reference Guide
TEveVector.h
Go to the documentation of this file.
1 // @(#)root/eve:$Id$
2 // Author: Matevz Tadel 2007
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TEveVector
13 #define ROOT_TEveVector
14 
15 #include "Rtypes.h"
16 #include "TMath.h"
17 #include <cstddef>
18 
19 class TVector3;
20 
21 
22 //==============================================================================
23 // TEveVectorT
24 //==============================================================================
25 
26 template <typename TT>
28 {
29 public:
30  TT fX, fY, fZ; // Components of the vector.
31 
32  TEveVectorT() : fX(0), fY(0), fZ(0) {}
33  template <typename OO>
34  TEveVectorT(const TEveVectorT<OO>& v) : fX(v.fX), fY(v.fY), fZ(v.fZ) {}
35  TEveVectorT(const Float_t* v) : fX(v[0]), fY(v[1]), fZ(v[2]) {}
36  TEveVectorT(const Double_t* v) : fX(v[0]), fY(v[1]), fZ(v[2]) {}
37  TEveVectorT(TT x, TT y, TT z) : fX(x), fY(y), fZ(z) {}
38 
39  void Dump() const;
40 
41 #ifdef R__WIN32
42  // This fixes the following rootcling error when generating the dictionary:
43  // error G34C21FBE: static_assert expression is not an integral constant expression
44  // FIXME: check if the error is fixed when upgrading llvm/clang
45  const TT *Arr() const
46  {
47  if (offsetof(TEveVectorT, fZ) != offsetof(TEveVectorT, fX) + 2 * sizeof(TT))
48  Error("TEveVectorT", "Subsequent nembers cannot be accessed as array!");
49  return &fX;
50  }
51  TT *Arr()
52  {
53  if (offsetof(TEveVectorT, fZ) != offsetof(TEveVectorT, fX) + 2 * sizeof(TT))
54  Error("TEveVectorT", "Subsequent nembers cannot be accessed as array!");
55  return &fX;
56  }
57 #else
58  const TT *Arr() const
59  {
60  static_assert(offsetof(TEveVectorT, fZ) == offsetof(TEveVectorT, fX) + 2 * sizeof(TT),
61  "Subsequent nembers cannot be accessed as array!");
62  return &fX;
63  }
64  TT *Arr()
65  {
66  static_assert(offsetof(TEveVectorT, fZ) == offsetof(TEveVectorT, fX) + 2 * sizeof(TT),
67  "Subsequent nembers cannot be accessed as array!");
68  return &fX;
69  }
70 #endif
71 
72  operator const TT*() const { return Arr(); }
73  operator TT*() { return Arr(); }
74 
75  TT operator [] (Int_t idx) const { return Arr()[idx]; }
76  TT& operator [] (Int_t idx) { return Arr()[idx]; }
77 
78  TEveVectorT& operator*=(TT s) { fX *= s; fY *= s; fZ *= s; return *this; }
79  TEveVectorT& operator+=(const TEveVectorT& v) { fX += v.fX; fY += v.fY; fZ += v.fZ; return *this; }
80  TEveVectorT& operator-=(const TEveVectorT& v) { fX -= v.fX; fY -= v.fY; fZ -= v.fZ; return *this; }
81 
82  void Set(const Float_t* v) { fX = v[0]; fY = v[1]; fZ = v[2]; }
83  void Set(const Double_t* v) { fX = v[0]; fY = v[1]; fZ = v[2]; }
84  void Set(TT x, TT y, TT z) { fX = x; fY = y; fZ = z; }
85  void Set(const TVector3& v);
86 
87  template <typename OO>
88  void Set(const TEveVectorT<OO>& v) { fX = v.fX; fY = v.fY; fZ = v.fZ; }
89 
90  void NegateXYZ() { fX = - fX; fY = -fY; fZ = -fZ; }
91  TT Normalize(TT length=1);
92 
93  TT Phi() const;
94  TT Theta() const;
95  TT CosTheta() const;
96  TT Eta() const;
97 
98  TT Mag2() const { return fX*fX + fY*fY + fZ*fZ; }
99  TT Mag() const { return TMath::Sqrt(Mag2()); }
100 
101  TT Perp2() const { return fX*fX + fY*fY; }
102  TT Perp() const { return TMath::Sqrt(Perp2()); }
103  TT R() const { return Perp(); }
104 
105  TT Distance(const TEveVectorT& v) const;
106  TT SquareDistance(const TEveVectorT& v) const;
107 
108  TT Dot(const TEveVectorT& a) const;
109 
110  TEveVectorT Cross(const TEveVectorT& a) const;
111 
112  TEveVectorT& Sub(const TEveVectorT& a, const TEveVectorT& b);
113  TEveVectorT& Mult(const TEveVectorT& a, TT af);
114 
115  TEveVectorT Orthogonal() const;
116  void OrthoNormBase(TEveVectorT& a, TEveVectorT& b) const;
117 
118  Bool_t IsZero() const { return fX == 0 && fY == 0 && fZ == 0; }
119 
120  ClassDefNV(TEveVectorT, 2); // A three-vector template without TObject inheritance and virtual functions.
121 };
122 
126 
127 //______________________________________________________________________________
128 template<typename TT>
129 inline TT TEveVectorT<TT>::Phi() const
130 {
131  return fX == 0 && fY == 0 ? 0 : TMath::ATan2(fY, fX);
132 }
133 
134 //______________________________________________________________________________
135 template<typename TT>
136 inline TT TEveVectorT<TT>::Theta() const
137 {
138  return fX == 0 && fY == 0 && fZ == 0 ? 0 : TMath::ATan2(Perp(), fZ);
139 }
140 
141 //______________________________________________________________________________
142 template<typename TT>
143 inline TT TEveVectorT<TT>::CosTheta() const
144 {
145  Float_t ptot = Mag(); return ptot == 0 ? 1 : fZ/ptot;
146 }
147 
148 //______________________________________________________________________________
149 template<typename TT>
150 inline TT TEveVectorT<TT>::Distance(const TEveVectorT& b) const
151 {
152  return TMath::Sqrt((fX - b.fX)*(fX - b.fX) +
153  (fY - b.fY)*(fY - b.fY) +
154  (fZ - b.fZ)*(fZ - b.fZ));
155 }
156 
157 //______________________________________________________________________________
158 template<typename TT>
160 {
161  return ((fX - b.fX) * (fX - b.fX) +
162  (fY - b.fY) * (fY - b.fY) +
163  (fZ - b.fZ) * (fZ - b.fZ));
164 }
165 
166 //______________________________________________________________________________
167 template<typename TT>
168 inline TT TEveVectorT<TT>::Dot(const TEveVectorT& a) const
169 {
170  return a.fX*fX + a.fY*fY + a.fZ*fZ;
171 }
172 
173 //______________________________________________________________________________
174 template<typename TT>
176 {
178  r.fX = fY * a.fZ - fZ * a.fY;
179  r.fY = fZ * a.fX - fX * a.fZ;
180  r.fZ = fX * a.fY - fY * a.fX;
181  return r;
182 }
183 
184 //______________________________________________________________________________
185 template<typename TT>
187 {
188  fX = a.fX - b.fX;
189  fY = a.fY - b.fY;
190  fZ = a.fZ - b.fZ;
191  return *this;
192 }
193 
194 //______________________________________________________________________________
195 template<typename TT>
197 {
198  fX = a.fX * af;
199  fY = a.fY * af;
200  fZ = a.fZ * af;
201  return *this;
202 }
203 
204 //______________________________________________________________________________
205 template<typename TT>
207 {
209  return r += b;
210 }
211 
212 //______________________________________________________________________________
213 template<typename TT>
215 {
217  return r -= b;
218 }
219 
220 //______________________________________________________________________________
221 template<typename TT>
223 {
225  return r *= b;
226 }
227 
228 //______________________________________________________________________________
229 template<typename TT>
231 {
233  return r *= b;
234 }
235 
236 
237 //==============================================================================
238 // TEveVector4T
239 //==============================================================================
240 
241 template <typename TT>
242 class TEveVector4T : public TEveVectorT<TT>
243 {
245 
246 public:
247  TT fT;
248 
249  TEveVector4T() : TP(), fT(0) {}
250  template <typename OO>
251  TEveVector4T(const TEveVectorT<OO>& v) : TP(v.fX, v.fY, v.fZ), fT(0) {}
252  template <typename OO>
253  TEveVector4T(const TEveVectorT<OO>& v, Float_t t) : TP(v.fX, v.fY, v.fZ), fT(t) {}
254  template <typename OO>
255  TEveVector4T(const TEveVector4T<OO>& v) : TP(v.fX, v.fY, v.fZ), fT(v.fT) {}
256  TEveVector4T(const Float_t* v) : TP(v), fT(v[3]) {}
257  TEveVector4T(const Double_t* v) : TP(v), fT(v[3]) {}
258  TEveVector4T(TT x, TT y, TT z, TT t=0) : TP(x, y, z), fT(t) {}
259 
260  void Dump() const;
261 
262  TEveVector4T& operator*=(TT s) { TP::operator*=(s); fT *= s; return *this; }
263  TEveVector4T& operator+=(const TEveVector4T& v) { TP::operator+=(v); fT += v.fT; return *this; }
264  TEveVector4T& operator-=(const TEveVector4T& v) { TP::operator-=(v); fT -= v.fT; return *this; }
265 
266  using TP::operator+=;
267  using TP::operator-=;
268 
269  ClassDefNV(TEveVector4T, 1); // A four-vector template without TObject inheritance and virtual functions.
270 };
271 
275 
276 //______________________________________________________________________________
277 template<typename TT>
279 {
280  return TEveVector4T<TT>(a.fX + b.fX, a.fY + b.fY, a.fZ + b.fZ, a.fT + b.fT);
281 }
282 
283 //______________________________________________________________________________
284 template<typename TT>
286 {
287  return TEveVector4T<TT>(a.fX - b.fX, a.fY - b.fY, a.fZ - b.fZ, a.fT - b.fT);
288 }
289 
290 //______________________________________________________________________________
291 template<typename TT>
293 {
294  return TEveVector4T<TT>(a.fX*b, a.fY*b, a.fZ*b, a.fT*b);
295 }
296 
297 //______________________________________________________________________________
298 template<typename TT>
300 {
301  return TEveVector4T<TT>(a.fX*b, a.fY*b, a.fZ*b, a.fT*b);
302 }
303 
304 
305 //==============================================================================
306 // TEveVector2T
307 //==============================================================================
308 
309 template <typename TT>
311 {
312 public:
313  TT fX, fY; // Components of the point.
314 
315  TEveVector2T() : fX(0), fY(0) {}
316  template <typename OO>
318  TEveVector2T(const Float_t* v) : fX(v[0]), fY(v[1]) {}
319  TEveVector2T(const Double_t* v) : fX(v[0]), fY(v[1]) {}
320  TEveVector2T(TT x, TT y) : fX(x), fY(y) {}
321 
322  void Dump() const;
323 
324  operator const TT*() const { return &fX; }
325  operator TT*() { return &fX; }
326 
327  TEveVector2T& operator*=(TT s) { fX *= s; fY *= s; return *this; }
328  TEveVector2T& operator+=(const TEveVector2T& v) { fX += v.fX; fY += v.fY; return *this; }
329  TEveVector2T& operator-=(const TEveVector2T& v) { fX -= v.fX; fY -= v.fY; return *this; }
330 
331  TT& operator[](Int_t idx) { return (&fX)[idx]; }
332  TT operator[](Int_t idx) const { return (&fX)[idx]; }
333 
334  const TT* Arr() const { return &fX; }
335  TT* Arr() { return &fX; }
336 
337  void Set(const Float_t* v) { fX = v[0]; fY = v[1]; }
338  void Set(const Double_t* v) { fX = v[0]; fY = v[1]; }
339  void Set(TT x, TT y) { fX = x; fY = y; }
340 
341  template <typename OO>
342  void Set(const TEveVector2T<OO>& v) { fX = v.fX; fY = v.fY; }
343 
344  void NegateXY() { fX = - fX; fY = -fY; }
345  void Normalize(TT length=1);
346 
347  TT Phi() const;
348 
349  TT Mag2() const { return fX*fX + fY*fY;}
350  TT Mag() const { return TMath::Sqrt(Mag2());}
351 
352  TT Distance(const TEveVector2T& v) const;
353  TT SquareDistance(const TEveVector2T& v) const;
354 
355  TT Dot(const TEveVector2T& a) const;
356  TT Cross(const TEveVector2T& a) const;
357 
358  TEveVector2T& Sub(const TEveVector2T& p, const TEveVector2T& q);
359 
360  TEveVector2T& Mult(const TEveVector2T& a, TT af);
361 
362  ClassDefNV(TEveVector2T, 1); // // A two-vector template without TObject inheritance and virtual functions.
363 };
364 
368 
369 //______________________________________________________________________________
370 template<typename TT>
371 inline TT TEveVector2T<TT>::Phi() const
372 {
373  return fX == 0.0 && fY == 0.0 ? 0.0 : TMath::ATan2(fY, fX);
374 }
375 
376 //______________________________________________________________________________
377 template<typename TT>
379 {
380  return TMath::Sqrt((fX - b.fX)*(fX - b.fX) +
381  (fY - b.fY)*(fY - b.fY));
382 }
383 
384 //______________________________________________________________________________
385 template<typename TT>
387 {
388  return ((fX - b.fX) * (fX - b.fX) +
389  (fY - b.fY) * (fY - b.fY));
390 }
391 
392 //______________________________________________________________________________
393 template<typename TT>
394 inline TT TEveVector2T<TT>::Dot(const TEveVector2T<TT>& a) const
395 {
396  return a.fX*fX + a.fY*fY;
397 }
398 
399 //______________________________________________________________________________
400 template<typename TT>
402 {
403  return fX * a.fY - fY * a.fX;
404 }
405 
406 //______________________________________________________________________________
407 template<typename TT>
409 {
410  fX = p.fX - q.fX;
411  fY = p.fY - q.fY;
412  return *this;
413 }
414 
415 //______________________________________________________________________________
416 template<typename TT>
418 {
419  fX = a.fX * af;
420  fY = a.fY * af;
421  return *this;
422 }
423 
424 //______________________________________________________________________________
425 template<typename TT>
427 {
429  return r += b;
430 }
431 
432 //______________________________________________________________________________
433 template<typename TT>
435 {
437  return r -= b;
438 }
439 
440 //______________________________________________________________________________
441 template<typename TT>
443 {
445  return r *= b;
446 }
447 
448 //______________________________________________________________________________
449 template<typename TT>
451 {
453  return r *= b;
454 }
455 
456 #endif
TEveVectorT::Normalize
TT Normalize(TT length=1)
Normalize the vector to length if current length is non-zero.
Definition: TEveVector.cxx:56
TEveVectorT::Mag
TT Mag() const
Definition: TEveVector.h:99
TEveVectorT::operator-=
TEveVectorT & operator-=(const TEveVectorT &v)
Definition: TEveVector.h:80
TEveVectorT::Sub
TEveVectorT & Sub(const TEveVectorT &a, const TEveVectorT &b)
Definition: TEveVector.h:186
TVector3
Definition: TVector3.h:22
TEveVector2T::operator*=
TEveVector2T & operator*=(TT s)
Definition: TEveVector.h:327
TEveVectorT::operator[]
TT operator[](Int_t idx) const
Definition: TEveVector.h:75
TEveVector4T::TEveVector4T
TEveVector4T(const TEveVectorT< OO > &v, Float_t t)
Definition: TEveVector.h:253
TEveVectorD
TEveVectorT< Double_t > TEveVectorD
Definition: TEveVector.h:125
TEveVector2T::Set
void Set(const Double_t *v)
Definition: TEveVector.h:338
TEveVector4D
TEveVector4T< Double_t > TEveVector4D
Definition: TEveVector.h:274
TEveVectorT::fZ
TT fZ
Definition: TEveVector.h:30
TEveVector4T::fT
TT fT
Definition: TEveVector.h:247
TMath::ATan2
Double_t ATan2(Double_t y, Double_t x)
Definition: TMath.h:668
TEveVector2T::operator-=
TEveVector2T & operator-=(const TEveVector2T &v)
Definition: TEveVector.h:329
TEveVector2T::Dump
void Dump() const
Dump to stdout as "(x, y)\n".
Definition: TEveVector.cxx:146
TEveVector2T::TEveVector2T
TEveVector2T(TT x, TT y)
Definition: TEveVector.h:320
TEveVectorT::operator*=
TEveVectorT & operator*=(TT s)
Definition: TEveVector.h:78
TEveVectorT::Mag2
TT Mag2() const
Definition: TEveVector.h:98
TEveVectorT::Theta
TT Theta() const
Definition: TEveVector.h:136
TEveVector4T::TEveVector4T
TEveVector4T(const Float_t *v)
Definition: TEveVector.h:256
TEveVectorT::Phi
TT Phi() const
Definition: TEveVector.h:129
TEveVector2T::TEveVector2T
TEveVector2T(const TEveVector2T< OO > &v)
Definition: TEveVector.h:317
TEveVectorT::Perp
TT Perp() const
Definition: TEveVector.h:102
TEveVector2F
TEveVector2T< Float_t > TEveVector2F
Definition: TEveVector.h:366
TEveVector2T::Normalize
void Normalize(TT length=1)
Normalize the vector to length if current length is non-zero.
Definition: TEveVector.cxx:133
r
ROOT::R::TRInterface & r
Definition: Object.C:4
TMath::Sqrt
Double_t Sqrt(Double_t x)
Definition: TMath.h:680
TEveVectorT::Dump
void Dump() const
Dump to stdout as "(x, y, z)\n".
Definition: TEveVector.cxx:28
TEveVectorT::Set
void Set(TT x, TT y, TT z)
Definition: TEveVector.h:84
Float_t
float Float_t
Definition: RtypesCore.h:57
TGeant4Unit::s
static constexpr double s
Definition: TGeant4SystemOfUnits.h:168
TEveVector2T::TEveVector2T
TEveVector2T(const Double_t *v)
Definition: TEveVector.h:319
TEveVectorT::fY
TT fY
Definition: TEveVector.h:30
TEveVectorT::Set
void Set(const Double_t *v)
Definition: TEveVector.h:83
x
Double_t x[n]
Definition: legend1.C:17
TEveVector4T::TEveVector4T
TEveVector4T()
Definition: TEveVector.h:249
TEveVectorT::IsZero
Bool_t IsZero() const
Definition: TEveVector.h:118
TEveVectorT::Dot
TT Dot(const TEveVectorT &a) const
Definition: TEveVector.h:168
TEveVectorT::Set
void Set(const TEveVectorT< OO > &v)
Definition: TEveVector.h:88
operator*
TEveVectorT< TT > operator*(const TEveVectorT< TT > &a, TT b)
Definition: TEveVector.h:222
TEveVector4T
Definition: TEveVector.h:242
TEveVector4T::TEveVector4T
TEveVector4T(const TEveVectorT< OO > &v)
Definition: TEveVector.h:251
v
@ v
Definition: rootcling_impl.cxx:3635
b
#define b(i)
Definition: RSha256.hxx:118
TEveVector4T::TEveVector4T
TEveVector4T(const TEveVector4T< OO > &v)
Definition: TEveVector.h:255
TEveVector2T::fY
TT fY
Definition: TEveVector.h:313
TEveVectorT::Cross
TEveVectorT Cross(const TEveVectorT &a) const
Definition: TEveVector.h:175
TEveVectorT::NegateXYZ
void NegateXYZ()
Definition: TEveVector.h:90
bool
TEveVectorT::ClassDefNV
ClassDefNV(TEveVectorT, 2)
q
float * q
Definition: THbookFile.cxx:89
TEveVector2T::Mult
TEveVector2T & Mult(const TEveVector2T &a, TT af)
Definition: TEveVector.h:417
TEveVector2
TEveVector2T< Float_t > TEveVector2
Definition: TEveVector.h:365
TEveVector2T::SquareDistance
TT SquareDistance(const TEveVector2T &v) const
Definition: TEveVector.h:386
TEveVector2T::operator+=
TEveVector2T & operator+=(const TEveVector2T &v)
Definition: TEveVector.h:328
ROOT::Math::Mag
T Mag(const SVector< T, D > &rhs)
Vector magnitude (Euclidian norm) Compute : .
Definition: Functions.h:252
TEveVector2T::Cross
TT Cross(const TEveVector2T &a) const
Definition: TEveVector.h:401
TEveVector2T::Set
void Set(const Float_t *v)
Definition: TEveVector.h:337
TEveVector2T::TEveVector2T
TEveVector2T(const Float_t *v)
Definition: TEveVector.h:318
operator+=
std::string & operator+=(std::string &left, const TString &right)
Definition: TString.h:478
TEveVectorT::Arr
const TT * Arr() const
Definition: TEveVector.h:58
a
auto * a
Definition: textangle.C:12
TEveVector2T::Phi
TT Phi() const
Definition: TEveVector.h:371
TEveVector
TEveVectorT< Float_t > TEveVector
Definition: TEveVector.h:123
TEveVector4T::Dump
void Dump() const
Dump to stdout as "(x, y, z; t)\n".
Definition: TEveVector.cxx:112
TEveVector4T::operator-=
TEveVector4T & operator-=(const TEveVector4T &v)
Definition: TEveVector.h:264
TEveVectorT
Definition: TEveVector.h:27
operator-
TEveVectorT< TT > operator-(const TEveVectorT< TT > &a, const TEveVectorT< TT > &b)
Definition: TEveVector.h:214
TEveVector2T::Set
void Set(TT x, TT y)
Definition: TEveVector.h:339
operator+
TEveVectorT< TT > operator+(const TEveVectorT< TT > &a, const TEveVectorT< TT > &b)
Definition: TEveVector.h:206
y
Double_t y[n]
Definition: legend1.C:17
TEveVectorT::OrthoNormBase
void OrthoNormBase(TEveVectorT &a, TEveVectorT &b) const
Set vectors a and b to be normal to this and among themselves, both of length 1.
Definition: TEveVector.cxx:86
TEveVector2T::TEveVector2T
TEveVector2T()
Definition: TEveVector.h:315
TEveVector2D
TEveVector2T< Double_t > TEveVector2D
Definition: TEveVector.h:367
TEveVector2T
Definition: TEveVector.h:310
TEveVectorF
TEveVectorT< Float_t > TEveVectorF
Definition: TEveVector.h:124
TEveVectorT::Perp2
TT Perp2() const
Definition: TEveVector.h:101
TEveVector2T::Distance
TT Distance(const TEveVector2T &v) const
Definition: TEveVector.h:378
TEveVector2T::Sub
TEveVector2T & Sub(const TEveVector2T &p, const TEveVector2T &q)
Definition: TEveVector.h:408
TEveVector4T::operator*=
TEveVector4T & operator*=(TT s)
Definition: TEveVector.h:262
TEveVector2T::Arr
const TT * Arr() const
Definition: TEveVector.h:334
TEveVectorT::TEveVectorT
TEveVectorT(const Double_t *v)
Definition: TEveVector.h:36
TEveVectorT::Mult
TEveVectorT & Mult(const TEveVectorT &a, TT af)
Definition: TEveVector.h:196
TEveVector4T::TEveVector4T
TEveVector4T(const Double_t *v)
Definition: TEveVector.h:257
TEveVector2T::Arr
TT * Arr()
Definition: TEveVector.h:335
TEveVectorT::R
TT R() const
Definition: TEveVector.h:103
TEveVector4T::operator+=
TEveVector4T & operator+=(const TEveVector4T &v)
Definition: TEveVector.h:263
TEveVectorT::operator+=
TEveVectorT & operator+=(const TEveVectorT &v)
Definition: TEveVector.h:79
TEveVector4T::ClassDefNV
ClassDefNV(TEveVector4T, 1)
Double_t
double Double_t
Definition: RtypesCore.h:59
TEveVectorT::CosTheta
TT CosTheta() const
Definition: TEveVector.h:143
TEveVectorT::TEveVectorT
TEveVectorT(const TEveVectorT< OO > &v)
Definition: TEveVector.h:34
TEveVectorT::fX
TT fX
Definition: TEveVector.h:30
TEveVectorT::Eta
TT Eta() const
Calculate eta of the point, pretending it's a momentum vector.
Definition: TEveVector.cxx:44
TEveVectorT::TEveVectorT
TEveVectorT(const Float_t *v)
Definition: TEveVector.h:35
TEveVectorT::Orthogonal
TEveVectorT Orthogonal() const
Returns an orthogonal vector (not normalized).
Definition: TEveVector.cxx:70
TEveVectorT::Distance
TT Distance(const TEveVectorT &v) const
Definition: TEveVector.h:150
TEveVector2T::fX
TT fX
Definition: TEveVector.h:313
TEveVector2T::Set
void Set(const TEveVector2T< OO > &v)
Definition: TEveVector.h:342
TEveVector2T::NegateXY
void NegateXY()
Definition: TEveVector.h:344
TEveVector2T::Mag2
TT Mag2() const
Definition: TEveVector.h:349
ROOT::Math::VectorUtil::Perp
double Perp(const Vector1 &v, const Vector2 &u)
Find the magnitude of the vector component of v perpendicular to the given direction of u.
Definition: VectorUtil.h:211
TEveVectorT::TEveVectorT
TEveVectorT()
Definition: TEveVector.h:32
TEveVector4F
TEveVector4T< Float_t > TEveVector4F
Definition: TEveVector.h:273
TEveVector4
TEveVector4T< Float_t > TEveVector4
Definition: TEveVector.h:272
TEveVectorT::Arr
TT * Arr()
Definition: TEveVector.h:64
Rtypes.h
TEveVector2T::Dot
TT Dot(const TEveVector2T &a) const
Definition: TEveVector.h:394
TEveVectorT::Set
void Set(const Float_t *v)
Definition: TEveVector.h:82
TEveVector4T::TP
TEveVectorT< TT > TP
Definition: TEveVector.h:244
TEveVector2T::operator[]
TT & operator[](Int_t idx)
Definition: TEveVector.h:331
TEveVector2T::operator[]
TT operator[](Int_t idx) const
Definition: TEveVector.h:332
TEveVector2T::Mag
TT Mag() const
Definition: TEveVector.h:350
TMath.h
TEveVectorT::SquareDistance
TT SquareDistance(const TEveVectorT &v) const
Definition: TEveVector.h:159
TEveVector4T::TEveVector4T
TEveVector4T(TT x, TT y, TT z, TT t=0)
Definition: TEveVector.h:258
TEveVector2T::ClassDefNV
ClassDefNV(TEveVector2T, 1)
int
Error
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Definition: TError.cxx:188
TEveVectorT::TEveVectorT
TEveVectorT(TT x, TT y, TT z)
Definition: TEveVector.h:37