184 return *
this =
m * (*this);
191 return *
this =
m * (*this);
204 if(arg > 1.0) arg = 1.0;
205 if(arg < -1.0) arg = -1.0;
292 trans.
Rotate(angle, axis);
308 fX = (u1*u3*px - u2*py + u1*up*pz)/up;
309 fY = (u2*u3*px + u1*py + u2*up*pz)/up;
310 fZ = (u3*u3*px - px + u3*up*pz)/up;
311 }
else if (u3 < 0.) {
fX = -
fX;
fZ = -
fZ; }
322 if (cosTheta*cosTheta < 1)
return -0.5*
TMath::Log( (1.0-cosTheta)/(1.0+cosTheta) );
323 if (
fZ == 0)
return 0;
325 if (
fZ > 0)
return 10e10;
344 fZ = tanTheta ?
pt / tanTheta : 0;
393void TVector3::Streamer(
TBuffer &R__b)
403 if (R__v < 2) TObject::Streamer(R__b);
453 m(1,0)*
v.X()+
m(1,1)*
v.Y()+
m(1,2)*
v.Z(),
454 m(2,0)*
v.X()+
m(2,1)*
v.Y()+
m(2,2)*
v.Z());
462 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)
TVector3 is a general three vector class, which can be used for the description of different vectors ...
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).
static constexpr double s
Double_t ATan2(Double_t y, Double_t x)
Double_t Sqrt(Double_t x)
constexpr Double_t RadToDeg()
Conversion from radian to degree: