61 void Set(Double_t x0, Double_t y0);
62 void Set(
float x0,
float y0);
63 void SetX(Double_t x0);
64 void SetY(Double_t y0);
67 Double_t
Mod2()
const {
return fX*fX+fY*
fY; };
68 Double_t
Mod ()
const;
70 Double_t
Px()
const {
return fX; };
71 Double_t
Py()
const {
return fY; };
72 Double_t
X ()
const {
return fX; };
73 Double_t
Y ()
const {
return fY; };
77 Double_t
Phi ()
const;
79 void SetMagPhi(Double_t mag, Double_t phi);
105 void Print(Option_t* option=
"")
const;
friend TVector2 operator/(const TVector2 &, Double_t)
static Double_t Phi_0_2pi(Double_t x)
Returns phi angle in the interval [0,2*PI)
friend TVector2 operator+(const TVector2 &, const TVector2 &)
TVector2 Rotate(Double_t phi) const
Rotation by phi.
TVector2 is a general two vector class, which can be used for the description of different vectors in...
TVector2 Proj(const TVector2 &v) const
void Set(const TVector2 &v)
static Double_t Phi_mpi_pi(Double_t x)
Returns phi angle in the interval [-PI,PI)
friend Double_t operator^(const TVector2 &, const TVector2 &)
TVector2 Norm(const TVector2 &v) const
TVector2 & operator/=(Double_t s)
void Print(Option_t *option="") const
Double_t operator*=(TVector2 const &v)
friend Double_t operator*(const TVector2 &, const TVector2 &)
friend TVector2 operator-(const TVector2 &, const TVector2 &)
* x
Deprecated and error prone model selection interface.
Double_t Phi() const
Return vector phi.
TVector2 & operator-=(TVector2 const &v)
TVector2 & operator=(TVector2 const &v)
Double_t DeltaPhi(const TVector2 &v) const
TVector2 & operator+=(TVector2 const &v)
TVector2 Unit() const
Return module normalized to 1.
void SetMagPhi(Double_t mag, Double_t phi)
Set vector using mag and phi.
Double_t Mod() const
Return modulo of this vector.