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;
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;
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(),
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint angle
Option_t Option_t TPoint xy
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
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 Version_t ReadVersion(UInt_t *start=nullptr, UInt_t *bcnt=nullptr, const TClass *cl=nullptr)=0
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=nullptr)=0
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
virtual const char * GetName() const
Returns name of object.
virtual void Streamer(TBuffer &)
Stream an object of class TObject.
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).
void Streamer(TBuffer &) override
Stream an object of class TVector3.
void Print(Option_t *option="") const override
Print vector parameters.
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 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.
TClass * IsA() const override
void SetTheta(Double_t)
Set theta keeping mag and phi constant (BaBar).
Double_t ACos(Double_t)
Returns the principal value of the arc cosine of x, expressed in radians.
Double_t Exp(Double_t x)
Returns the base-e exponential function of x, which is e raised to the power x.
Double_t ATan(Double_t)
Returns the principal value of the arc tangent of x, expressed in radians.
Double_t ATan2(Double_t y, Double_t x)
Returns the principal value of the arc tangent of y/x, expressed in radians.
Double_t Log(Double_t x)
Returns the natural logarithm of x.
Double_t Sqrt(Double_t x)
Returns the square root of x.
Double_t Cos(Double_t)
Returns the cosine of an angle of x radians.
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.
Double_t Tan(Double_t)
Returns the tangent of an angle of x radians.
constexpr Double_t RadToDeg()
Conversion from radian to degree: .
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.