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;
393 void 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(),
Double_t Dot(const TVector3 &) const
void RotateUz(const TVector3 &)
NewUzVector must be normalized !
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
TVector3 operator*(const TVector3 &p, Double_t a)
Operator *.
Double_t CosTheta() const
Buffer base class used for serializing objects.
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
void RotateX(Double_t)
Rotate vector around X.
Double_t Angle(const TVector3 &) const
Return the angle w.r.t. another 3-vector.
TVector3 Unit() const
Return unit vector parallel to this.
TVector3 operator-() const
TVector3 & operator*=(Double_t)
void Rotate(Double_t, const TVector3 &)
Rotate vector.
static Double_t Phi_mpi_pi(Double_t x)
Returns phi angle in the interval [-PI,PI)
void SetXYZ(Double_t x, Double_t y, Double_t z)
Double_t ATan2(Double_t, Double_t)
TRotation & Rotate(Double_t, const TVector3 &)
Rotate along an axis.
Double_t Perp() const
Return the transverse component (R in cylindrical coordinate system)
void RotateY(Double_t)
Rotate vector around Y.
TVector3 is a general three vector class, which can be used for the description of different vectors ...
The TRotation class describes a rotation of objects of the TVector3 class.
void SetTheta(Double_t)
Set theta keeping mag and phi constant (BaBar).
Double_t Theta() const
Return the polar angle.
void Print(Option_t *option="") const
Print vector parameters.
Double_t PseudoRapidity() const
Double_t m = Mag(); return 0.5*log( (m+fZ)/(m-fZ) ); guard against Pt=0.
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
TVector3 & Transform(const TRotation &)
Transform this vector with a TRotation.
static constexpr double s
void RotateZ(Double_t)
Rotate vector around Z.
void SetPhi(Double_t)
Set phi keeping mag and theta constant (BaBar).
constexpr Double_t RadToDeg()
Conversion from radian to degree: .
virtual const char * GetTitle() const
Returns title of object.
Double_t DeltaR(const TVector3 &) const
Return deltaR with respect to v.
Double_t Phi() const
Return the azimuth angle. Returns phi from -pi to pi.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Double_t Sqrt(Double_t x)
virtual const char * GetName() const
Returns name of object.
TVector3 operator+(const TVector3 &a, const TVector3 &b)
Operator +.
void SetPtThetaPhi(Double_t pt, Double_t theta, Double_t phi)
Set Pt, Theta and Phi.
void SetMagThetaPhi(Double_t mag, Double_t theta, Double_t phi)
Setter with mag, theta, phi.
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
void SetPtEtaPhi(Double_t pt, Double_t eta, Double_t phi)
Set Pt, Eta and Phi.