270 if (&matrix ==
this)
return *
this;
293 if (&other ==
this)
return kTRUE;
297 if ((tr1 & !tr2) || (tr2 & !tr1))
return kFALSE;
300 if ((rr1 & !rr2) || (rr2 & !rr1))
return kFALSE;
348 return (
char*)name.
Data();
368 for (
Int_t i=0; i<3; i++) {
369 memcpy(hmatrix, mat,
kN3);
378 for (
Int_t i=0; i<3; i++) {
392 memcpy(master, local,
kN3);
398 for (i=0; i<3; i++) master[i] = tr[i] + local[i];
402 for (i=0; i<3; i++) {
405 + local[1]*rot[3*i+1]
406 + local[2]*rot[3*i+2];
416 memcpy(master, local,
kN3);
420 for (
Int_t i=0; i<3; i++) {
421 master[i] = local[0]*rot[3*i]
422 + local[1]*rot[3*i+1]
423 + local[2]*rot[3*i+2];
433 memcpy(master, local,
kN3);
441 for (i=0; i<3; i++) master[i] = bombtr[i] + local[i];
445 for (i=0; i<3; i++) {
446 master[i] = bombtr[i]
448 + local[1]*rot[3*i+1]
449 + local[2]*rot[3*i+2];
459 memcpy(local, master,
kN3);
473 local[0] = mt0*rot[0] + mt1*rot[3] + mt2*rot[6];
474 local[1] = mt0*rot[1] + mt1*rot[4] + mt2*rot[7];
475 local[2] = mt0*rot[2] + mt1*rot[5] + mt2*rot[8];
484 memcpy(local, master,
kN3);
488 for (
Int_t i=0; i<3; i++) {
489 local[i] = master[0]*rot[i]
491 + master[2]*rot[i+6];
501 memcpy(local, master,
kN3);
509 for (i=0; i<3; i++) local[i] = master[i]-bombtr[i];
513 for (i=0; i<3; i++) {
514 local[i] = (master[0]-bombtr[0])*rot[i]
515 + (master[1]-bombtr[1])*rot[i+3]
516 + (master[2]-bombtr[2])*rot[i+6];
525 Double_t normfactor = vect[0]*vect[0] + vect[1]*vect[1] + vect[2]*vect[2];
526 if (normfactor <= 1
E-10)
return;
528 vect[0] *= normfactor;
529 vect[1] *= normfactor;
530 vect[2] *= normfactor;
542 printf(
"%10.6f%12.6f%12.6f Tx = %10.6f\n", rot[0], rot[1], rot[2], tr[0]);
543 printf(
"%10.6f%12.6f%12.6f Ty = %10.6f\n", rot[3], rot[4], rot[5], tr[1]);
544 printf(
"%10.6f%12.6f%12.6f Tz = %10.6f\n", rot[6], rot[7], rot[8], tr[2]);
547 printf(
"Sx=%10.6fSy=%12.6fSz=%12.6f\n", scl[0], scl[1], scl[2]);
578 Warning(
"RegisterYourself",
"cannot register without geometry");
630 for (
Int_t i=0; i<3; i++) fTranslation[i] = 0;
676 if (&matrix ==
this)
return *
this;
703 for (
Int_t i=0; i<3; i++)
721 Warning(
"RotateX",
"Not implemented. Use TGeoCombiTrans instead");
729 Warning(
"RotateY",
"Not implemented. Use TGeoCombiTrans instead");
737 Warning(
"RotateZ",
"Not implemented. Use TGeoCombiTrans instead");
746 for (
Int_t i=0; i<3; i++)
778 for (
Int_t i=0; i<3; i++)
779 master[i] = tr[i] + local[i];
787 memcpy(master, local,
kN3);
798 for (
Int_t i=0; i<3; i++)
799 master[i] = bombtr[i] + local[i];
808 for (
Int_t i=0; i<3; i++)
809 local[i] = master[i]-tr[i];
817 memcpy(local, master,
kN3);
828 for (
Int_t i=0; i<3; i++)
829 local[i] = master[i]-bombtr[i];
838 out <<
" // Translation: " <<
GetName() << std::endl;
842 out <<
" TGeoTranslation *" <<
GetPointerName() <<
" = new TGeoTranslation(\"" <<
GetName() <<
"\",dx,dy,dz);" << std::endl;
859 for (
Int_t i=0; i<9; i++) {
860 if (i%4) fRotationMatrix[i] = 0;
861 else fRotationMatrix[i] = 1.0;
889 for (
Int_t i=0; i<9; i++) {
919 SetAngles(theta1, phi1, theta2, phi2, theta3, phi3);
927 if (&other ==
this)
return *
this;
961 for (
Int_t i=0; i<2; i++) {
962 for (
Int_t j=i+1; j<3; j++) {
964 cij =
TMath::Abs(r[i]*r[j]+r[i+3]*r[j+3]+r[i+6]*r[j+6]);
967 cij =
TMath::Abs(r[3*i]*r[3*j]+r[3*i+1]*r[3*j+1]+r[3*i+2]*r[3*j+2]);
1015 for (
Int_t i=0; i<3; i++) {
1016 master[i] = local[0]*rot[3*i]
1017 + local[1]*rot[3*i+1]
1018 + local[2]*rot[3*i+2];
1028 for (
Int_t i=0; i<3; i++) {
1029 local[i] = master[0]*rot[i]
1030 + master[1]*rot[i+3]
1031 + master[2]*rot[i+6];
1058 v[4] = c*fRotationMatrix[4]-s*fRotationMatrix[7];
1059 v[5] = c*fRotationMatrix[5]-s*fRotationMatrix[8];
1060 v[6] = s*fRotationMatrix[3]+c*fRotationMatrix[6];
1061 v[7] = s*fRotationMatrix[4]+c*fRotationMatrix[7];
1062 v[8] = s*fRotationMatrix[5]+c*fRotationMatrix[8];
1064 memcpy(fRotationMatrix, v,
kN9);
1078 v[1] = c*fRotationMatrix[1]+s*fRotationMatrix[7];
1079 v[2] = c*fRotationMatrix[2]+s*fRotationMatrix[8];
1080 v[3] = fRotationMatrix[3];
1081 v[4] = fRotationMatrix[4];
1082 v[5] = fRotationMatrix[5];
1083 v[6] = -s*fRotationMatrix[0]+c*fRotationMatrix[6];
1084 v[7] = -s*fRotationMatrix[1]+c*fRotationMatrix[7];
1085 v[8] = -s*fRotationMatrix[2]+c*fRotationMatrix[8];
1087 memcpy(fRotationMatrix, v,
kN9);
1101 v[1] = c*fRotationMatrix[1]-s*fRotationMatrix[4];
1102 v[2] = c*fRotationMatrix[2]-s*fRotationMatrix[5];
1103 v[3] = s*fRotationMatrix[0]+c*fRotationMatrix[3];
1104 v[4] = s*fRotationMatrix[1]+c*fRotationMatrix[4];
1105 v[5] = s*fRotationMatrix[2]+c*fRotationMatrix[5];
1106 v[6] = fRotationMatrix[6];
1107 v[7] = fRotationMatrix[7];
1108 v[8] = fRotationMatrix[8];
1110 memcpy(&fRotationMatrix[0],v,
kN9);
1173 out <<
" // Rotation: " <<
GetName() << std::endl;
1176 out <<
" thx = " << th1 <<
"; phx = " << ph1 <<
";" << std::endl;
1177 out <<
" thy = " << th2 <<
"; phy = " << ph2 <<
";" << std::endl;
1178 out <<
" thz = " << th3 <<
"; phz = " << ph3 <<
";" << std::endl;
1179 out <<
" TGeoRotation *" <<
GetPointerName() <<
" = new TGeoRotation(\"" <<
GetName() <<
"\",thx,phx,thy,phy,thz,phz);" << std::endl;
1216 if (!
IsValid())
Error(
"SetAngles",
"invalid rotation (Euler angles : phi=%f theta=%f psi=%f)",phi,theta,psi);
1237 for (
Int_t i=0; i<9; i++) {
1242 if (!
IsValid())
Error(
"SetAngles",
"invalid rotation (G3 angles, th1=%f phi1=%f, th2=%f ph2=%f, th3=%f phi3=%f)",
1243 theta1,phi1,theta2,phi2,theta3,phi3);
1259 if (phi1<0) phi1+=360.;
1262 if (phi2<0) phi2+=360.;
1265 if (phi3<0) phi3+=360.;
1323 Error(
"GetInverse",
"no place to store the inverse matrix");
1326 for (
Int_t i=0; i<3; i++) {
1327 for (
Int_t j=0; j<3; j++) {
1340 const Double_t *matleft, *matright;
1350 for (
Int_t i=0; i<3; i++) {
1351 for (
Int_t j=0; j<3; j++) {
1352 for (
Int_t k=0; k<3; k++) {
1353 newmat[3*i+j] += matleft[3*i+k] * matright[3*k+j];
1375 for (
Int_t i=0; i<3; i++) fScale[i] = 1.;
1423 if (&other ==
this)
return *
this;
1453 Error(
"SetScale",
"Invalid scale %f, %f, %f for transformation %s",sx,sy,sx,
GetName());
1468 master[0] = local[0]*
fScale[0];
1469 master[1] = local[1]*fScale[1];
1470 master[2] = local[2]*fScale[2];
1508 local[0] = master[0]/
fScale[0];
1509 local[1] = master[1]/
fScale[1];
1510 local[2] = master[2]/
fScale[2];
1528 (dir[1]*dir[1])/(fScale[1]*fScale[1]) +
1529 (dir[2]*dir[2])/(fScale[2]*fScale[2]);
1548 for (
Int_t i=0; i<3; i++) fTranslation[i] = 0.0;
1652 if (&matrix ==
this)
return *
this;
1778 v[3] = c*rot[3]-s*rot[6];
1779 v[4] = c*rot[4]-s*rot[7];
1780 v[5] = c*rot[5]-s*rot[8];
1781 v[6] = s*rot[3]+c*rot[6];
1782 v[7] = s*rot[4]+c*rot[7];
1783 v[8] = s*rot[5]+c*rot[8];
1789 v[2] = s*fTranslation[1]+c*fTranslation[2];
1790 memcpy(fTranslation,v,
kN3);
1809 v[0] = c*rot[0]+s*rot[6];
1810 v[1] = c*rot[1]+s*rot[7];
1811 v[2] = c*rot[2]+s*rot[8];
1815 v[6] = -s*rot[0]+c*rot[6];
1816 v[7] = -s*rot[1]+c*rot[7];
1817 v[8] = -s*rot[2]+c*rot[8];
1822 v[1] = fTranslation[1];
1823 v[2] = -s*fTranslation[0]+c*fTranslation[2];
1824 memcpy(fTranslation,v,
kN3);
1843 v[0] = c*rot[0]-s*rot[3];
1844 v[1] = c*rot[1]-s*rot[4];
1845 v[2] = c*rot[2]-s*rot[5];
1846 v[3] = s*rot[0]+c*rot[3];
1847 v[4] = s*rot[1]+c*rot[4];
1848 v[5] = s*rot[2]+c*rot[5];
1856 v[1] = s*fTranslation[0]+c*fTranslation[1];
1857 v[2] = fTranslation[2];
1858 memcpy(fTranslation,v,
kN3);
1915 out <<
" // Combi transformation: " <<
GetName() << std::endl;
1916 out <<
" dx = " <<
fTranslation[0] <<
";" << std::endl;
1917 out <<
" dy = " <<
fTranslation[1] <<
";" << std::endl;
1918 out <<
" dz = " <<
fTranslation[2] <<
";" << std::endl;
1925 out <<
" " <<
GetPointerName() <<
"->SetTranslation(dx,dy,dz);" << std::endl;
1945 TGeoRotation *rr = (TGeoRotation*)rot;
2032 for (
Int_t j=0; j<3; j++) fScale[j] = 1.0;
2040 :TGeoCombiTrans(name)
2066 :TGeoCombiTrans(name)
2096 if (sx<1.
E-5 || sy<1.
E-5 || sz<1.
E-5) {
2097 Error(
"ctor",
"Invalid scale");
2110 Error(
"Inverse",
"not implemented");
2122 if (normfactor <= 1
E-5)
return kFALSE;
2123 for (
Int_t i=0; i<3; i++)
2124 fScale[i] /= normfactor;
2142 if (!gGeoIdentity) gGeoIdentity =
this;
2152 if (!gGeoIdentity) gGeoIdentity =
this;
2180 memset(&fTranslation[0], 0,
kN3);
2234 if (matrix ==
this)
return *
this;
2236 if (matrix == 0)
return *
this;
2259 if (&matrix ==
this)
return *
this;
2343 static TGeoHMatrix
h;
2428 for (i=0; i<3; i++) {
2436 for (i=0; i<3; i++) {
2437 for (j=0; j<3; j++) {
2447 for (i=0; i<3; i++)
fScale[i] *= r_scl[i];
2457 if (left == gGeoIdentity)
return;
2490 for (i=0; i<3; i++) {
2491 new_tra[i] = l_tra[i]
2500 for (i=0; i<3; i++) {
2501 for (j=0; j<3; j++) {
2511 for (i=0; i<3; i++)
fScale[i] *= l_scl[i];
2529 v[4] = c*fRotationMatrix[4]-s*fRotationMatrix[7];
2530 v[5] = c*fRotationMatrix[5]-s*fRotationMatrix[8];
2531 v[6] = s*fRotationMatrix[3]+c*fRotationMatrix[6];
2532 v[7] = s*fRotationMatrix[4]+c*fRotationMatrix[7];
2533 v[8] = s*fRotationMatrix[5]+c*fRotationMatrix[8];
2534 memcpy(fRotationMatrix, v,
kN9);
2538 v[2] = s*fTranslation[1]+c*fTranslation[2];
2539 memcpy(fTranslation,v,
kN3);
2553 v[1] = c*fRotationMatrix[1]+s*fRotationMatrix[7];
2554 v[2] = c*fRotationMatrix[2]+s*fRotationMatrix[8];
2555 v[3] = fRotationMatrix[3];
2556 v[4] = fRotationMatrix[4];
2557 v[5] = fRotationMatrix[5];
2558 v[6] = -s*fRotationMatrix[0]+c*fRotationMatrix[6];
2559 v[7] = -s*fRotationMatrix[1]+c*fRotationMatrix[7];
2560 v[8] = -s*fRotationMatrix[2]+c*fRotationMatrix[8];
2561 memcpy(fRotationMatrix, v,
kN9);
2564 v[1] = fTranslation[1];
2565 v[2] = -s*fTranslation[0]+c*fTranslation[2];
2566 memcpy(fTranslation,v,
kN3);
2580 v[1] = c*fRotationMatrix[1]-s*fRotationMatrix[4];
2581 v[2] = c*fRotationMatrix[2]-s*fRotationMatrix[5];
2582 v[3] = s*fRotationMatrix[0]+c*fRotationMatrix[3];
2583 v[4] = s*fRotationMatrix[1]+c*fRotationMatrix[4];
2584 v[5] = s*fRotationMatrix[2]+c*fRotationMatrix[5];
2585 v[6] = fRotationMatrix[6];
2586 v[7] = fRotationMatrix[7];
2587 v[8] = fRotationMatrix[8];
2588 memcpy(&fRotationMatrix[0],v,
kN9);
2591 v[1] = s*fTranslation[0]+c*fTranslation[1];
2592 v[2] = fTranslation[2];
2593 memcpy(fTranslation,v,
kN3);
2661 out <<
" // HMatrix: " <<
GetName() << std::endl;
2662 out <<
" tr[0] = " << tr[0] <<
"; " <<
"tr[1] = " << tr[1] <<
"; " <<
"tr[2] = " << tr[2] <<
";" << std::endl;
2663 out <<
" rot[0] =" << rot[0] <<
"; " <<
"rot[1] = " << rot[1] <<
"; " <<
"rot[2] = " << rot[2] <<
";" << std::endl;
2664 out <<
" rot[3] =" << rot[3] <<
"; " <<
"rot[4] = " << rot[4] <<
"; " <<
"rot[5] = " << rot[5] <<
";" << std::endl;
2665 out <<
" rot[6] =" << rot[6] <<
"; " <<
"rot[7] = " << rot[7] <<
"; " <<
"rot[8] = " << rot[8] <<
";" << std::endl;
2667 out <<
" TGeoHMatrix *" << name <<
" = new TGeoHMatrix(\"" <<
GetName() <<
"\");" << std::endl;
2668 out <<
" " << name <<
"->SetTranslation(tr);" << std::endl;
2669 out <<
" " << name <<
"->SetRotation(rot);" << std::endl;
2670 if (
IsTranslation()) out <<
" " << name <<
"->SetBit(TGeoMatrix::kGeoTranslation);" << std::endl;
2671 if (
IsRotation()) out <<
" " << name <<
"->SetBit(TGeoMatrix::kGeoRotation);" << std::endl;
2672 if (
IsReflection()) out <<
" " << name <<
"->SetBit(TGeoMatrix::kGeoReflection);" << std::endl;
void Subtract(const TGeoTranslation *other)
Subtracting a translation from this one.
virtual const char * GetName() const
Returns name of object.
virtual UInt_t GetUniqueID() const
Return the unique object id.
virtual void LocalToMaster(const Double_t *local, Double_t *master) const
convert a point by multiplying its column vector (x, y, z, 1) to matrix inverse
double dist(Rotation3D const &r1, Rotation3D const &r2)
const Double_t kIdentityMatrix[3 *3]
void SetRotation(const TGeoRotation &other)
Copy the rotation from another one.
void Print(Option_t *option="") const
print the matrix in 4x4 format
virtual void MasterToLocal(const Double_t *master, Double_t *local) const
convert a point by multiplying its column vector (x, y, z, 1) to matrix
Double_t fRotationMatrix[9]
TGeoMatrix()
dummy constructor
TGeoMatrix & operator=(const TGeoMatrix &matrix)
Assignment operator.
virtual void MasterToLocalVect(const Double_t *master, Double_t *local) const
convert a point by multiplying its column vector (x, y, z, 1) to matrix
TGeoRotation & operator=(const TGeoMatrix &matrix)
Assignment from a general matrix.
void FastRotZ(const Double_t *sincos)
Perform a rotation about Z having the sine/cosine of the rotation angle.
void FastRotZ(const Double_t *sincos)
Perform a rotation about Z having the sine/cosine of the rotation angle.
void MultiplyLeft(const TGeoMatrix *left)
multiply to the left with an other transformation if right is identity matrix, just return ...
virtual ~TGeoScale()
destructor
void BombTranslation(const Double_t *tr, Double_t *bombtr)
Get the new 'bombed' translation vector according current exploded view mode.
Geometrical transformation package.
TGeoMatrix & operator*(const TGeoMatrix &right) const
Multiplication.
virtual TGeoMatrix * MakeClone() const
Make a clone of this matrix.
Bool_t TestBit(UInt_t f) const
virtual void ReflectX(Bool_t leftside, Bool_t rotonly=kFALSE)
Multiply by a reflection respect to YZ.
virtual const Double_t * GetRotationMatrix() const =0
const Double_t kNullVector[3]
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual void MasterToLocal(const Double_t *master, Double_t *local) const
Convert a global point to local frame.
virtual void ReflectZ(Bool_t leftside, Bool_t rotonly=kFALSE)
Multiply by a reflection respect to XY.
An identity transformation.
virtual void RotateX(Double_t angle)
Rotate about X axis of the master frame with angle expressed in degrees.
Most general transformation, holding a translation, a rotation and a scale.
TGeoCombiTrans()
dummy ctor
void SetTranslation(const Double_t *vect)
TGeoRotation()
Default constructor.
Class describing translations.
virtual TObject * Remove(TObject *obj)
Remove object from array.
virtual void MasterToLocalBomb(const Double_t *master, Double_t *local) const
convert a point by multiplying its column vector (x, y, z, 1) to matrix
Matrix class used for computing global transformations Should NOT be used for node definition...
void Multiply(const TGeoMatrix *right)
multiply to the right with an other transformation if right is identity matrix, just return ...
void GetInverse(Double_t *invmat) const
Get the inverse rotation matrix (which is simply the transpose)
void Add(const TGeoTranslation *other)
Adding a translation to this one.
const Double_t kUnitScale[3]
virtual void RotateY(Double_t angle)
Rotate about Y axis with angle expressed in degrees.
void SetTranslation(const TGeoTranslation &tr)
copy the translation component
virtual ~TGeoCombiTrans()
destructor
virtual const Double_t * GetScale() const
virtual void ReflectY(Bool_t leftside, Bool_t rotonly=kFALSE)
Multiply by a reflection respect to ZX.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void RotateY(Double_t angle)
Rotate about Y axis with angle expressed in degrees.
virtual void RotateX(Double_t angle)
Rotate about X axis with angle expressed in degrees.
virtual TGeoMatrix & Inverse() const
Return a temporary inverse of this.
virtual void RotateX(Double_t angle)
Rotate about X axis with angle expressed in degrees.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
virtual void RotateZ(Double_t angle)
Rotate about Z axis with angle expressed in degrees.
virtual void ReflectY(Bool_t leftside, Bool_t rotonly=kFALSE)
Multiply by a reflection respect to ZX.
virtual ~TGeoHMatrix()
destructor
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
Bool_t Normalize()
A scale transformation should be normalized by sx*sy*sz factor.
Double_t GetPhiRotation(Bool_t fixX=kFALSE) const
— Returns rotation angle about Z axis in degrees.
The TNamed class is the base class for all named ROOT classes.
Double_t Determinant() const
computes determinant of the rotation matrix
virtual void ReflectZ(Bool_t leftside, Bool_t rotonly=kFALSE)
Multiply by a reflection respect to XY.
constexpr Double_t DegToRad()
virtual ~TGeoGenTrans()
destructor
Bool_t IsIdentity() const
virtual TGeoMatrix & Inverse() const
Return a temporary inverse of this.
TGeoHMatrix & operator=(const TGeoMatrix *matrix)
assignment
Double_t ATan2(Double_t, Double_t)
void CopyFrom(const TGeoMatrix *other)
Fast copy method.
virtual void LocalToMasterVect(const Double_t *local, Double_t *master) const
convert a vector by multiplying its column vector (x, y, z, 1) to matrix inverse
virtual void RotateY(Double_t angle)
Rotate about Y axis of the master frame with angle expressed in degrees.
char * GetPointerName() const
Provide a pointer name containing uid.
virtual const Double_t * GetTranslation() const
virtual TGeoMatrix * MakeClone() const
Make a clone of this matrix.
virtual void ReflectX(Bool_t leftside, Bool_t rotonly=kFALSE)
Multiply by a reflection respect to YZ.
Bool_t operator==(const TGeoMatrix &other) const
Is-equal operator.
TGeoCombiTrans & operator=(const TGeoMatrix &matrix)
Assignment operator.
virtual const Double_t * GetRotationMatrix() const
virtual void LocalToMaster(const Double_t *local, Double_t *master) const
Convert a local point to the master frame.
void MultiplyBy(TGeoRotation *rot, Bool_t after=kTRUE)
Multiply this rotation with the one specified by ROT.
TNamed & operator=(const TNamed &rhs)
TNamed assignment operator.
virtual void RegisterYourself()
Register the matrix in the current manager, which will become the owner.
void Clear(Option_t *option="")
clear the data for this matrix
Class describing rotation + translation.
void Clear(Option_t *option="")
clear the fields of this transformation
virtual void MasterToLocal(const Double_t *master, Double_t *local) const
convert a point by multiplying its column vector (x, y, z, 1) to matrix
virtual void LocalToMasterVect(const Double_t *local, Double_t *master) const
convert a vector to MARS
virtual const Double_t * GetRotationMatrix() const
get the rotation array
void Clear(Option_t *option="")
reset data members
void SetDefaultName()
If no name was supplied in the ctor, the type of transformation is checked.
void CheckMatrix()
performes an orthogonality check and finds if the matrix is a reflection Warning("CheckMatrix", "orthogonality check not performed yet");
Bool_t IsRegistered() const
virtual void LocalToMaster(const Double_t *local, Double_t *master) const
convert a point by multiplying its column vector (x, y, z, 1) to matrix inverse
Int_t GetEntriesFast() const
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual TGeoMatrix * MakeClone() const
Make a clone of this matrix.
virtual void RegisterYourself()
Register the matrix in the current manager, which will become the owner.
virtual void ReflectY(Bool_t leftside, Bool_t rotonly=kFALSE)
Multiply by a reflection respect to ZX.
static void Normalize(Double_t *vect)
Normalize a vector.
virtual const Double_t * GetTranslation() const
TGeoRotation * GetRotation() const
void Clear(Option_t *option="")
Reset translation/rotation to identity.
virtual void ReflectY(Bool_t leftside, Bool_t rotonly=kFALSE)
Multiply by a reflection respect to ZX.
virtual Int_t GetByteCount() const
Get total size in bytes of this.
void GetHomogenousMatrix(Double_t *hmat) const
The homogenous matrix associated with the transformation is used for piling up's and visualization...
TObjArray * GetListOfMatrices() const
virtual void RotateZ(Double_t angle)
Rotate about Z axis of the master frame with angle expressed in degrees.
TGeoIdentity * gGeoIdentity
virtual void LocalToMaster(const Double_t *local, Double_t *master) const
convert a point by multiplying its column vector (x, y, z, 1) to matrix inverse
Class describing rotations.
virtual void RotateZ(Double_t angle)
Rotate about Z axis of the master frame with angle expressed in degrees.
Double_t fRotationMatrix[3 *3]
Bool_t IsValid() const
Perform orthogonality test for rotation.
Bool_t IsRotation() const
virtual void ReflectZ(Bool_t leftside, Bool_t rotonly=kFALSE)
Multiply by a reflection respect to XY.
Class describing scale transformations.
virtual TGeoMatrix & Inverse() const
Return a temporary inverse of this.
TGeoScale & operator=(const TGeoScale &other)
Assignment operator.
virtual void ReflectX(Bool_t leftside, Bool_t rotonly=kFALSE)
Multiply by a reflection respect to YZ.
R__EXTERN TGeoManager * gGeoManager
void GetAngles(Double_t &theta1, Double_t &phi1, Double_t &theta2, Double_t &phi2, Double_t &theta3, Double_t &phi3) const
Retrieve rotation angles.
virtual void MasterToLocal(const Double_t *master, Double_t *local) const
convert a point by multiplying its column vector (x, y, z, 1) to matrix
TGeoTranslation()
Default constructor.
virtual void ReflectZ(Bool_t leftside, Bool_t rotonly=kFALSE)
Multiply by a reflection respect to XY.
void RegisterMatrix(const TGeoMatrix *matrix)
Register a matrix to the list of matrices.
TGeoTranslation & operator=(const TGeoMatrix &matrix)
Assignment from a general matrix.
TGeoScale()
default constructor
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
void SetRotation(const TGeoMatrix &other)
Copy rotation elements from other rotation matrix.
Double_t Determinant() const
computes determinant of the rotation matrix
Bool_t IsReflection() const
virtual TGeoMatrix * MakeClone() const
Make a clone of this matrix.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
void SetScale(const Double_t *scale)
void SetMatrix(const Double_t *rot)
virtual TGeoMatrix & Inverse() const
Return a temporary inverse of this.
constexpr Double_t RadToDeg()
virtual TGeoMatrix & Inverse() const
Return a temporary inverse of this.
virtual TGeoMatrix & Inverse() const
Return a temporary inverse of this.
void SetRotation(const Double_t *matrix)
Bool_t IsCleaning() const
virtual ~TGeoMatrix()
Destructor.
virtual TGeoMatrix * MakeClone() const
Make a clone of this matrix.
Bool_t IsTranslation() const
virtual void ReflectX(Bool_t leftside, Bool_t rotonly=kFALSE)
Multiply by a reflection respect to YZ.
void SetScale(Double_t sx, Double_t sy, Double_t sz)
scale setter
virtual void MasterToLocalBomb(const Double_t *master, Double_t *local) const
convert a point by multiplying its column vector (x, y, z, 1) to matrix
virtual void RotateX(Double_t angle)
Rotate about X axis of the master frame with angle expressed in degrees.
virtual void RotateY(Double_t angle)
Rotate about Y axis of the master frame with angle expressed in degrees.
void SetAngles(Double_t phi, Double_t theta, Double_t psi)
Set matrix elements according to Euler angles.
virtual void LocalToMasterBomb(const Double_t *local, Double_t *master) const
convert a point by multiplying its column vector (x, y, z, 1) to matrix inverse
Double_t Sqrt(Double_t x)
void UnbombTranslation(const Double_t *tr, Double_t *bombtr)
Get the new 'unbombed' translation vector according current exploded view mode.
virtual void MasterToLocalVect(const Double_t *master, Double_t *local) const
convert a vector from MARS to local
virtual void RotateZ(Double_t angle)
Rotate about Z axis with angle expressed in degrees.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
virtual const Double_t * GetTranslation() const =0
Bool_t IsRotAboutZ() const
Returns true if no rotation or the rotation is about Z axis.
virtual const Double_t * GetScale() const =0
void SetTranslation(Double_t dx, Double_t dy, Double_t dz)
Set translation components.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
virtual const char * GetTitle() const
Returns title of object.
virtual void LocalToMasterBomb(const Double_t *local, Double_t *master) const
convert a point by multiplying its column vector (x, y, z, 1) to matrix inverse
void SetScale(Double_t sx, Double_t sy, Double_t sz)
set the scale
virtual TGeoMatrix & Inverse() const
Return a temporary inverse of this.
const char * Data() const