191#define TOLERANCE (1.0E-6)
197: fxx(1.0), fxy(0.0), fxz(0.0), fyx(0.0), fyy(1.0), fyz(0.0),
198 fzx(0.0), fzy(0.0), fzz(1.0) {}
204 fxx(
m.fxx), fxy(
m.fxy), fxz(
m.fxz), fyx(
m.fyx), fyy(
m.fyy), fyz(
m.fyz),
205 fzx(
m.fzx), fzy(
m.fzy), fzz(
m.fzz) {}
213: fxx(mxx), fxy(mxy), fxz(mxz), fyx(myx), fyy(myy), fyz(myz),
214 fzx(mzx), fzy(mzy), fzz(mzz) {}
221 if (j == 0) {
return fxx; }
222 if (j == 1) {
return fxy; }
223 if (j == 2) {
return fxz; }
225 if (j == 0) {
return fyx; }
226 if (j == 1) {
return fyy; }
227 if (j == 2) {
return fyz; }
229 if (j == 0) {
return fzx; }
230 if (j == 1) {
return fzy; }
231 if (j == 2) {
return fzz; }
234 Warning(
"operator()(i,j)",
"bad indices (%d , %d)",i,j);
273 double mag2 = Q.
QMag2();
277 fxx = two_r2 + two_x2;
278 fyy = two_r2 + two_y2;
279 fzz = two_r2 + two_z2;
282 fxy = two_xy - two_zr;
283 fyx = two_xy + two_zr;
286 fxz = two_xz + two_yr;
287 fzx = two_xz - two_yr;
290 fyz = two_yz - two_xr;
291 fzy = two_yz + two_xr;
329 Warning(
"Rotate(angle,axis)",
" zero axis");
332 Double_t dx = axis.
X()/ll, dy = axis.
Y()/ll, dz = axis.
Z()/ll;
334 ca+(1-ca)*dx*dx, (1-ca)*dx*dy-sa*dz, (1-ca)*dx*dz+sa*dy,
335 (1-ca)*dy*dx+sa*dz, ca+(1-ca)*dy*dy, (1-ca)*dy*dz-sa*dx,
336 (1-ca)*dz*dx-sa*dy, (1-ca)*dz*dy+sa*dx, ca+(1-ca)*dz*dz );
409 Warning(
"RotateAxes",
"bad axis vectors");
413 newX.
Y(), newY.
Y(), newZ.
Y(),
414 newX.
Z(), newY.
Z(), newZ.
Z()));
584 Warning(
"GetPhi()",
" |fzz| > 1 ");
590 const Double_t cscTheta = 1/sinTheta;
593 Warning(
"GetPhi()",
"finds | cos phi | > 1");
599 }
else if (
fzx < 0) {
601 }
else if (
fzy > 0) {
610 }
else if (
fxy < 0) {
646 double finalPsi = 0.0;
650 Warning(
"GetPsi()",
" |fzz| > 1 ");
656 const Double_t cscTheta = 1/sinTheta;
659 Warning(
"GetPsi()",
"| cos psi | > 1 ");
665 }
else if (
fxz < 0) {
673 Warning(
"GetPsi()",
"| fxx | > 1 ");
679 }
else if (
fyx < 0) {
772 Warning(
"MakeBasis(X,Y,Z)",
"non-zero Z Axis is required");
783 yAxis = zAxis.
Cross(xAxis)*(1.0/xmag);
791 xAxis = yAxis.
Cross(zAxis);
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t del
Option_t Option_t TPoint TPoint angle
Mother of all ROOT objects.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
<div class="legacybox"><h2>Legacy Code</h2> TQuaternion is a legacy interface: there will be no bug f...
<div class="legacybox"><h2>Legacy Code</h2> TRotation is a legacy interface: there will be no bug fix...
TRotation & SetToIdentity()
TRotation & SetZAxis(const TVector3 &axis)
Set Z axis.
Double_t PhiY() const
Return Phi.
TRotation & Rotate(Double_t, const TVector3 &)
Rotate along an axis.
void SetXPhi(Double_t)
Set XPhi.
Double_t GetYPhi(void) const
Return YPhi.
Double_t operator()(int, int) const
Dereferencing operator const.
Double_t ThetaY() const
Return Theta.
TRotation & RotateYEulerAngles(Double_t phi, Double_t theta, Double_t psi)
Rotate using the y-convention.
void SetYPhi(Double_t)
Set YPhi.
TRotation & SetYAxis(const TVector3 &axis)
Set Y axis.
Double_t GetXPsi(void) const
Get psi angle.
void SetXPsi(Double_t)
Set XPsi.
Double_t PhiX() const
Return Phi.
TRotation & Transform(const TRotation &)
TRotation & RotateY(Double_t)
Rotate around y.
Double_t PhiZ() const
Return Phi.
TRotation & RotateZ(Double_t)
Rotate around z.
TVector3 operator*(const TVector3 &) const
Double_t GetYPsi(void) const
Return YPsi.
Double_t GetYTheta(void) const
Return YTheta.
TRotation & RotateXEulerAngles(Double_t phi, Double_t theta, Double_t psi)
Rotate using the x-convention.
TRotation & SetXEulerAngles(Double_t phi, Double_t theta, Double_t psi)
Rotate using the x-convention (Landau and Lifshitz, Goldstein, &c) by doing the explicit rotations.
void AngleAxis(Double_t &, TVector3 &) const
Rotation defined by an angle and a vector.
Double_t ThetaZ() const
Return Theta.
void SetYPsi(Double_t)
Set YPsi.
void SetYTheta(Double_t)
Set YTheta.
TRotation & SetYEulerAngles(Double_t phi, Double_t theta, Double_t psi)
Rotate using the y-convention.
void MakeBasis(TVector3 &xAxis, TVector3 &yAxis, TVector3 &zAxis) const
Make the Z axis into a unit variable.
TRotation & RotateAxes(const TVector3 &newX, const TVector3 &newY, const TVector3 &newZ)
Rotate axes.
void SetXTheta(Double_t)
Set XTheta.
Double_t GetXPhi(void) const
Return phi angle.
TRotation & SetXAxis(const TVector3 &axis)
Set X axis.
Double_t GetXTheta(void) const
Return XTheta.
Double_t ThetaX() const
Return Theta.
TRotation & RotateX(Double_t)
Rotate around x.
Double_t Dot(const TVector3 &) const
TVector3 Orthogonal() const
TVector3 Cross(const TVector3 &) const
Double_t ACos(Double_t)
Returns the principal value of the arc cosine of x, expressed in radians.
constexpr Double_t PiOver2()
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 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.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.