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);
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");
#define ClassDefOverride(name, id)
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Mother of all ROOT objects.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
The TRotation class describes a rotation of objects of the TVector3 class.
TVector2 is a general two vector class, which can be used for the description of different vectors in...
static Double_t Phi_mpi_pi(Double_t x)
Returns phi angle in the interval [-PI,PI)
void SetMagThetaPhi(Double_t mag, Double_t theta, Double_t phi)
Setter with mag, theta, phi.
void SetXYZ(Double_t x, Double_t y, Double_t z)
TVector3 operator-() const
void SetPhi(Double_t)
Set phi keeping mag and theta constant (BaBar).
void Print(Option_t *option="") const override
Print vector parameters.
Double_t Phi() const
Return the azimuth angle. Returns phi from -pi to pi.
Double_t Dot(const TVector3 &) const
void RotateZ(Double_t)
Rotate vector around Z.
Bool_t operator!=(const TVector3 &) const
Double_t operator[](int) const
TVector3 Unit() const
Return unit vector parallel to this.
void RotateX(Double_t)
Rotate vector around X.
TVector3 & operator+=(const TVector3 &)
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.
Double_t operator()(int) const
void Rotate(Double_t, const TVector3 &)
Rotate vector.
void SetPtEtaPhi(Double_t pt, Double_t eta, Double_t phi)
Set Pt, Eta and Phi.
void GetXYZ(Double_t *carray) const
TVector3 & operator*=(Double_t)
TVector2 EtaPhiVector() const
Double_t CosTheta() const
Double_t DrEtaPhi(const TVector3 &) const
TVector3 & operator=(const TVector3 &)
TVector3 Orthogonal() const
Double_t Theta() const
Return the polar angle.
Bool_t operator==(const TVector3 &) const
Double_t Perp() const
Return the transverse component (R in cylindrical coordinate system)
TVector3 & operator-=(const TVector3 &)
TVector3 & Transform(const TRotation &)
Transform this vector with a TRotation.
Double_t DeltaPhi(const TVector3 &) const
TVector2 XYvector() const
TVector3 Cross(const TVector3 &) const
void RotateY(Double_t)
Rotate vector around Y.
void SetPtThetaPhi(Double_t pt, Double_t theta, Double_t phi)
Set Pt, Theta and Phi.
void RotateUz(const TVector3 &)
NewUzVector must be normalized !
Double_t DeltaR(const TVector3 &) const
Return deltaR with respect to v.
void SetTheta(Double_t)
Set theta keeping mag and phi constant (BaBar).
Double_t Sqrt(Double_t x)
Returns the square root of x.