190 return *
this =
m * (*this);
197 return *
this =
m * (*this);
210 if(arg > 1.0) arg = 1.0;
211 if(arg < -1.0) arg = -1.0;
298 trans.
Rotate(angle, axis);
314 fX = (u1*u3*px - u2*py + u1*up*pz)/up;
315 fY = (u2*u3*px + u1*py + u2*up*pz)/up;
316 fZ = (u3*u3*px - px + u3*up*pz)/up;
317 }
else if (u3 < 0.) {
fX = -
fX;
fZ = -
fZ; }
328 if (cosTheta*cosTheta < 1)
return -0.5*
TMath::Log( (1.0-cosTheta)/(1.0+cosTheta) );
329 if (
fZ == 0)
return 0;
331 if (
fZ > 0)
return 10e10;
350 fZ = tanTheta ?
pt / tanTheta : 0;
399void TVector3::Streamer(
TBuffer &R__b)
409 if (R__v < 2) TObject::Streamer(R__b);
459 m(1,0)*
v.X()+
m(1,1)*
v.Y()+
m(1,2)*
v.Z(),
460 m(2,0)*
v.X()+
m(2,1)*
v.Y()+
m(2,2)*
v.Z());
468 Printf(
"%s %s (x,y,z)=(%f,%f,%f) (rho,theta,phi)=(%f,%f,%f)",
GetName(),
GetTitle(),
X(),
Y(),
Z(),
void Printf(const char *fmt,...)
TVector3 operator-(const TVector3 &a, const TVector3 &b)
Operator -.
TVector3 operator+(const TVector3 &a, const TVector3 &b)
Operator +.
TVector3 operator*(const TVector3 &p, Double_t a)
Operator *.
Buffer base class used for serializing objects.
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
virtual const char * GetName() const
Returns name of object.
virtual const char * GetTitle() const
Returns title of object.
The TRotation class describes a rotation of objects of the TVector3 class.
TRotation & Rotate(Double_t, const TVector3 &)
Rotate along an axis.
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)
void SetPhi(Double_t)
Set phi keeping mag and theta constant (BaBar).
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.
TVector3 Unit() const
Return unit vector parallel to this.
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 PseudoRapidity() const
Double_t m = Mag(); return 0.5*log( (m+fZ)/(m-fZ) ); guard against Pt=0.
void Rotate(Double_t, const TVector3 &)
Rotate vector.
void SetPtEtaPhi(Double_t pt, Double_t eta, Double_t phi)
Set Pt, Eta and Phi.
TVector3 & operator*=(Double_t)
Double_t CosTheta() const
Double_t Theta() const
Return the polar angle.
Double_t Perp() const
Return the transverse component (R in cylindrical coordinate system)
TVector3 & Transform(const TRotation &)
Transform this vector with a TRotation.
void Print(Option_t *option="") const
Print vector parameters.
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 ATan2(Double_t y, Double_t x)
Double_t Sqrt(Double_t x)
constexpr Double_t RadToDeg()
Conversion from radian to degree: