197 TVector3 operator - (const TVector3 &, const TVector3 &);
200 Double_t operator * (const TVector3 &, const TVector3 &);
203 TVector3 operator * (const TVector3 &,
Double_t a);
204 TVector3 operator * (
Double_t a, const TVector3 &);
207 TVector3 operator * (const
TMatrix &, const TVector3 &);
248 : fX(0.0), fY(0.0), fZ(0.0) {}
251 fX(p.fX), fY(p.fY), fZ(p.fZ) {}
254 : fX(xx), fY(yy), fZ(zz) {}
257 : fX(x0[0]), fY(x0[1]), fZ(x0[2]) {}
260 : fX(x0[0]), fY(x0[1]), fZ(x0[2]) {}
272 Error(
"operator()(i)",
"bad index (%d) returning 0",i);
286 Error(
"operator()(i)",
"bad index (%d) returning &fX",i);
332 return fX*p.
fX + fY*p.
fY + fZ*p.
fZ;
362 if (tot > 0.0) per -= ss*ss/tot;
363 if (per < 0) per = 0;
373 return ptot == 0.0 ? 1.0 : fZ/ptot;
379 Warning(
"SetMag",
"zero vector can't be stretched");
TVector3 & operator=(const TVector3 &)
Double_t Dot(const TVector3 &) const
void RotateUz(const TVector3 &)
NewUzVector must be normalized !
Double_t DeltaPhi(const TVector3 &) const
Bool_t operator==(const TVector3 &) const
Double_t operator()(int) const
Double_t CosTheta() const
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 DrEtaPhi(const TVector3 &) const
TVector2 is a general two vector class, which can be used for the description of different vectors in...
TVector3 Unit() const
Return unit vector parallel to this.
TVector3 operator-() const
#define ClassDef(name, id)
TVector3 & operator*=(Double_t)
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
TVector2 EtaPhiVector() const
TVector2 XYvector() const
Double_t Perp() const
Return the transverse component (R in cylindrical coordinate system)
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 ...
TVector3 Cross(const TVector3 &) const
The TRotation class describes a rotation of objects of the TVector3 class.
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...
TVector3 & operator+=(const TVector3 &)
Double_t Theta() const
Return the polar angle.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
void Print(Option_t *option="") const
Print vector parameters.
TVector3 & operator-=(const TVector3 &)
Double_t PseudoRapidity() const
Double_t m = Mag(); return 0.5*log( (m+fZ)/(m-fZ) ); guard against Pt=0.
Bool_t operator!=(const TVector3 &) const
TVector3 Orthogonal() const
TVector3 & Transform(const TRotation &)
Transform this vector with a TRotation.
void RotateZ(Double_t)
Rotate vector around Z.
Mother of all ROOT objects.
void SetPhi(Double_t)
Set phi keeping mag and theta constant (BaBar).
Double_t DeltaR(const TVector3 &) const
Return deltaR with respect to v.
Double_t operator[](int) const
Double_t Phi() const
Return the azimuth angle. Returns phi from -pi to pi.
Double_t Sqrt(Double_t x)
void SetPtThetaPhi(Double_t pt, Double_t theta, Double_t phi)
Set Pt, Theta and Phi.
void SetMagThetaPhi(Double_t mag, Double_t theta, Double_t phi)
Setter with mag, theta, phi.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
void SetPtEtaPhi(Double_t pt, Double_t eta, Double_t phi)
Set Pt, Eta and Phi.