12 #ifndef ROOT_TLorentzVector 13 #define ROOT_TLorentzVector 68 inline Double_t
X()
const;
69 inline Double_t
Y()
const;
70 inline Double_t
Z()
const;
71 inline Double_t
T()
const;
74 inline void SetX(Double_t a);
75 inline void SetY(Double_t a);
76 inline void SetZ(Double_t a);
77 inline void SetT(Double_t a);
80 inline Double_t
Px()
const;
81 inline Double_t
Py()
const;
82 inline Double_t
Pz()
const;
83 inline Double_t
P()
const;
84 inline Double_t
E()
const;
85 inline Double_t
Energy()
const;
88 inline void SetPx(Double_t a);
89 inline void SetPy(Double_t a);
90 inline void SetPz(Double_t a);
91 inline void SetE(Double_t a);
100 inline Double_t
Theta()
const;
102 inline Double_t
Phi()
const;
103 inline Double_t
Rho()
const;
106 inline void SetTheta(Double_t theta);
107 inline void SetPhi(Double_t phi);
108 inline void SetRho(Double_t rho);
111 inline void SetPxPyPzE(Double_t px, Double_t py, Double_t pz, Double_t
e);
112 inline void SetXYZT(Double_t x, Double_t y, Double_t z, Double_t t);
113 inline void SetXYZM(Double_t x, Double_t y, Double_t z, Double_t
m);
114 inline void SetPtEtaPhiM(Double_t pt, Double_t eta, Double_t phi, Double_t m);
115 inline void SetPtEtaPhiE(Double_t pt, Double_t eta, Double_t phi, Double_t e);
119 inline void GetXYZT(Double_t *carray)
const;
120 inline void GetXYZT(Float_t *carray)
const;
154 inline Double_t
Perp2()
const;
157 inline Double_t
Pt()
const;
158 inline Double_t
Perp()
const;
171 inline Double_t
Et2()
const;
174 inline Double_t
Et()
const;
191 inline Double_t
Mag2()
const;
192 inline Double_t
M2()
const;
195 inline Double_t
Mag()
const;
196 inline Double_t
M()
const;
199 inline Double_t
Mt2()
const;
202 inline Double_t
Mt()
const;
205 inline Double_t
Beta()
const;
206 inline Double_t
Gamma()
const;
216 inline Double_t
Plus()
const;
217 inline Double_t
Minus()
const;
225 void Boost(Double_t, Double_t, Double_t);
232 inline Double_t
Eta()
const;
236 inline void RotateX(Double_t angle);
239 inline void RotateY(Double_t angle);
242 inline void RotateZ(Double_t angle);
259 virtual void Print(Option_t *option=
"")
const;
437 return pt2 == 0 ? 0 :
E()*
E() * pt2/(pt2+
Z()*
Z());
441 Double_t etet =
Et2();
442 return E() < 0.0 ? -
sqrt(etet) :
sqrt(etet);
448 return pt2 == 0 ? 0 :
E()*
E() * pt2/(pt2+pv*pv);
452 Double_t etet =
Et2(v);
453 return E() < 0.0 ? -
sqrt(etet) :
sqrt(etet);
464 Double_t deta =
Eta()-v.
Eta();
487 Double_t mm =
Mag2();
495 return E()*
E() -
Z()*
Z();
513 SetXYZM(spatial.
X(), spatial.
Y(), spatial.
Z(), magnitude);
521 return T()*q.
T() -
Z()*q.
Z() -
Y()*q.
Y() -
X()*q.
X();
597 :
fP(x,y,z),
fE(t) {}
600 :
fP(x0),
fE(x0[3]) {}
603 :
fP(x0),
fE(x0[3]) {}
626 Error(
"operator()()",
"bad index (%d) returning 0",i);
644 Error(
"operator()()",
"bad index (%d) returning &fE",i);
Double_t Dot(const TVector3 &) const
The TLorentzRotation class describes Lorentz transformations including Lorentz boosts and rotations (...
void SetPxPyPzE(Double_t px, Double_t py, Double_t pz, Double_t e)
TLorentzVector operator+(const TLorentzVector &) const
void RotateUz(const TVector3 &)
NewUzVector must be normalized !
TLorentzVector & operator+=(const TLorentzVector &)
TLorentzVector operator-() const
void Boost(Double_t, Double_t, Double_t)
Double_t CosTheta() const
Double_t Angle(const TVector3 &v) const
void RotateZ(Double_t angle)
virtual void Print(Option_t *option="") const
Print the TLorentz vector components as (x,y,z,t) and (P,eta,phi,E) representations.
void RotateY(Double_t angle)
you should not use this method at all Int_t y
void RotateX(Double_t)
Rotate vector around X.
Double_t Angle(const TVector3 &) const
Return the angle w.r.t. another 3-vector.
Double_t CosTheta() const
TVector2 is a general two vector class, which can be used for the description of different vectors in...
void SetVectMag(const TVector3 &spatial, Double_t magnitude)
TLorentzVector & operator*=(Double_t a)
Double_t DeltaPhi(const TLorentzVector &) const
TVector3 Unit() const
Return unit vector parallel to this.
Double_t DeltaR(const TLorentzVector &) const
void RotateUz(TVector3 &newUzVector)
void Rotate(Double_t, const TVector3 &)
Rotate vector.
static Double_t Phi_mpi_pi(Double_t x)
Returns phi angle in the interval [-PI,PI)
void SetXYZ(Double_t x, Double_t y, Double_t z)
void GetXYZ(Double_t *carray) const
Double_t PseudoRapidity() const
Double_t Dot(const TLorentzVector &) const
void SetRho(Double_t rho)
void SetPhi(Double_t phi)
Double_t Perp() const
Return the transverse component (R in cylindrical coordinate system)
void RotateY(Double_t)
Rotate vector around Y.
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 Int_t m
TVector3 is a general three vector class, which can be used for the description of different vectors ...
TLorentzVector & operator=(const TLorentzVector &)
The TRotation class describes a rotation of objects of the TVector3 class.
TVector3 BoostVector() const
void SetTheta(Double_t)
Set theta keeping mag and phi constant (BaBar).
TLorentzVector is a general four-vector class, which can be used either for the description of positi...
Double_t operator()(int i) const
void SetXYZT(Double_t x, Double_t y, Double_t z, Double_t t)
TLorentzVector & operator-=(const TLorentzVector &)
Bool_t operator!=(const TLorentzVector &) const
virtual ~TLorentzVector()
Double_t Theta() const
Return the polar angle.
TLorentzVector operator*(Double_t a) const
void SetPtEtaPhiE(Double_t pt, Double_t eta, Double_t phi, Double_t e)
Double_t PseudoRapidity() const
Double_t m = Mag(); return 0.5*log( (m+fZ)/(m-fZ) ); guard against Pt=0.
* x
Deprecated and error prone model selection interface.
void SetTheta(Double_t theta)
void Rotate(Double_t, const TVector3 &)
void SetXYZM(Double_t x, Double_t y, Double_t z, Double_t m)
TVector3 & Transform(const TRotation &)
Transform this vector with a TRotation.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
void RotateZ(Double_t)
Rotate vector around Z.
you should not use this method at all Int_t Int_t z
void SetPhi(Double_t)
Set phi keeping mag and theta constant (BaBar).
void GetXYZT(Double_t *carray) const
Double_t Phi() const
Return the azimuth angle. Returns phi from -pi to pi.
Bool_t operator==(const TLorentzVector &) const
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
TLorentzVector & Transform(const TRotation &)
void SetVectM(const TVector3 &spatial, Double_t mass)
void SetPtEtaPhiM(Double_t pt, Double_t eta, Double_t phi, Double_t m)
Double_t Sqrt(Double_t x)
Double_t Rapidity() const
Double_t DrEtaPhi(const TLorentzVector &) const
Double_t operator[](int i) const
void SetVect(const TVector3 &vect3)
void RotateX(Double_t angle)