188 #define TOLERANCE (1.0E-6)
191 : fxx(1.0), fxy(0.0), fxz(0.0), fyx(0.0), fyy(1.0), fyz(0.0),
192 fzx(0.0), fzy(0.0), fzz(1.0) {}
195 fxx(m.fxx), fxy(m.fxy), fxz(m.fxz), fyx(m.fyx), fyy(m.fyy), fyz(m.fyz),
196 fzx(m.fzx), fzy(m.fzy), fzz(m.fzz) {}
201 : fxx(mxx), fxy(mxy), fxz(mxz), fyx(myx), fyy(myy), fyz(myz),
202 fzx(mzx), fzy(mzy), fzz(mzz) {}
208 if (j == 0) {
return fxx; }
209 if (j == 1) {
return fxy; }
210 if (j == 2) {
return fxz; }
212 if (j == 0) {
return fyx; }
213 if (j == 1) {
return fyy; }
214 if (j == 2) {
return fyz; }
216 if (j == 0) {
return fzx; }
217 if (j == 1) {
return fzy; }
218 if (j == 2) {
return fzz; }
221 Warning(
"operator()(i,j)",
"bad indices (%d , %d)",i,j);
258 double mag2 = Q.
QMag2();
262 fxx = two_r2 + two_x2;
263 fyy = two_r2 + two_y2;
264 fzz = two_r2 + two_z2;
267 fxy = two_xy - two_zr;
268 fyx = two_xy + two_zr;
271 fxz = two_xz + two_yr;
272 fzx = two_xz - two_yr;
275 fyz = two_yz - two_xr;
276 fzy = two_yz + two_xr;
312 Warning(
"Rotate(angle,axis)",
" zero axis");
315 Double_t dx = axis.
X()/ll, dy = axis.
Y()/ll, dz = axis.
Z()/ll;
317 ca+(1-ca)*dx*dx, (1-ca)*dx*dy-sa*dz, (1-ca)*dx*dz+sa*dy,
318 (1-ca)*dy*dx+sa*dz, ca+(1-ca)*dy*dy, (1-ca)*dy*dz-sa*dx,
319 (1-ca)*dz*dx-sa*dy, (1-ca)*dz*dy+sa*dx, ca+(1-ca)*dz*dz );
384 Warning(
"RotateAxes",
"bad axis vectors");
388 newX.
Y(), newY.
Y(), newZ.
Y(),
389 newX.
Z(), newY.
Z(), newZ.
Z()));
525 Warning(
"GetPhi()",
" |fzz| > 1 ");
531 const Double_t cscTheta = 1/sinTheta;
534 Warning(
"GetPhi()",
"finds | cos phi | > 1");
540 }
else if (
fzx < 0) {
542 }
else if (
fzy > 0) {
551 }
else if (
fxy < 0) {
579 double finalPsi = 0.0;
583 Warning(
"GetPsi()",
" |fzz| > 1 ");
589 const Double_t cscTheta = 1/sinTheta;
592 Warning(
"GetPsi()",
"| cos psi | > 1 ");
598 }
else if (
fxz < 0) {
606 Warning(
"GetPsi()",
"| fxx | > 1 ");
612 }
else if (
fyx < 0) {
689 Warning(
"MakeBasis(X,Y,Z)",
"non-zero Z Axis is required");
700 yAxis = zAxis.
Cross(xAxis)*(1.0/xmag);
708 xAxis = yAxis.
Cross(zAxis);
TRotation & RotateYEulerAngles(Double_t phi, Double_t theta, Double_t psi)
TVector3 operator*(const TVector3 &) const
Double_t GetXPhi(void) const
TRotation & RotateZ(Double_t)
Double_t GetXTheta(void) const
TRotation & RotateX(Double_t)
Double_t Dot(const TVector3 &) const
TRotation & SetXAxis(const TVector3 &axis)
TRotation & RotateAxes(const TVector3 &newX, const TVector3 &newY, const TVector3 &newZ)
Double_t Mag() const
return the magnitude (rho in spherical coordinate system)
ClassImp(TRotation) TRotation
Double_t GetYPhi(void) const
Double_t operator()(int, int) const
void AngleAxis(Double_t &, TVector3 &) const
Double_t GetXPsi(void) const
TRotation & SetToIdentity()
Double_t GetYPsi(void) const
Double_t ATan2(Double_t, Double_t)
TRotation & Rotate(Double_t, const TVector3 &)
TRotation & Transform(const TRotation &)
TRotation & SetYAxis(const TVector3 &axis)
TRotation & RotateXEulerAngles(Double_t phi, Double_t theta, Double_t psi)
TRotation & RotateY(Double_t)
Mother of all ROOT objects.
TRotation & SetYEulerAngles(Double_t phi, Double_t theta, Double_t psi)
Double_t GetYTheta(void) const
TVector3 Cross(const TVector3 &) const
TRotation & SetZAxis(const TVector3 &axis)
void MakeBasis(TVector3 &xAxis, TVector3 &yAxis, TVector3 &zAxis) const
Double_t Sqrt(Double_t x)
TVector3 Orthogonal() const
TRotation & SetXEulerAngles(Double_t phi, Double_t theta, Double_t psi)
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.