205 TVector3 operator - (const TVector3 &, const TVector3 &);
208 Double_t operator * (const TVector3 &, const TVector3 &);
211 TVector3 operator * (const TVector3 &,
Double_t a);
212 TVector3 operator * (
Double_t a, const TVector3 &);
215 TVector3 operator * (const
TMatrix &, const TVector3 &);
256 : fX(0.0), fY(0.0), fZ(0.0) {}
259 fX(p.fX), fY(p.fY), fZ(p.fZ) {}
262 : fX(xx), fY(yy), fZ(zz) {}
265 : fX(x0[0]), fY(x0[1]), fZ(x0[2]) {}
268 : fX(x0[0]), fY(x0[1]), fZ(x0[2]) {}
280 Error(
"operator()(i)",
"bad index (%d) returning 0",i);
294 Error(
"operator()(i)",
"bad index (%d) returning &fX",i);
340 return fX*p.
fX + fY*p.
fY + fZ*p.
fZ;
370 if (tot > 0.0) per -= ss*ss/tot;
371 if (per < 0) per = 0;
381 return ptot == 0.0 ? 1.0 : fZ/ptot;
387 Warning(
"SetMag",
"zero vector can't be stretched");
TVector3 & operator=(const TVector3 &)
void RotateUz(const TVector3 &)
NewUzVector must be normalized !
Double_t Phi() const
Return the azimuth angle. Returns phi from -pi to pi.
Double_t Theta() const
Return the polar angle.
Bool_t operator!=(const TVector3 &) const
Double_t Dot(const TVector3 &) const
Double_t Perp() const
Return the transverse component (R in cylindrical coordinate system)
void RotateX(Double_t)
Rotate vector around X.
TVector2 is a general two vector class, which can be used for the description of different vectors in...
TVector2 EtaPhiVector() const
Double_t Angle(const TVector3 &) const
Return the angle w.r.t. another 3-vector.
Double_t PseudoRapidity() const
Double_t m = Mag(); return 0.5*log( (m+fZ)/(m-fZ) ); guard against Pt=0.
#define ClassDef(name, id)
Double_t DeltaPhi(const TVector3 &) const
TVector3 & operator*=(Double_t)
TVector3 Unit() const
Return unit vector parallel to this.
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)
TVector3 operator-() const
Double_t CosTheta() const
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
void RotateY(Double_t)
Rotate vector around Y.
TVector3 is a general three vector class, which can be used for the description of different vectors ...
The TRotation class describes a rotation of objects of the TVector3 class.
Bool_t operator==(const TVector3 &) 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) const
TVector3 & operator+=(const TVector3 &)
TVector2 XYvector() const
TVector3 & operator-=(const TVector3 &)
TVector3 & Transform(const TRotation &)
Transform this vector with a TRotation.
void RotateZ(Double_t)
Rotate vector around Z.
void GetXYZ(Double_t *carray) const
Mother of all ROOT objects.
void SetPhi(Double_t)
Set phi keeping mag and theta constant (BaBar).
Double_t operator()(int) const
Double_t DeltaR(const TVector3 &) const
Return deltaR with respect to v.
TVector3 Cross(const TVector3 &) const
Double_t Sqrt(Double_t x)
void SetPtThetaPhi(Double_t pt, Double_t theta, Double_t phi)
Set Pt, Theta and Phi.
Double_t DrEtaPhi(const TVector3 &) const
TVector3 Orthogonal() const
void Print(Option_t *option="") const
Print vector parameters.
void SetMagThetaPhi(Double_t mag, Double_t theta, Double_t phi)
Setter with mag, theta, phi.
void SetPtEtaPhi(Double_t pt, Double_t eta, Double_t phi)
Set Pt, Eta and Phi.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.