321 if (tot > 0.0) per -= ss*ss/tot;
322 if (per < 0) per = 0;
332 return ptot == 0.0 ? 1.0 :
fZ/ptot;
338 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 operator*(const TVector3 &, const TVector3 &)
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 EtaPhiVector() const
Double_t Mag() const
return the magnitude (rho in spherical coordinate system)
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 operator-(const TVector3 &, const TVector3 &)
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)
(static function) returns phi angle in the interval [-PI,PI)
void SetXYZ(Double_t x, Double_t y, Double_t z)
TVector3 operator+(const TVector3 &, const TVector3 &)
TVector3 operator-() const
Double_t CosTheta() const
void RotateY(Double_t)
rotate vector around Y
Bool_t operator==(const TVector3 &) const
void SetTheta(Double_t)
Set theta keeping mag and phi constant (BaBar).
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
dereferencing operator const
Double_t DeltaR(const TVector3 &) const
return deltaR with respect to v
TVector3 Cross(const TVector3 &) const
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
This method must be overridden when a class wants to print itself.
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.