44 constexpr std::size_t
size()
const {
return 3; }
251:
fX(0.0),
fY(0.0),
fZ(0.0) {}
254 fX(p.fX),
fY(p.fY),
fZ(p.fZ) {}
257:
fX(xx),
fY(yy),
fZ(zz) {}
260:
fX(x0[0]),
fY(x0[1]),
fZ(x0[2]) {}
263:
fX(x0[0]),
fY(x0[1]),
fZ(x0[2]) {}
275 Error(
"operator()(i)",
"bad index (%d) returning 0",i);
289 Error(
"operator()(i)",
"bad index (%d) returning &fX",i);
365 if (tot > 0.0) per -= ss*ss/tot;
366 if (per < 0) per = 0;
376 return ptot == 0.0 ? 1.0 :
fZ/ptot;
382 Warning(
"SetMag",
"zero vector can't be stretched");
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
float Float_t
Float 4 bytes (float).
const char Option_t
Option string (const char).
#define ClassDefOverride(name, id)
TMatrixT< Float_t > TMatrix
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
TObject()
TObject constructor.
<div class="legacybox"><h2>Legacy Code</h2> TRotation is a legacy interface: there will be no bug fix...
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)
TVector3 operator-() const
void SetPhi(Double_t)
Set phi keeping mag and theta constant (BaBar).
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.
Bool_t operator!=(const TVector3 &) const
Double_t operator[](int) const
TVector3 Unit() const
Return unit vector parallel to this.
void RotateX(Double_t)
Rotate vector around X.
TVector3 & operator+=(const TVector3 &)
constexpr std::size_t size() const
The length is always 3. For compatibility with the standard library.
Double_t Angle(const TVector3 &) const
Return the angle w.r.t. another 3-vector.
Double_t PseudoRapidity() const
Express the coordinates of this vector in a new reference frame S' whose z' axis will lie in the dire...
Double_t operator()(int) const
void Rotate(Double_t, const TVector3 &)
Rotate vector.
void SetPtEtaPhi(Double_t pt, Double_t eta, Double_t phi)
Set Pt, Eta and Phi.
void GetXYZ(Double_t *carray) const
TVector3 & operator*=(Double_t)
TVector2 EtaPhiVector() const
Double_t CosTheta() const
friend class TLorentzVector
Double_t DrEtaPhi(const TVector3 &) const
TVector3 & operator=(const TVector3 &)
TVector3 Orthogonal() const
Double_t Theta() const
Return the polar angle.
Bool_t operator==(const TVector3 &) const
Double_t Perp() const
Return the transverse component (R in cylindrical coordinate system).
~TVector3() override=default
TVector3 & operator-=(const TVector3 &)
TVector3 & Transform(const TRotation &)
Transform this vector with a TRotation.
Double_t DeltaPhi(const TVector3 &) const
TVector2 XYvector() const
TVector3 Cross(const TVector3 &) const
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 &)
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 Sqrt(Double_t x)
Returns the square root of x.