227 if (&matrix ==
this)
return *
this;
250 if (&other ==
this)
return kTRUE;
254 if ((tr1 & !tr2) || (tr2 & !tr1))
return kFALSE;
257 if ((rr1 & !rr2) || (rr2 & !rr1))
return kFALSE;
305 return (
char*)name.
Data();
325 for (
Int_t i=0; i<3; i++) {
326 memcpy(hmatrix, mat,
kN3);
335 for (
Int_t i=0; i<3; i++) {
349 memcpy(master, local,
kN3);
355 for (i=0; i<3; i++) master[i] = tr[i] + local[i];
359 for (i=0; i<3; i++) {
362 + local[1]*rot[3*i+1]
363 + local[2]*rot[3*i+2];
373 memcpy(master, local,
kN3);
377 for (
Int_t i=0; i<3; i++) {
378 master[i] = local[0]*rot[3*i]
379 + local[1]*rot[3*i+1]
380 + local[2]*rot[3*i+2];
390 memcpy(master, local,
kN3);
398 for (i=0; i<3; i++) master[i] = bombtr[i] + local[i];
402 for (i=0; i<3; i++) {
403 master[i] = bombtr[i]
405 + local[1]*rot[3*i+1]
406 + local[2]*rot[3*i+2];
416 memcpy(local, master,
kN3);
430 local[0] = mt0*rot[0] + mt1*rot[3] + mt2*rot[6];
431 local[1] = mt0*rot[1] + mt1*rot[4] + mt2*rot[7];
432 local[2] = mt0*rot[2] + mt1*rot[5] + mt2*rot[8];
441 memcpy(local, master,
kN3);
445 for (
Int_t i=0; i<3; i++) {
446 local[i] = master[0]*rot[i]
448 + master[2]*rot[i+6];
458 memcpy(local, master,
kN3);
466 for (i=0; i<3; i++) local[i] = master[i]-bombtr[i];
470 for (i=0; i<3; i++) {
471 local[i] = (master[0]-bombtr[0])*rot[i]
472 + (master[1]-bombtr[1])*rot[i+3]
473 + (master[2]-bombtr[2])*rot[i+6];
482 Double_t normfactor = vect[0]*vect[0] + vect[1]*vect[1] + vect[2]*vect[2];
483 if (normfactor <= 1
E-10)
return;
485 vect[0] *= normfactor;
486 vect[1] *= normfactor;
487 vect[2] *= normfactor;
499 printf(
"%10.6f%12.6f%12.6f Tx = %10.6f\n", rot[0], rot[1], rot[2], tr[0]);
500 printf(
"%10.6f%12.6f%12.6f Ty = %10.6f\n", rot[3], rot[4], rot[5], tr[1]);
501 printf(
"%10.6f%12.6f%12.6f Tz = %10.6f\n", rot[6], rot[7], rot[8], tr[2]);
504 printf(
"Sx=%10.6fSy=%12.6fSz=%12.6f\n", scl[0], scl[1], scl[2]);
535 Warning(
"RegisterYourself",
"cannot register without geometry");
580 for (
Int_t i=0; i<3; i++) fTranslation[i] = 0;
626 if (&matrix ==
this)
return *
this;
653 for (
Int_t i=0; i<3; i++)
671 Warning(
"RotateX",
"Not implemented. Use TGeoCombiTrans instead");
679 Warning(
"RotateY",
"Not implemented. Use TGeoCombiTrans instead");
687 Warning(
"RotateZ",
"Not implemented. Use TGeoCombiTrans instead");
696 for (
Int_t i=0; i<3; i++)
728 for (
Int_t i=0; i<3; i++)
729 master[i] = tr[i] + local[i];
737 memcpy(master, local,
kN3);
748 for (
Int_t i=0; i<3; i++)
749 master[i] = bombtr[i] + local[i];
758 for (
Int_t i=0; i<3; i++)
759 local[i] = master[i]-tr[i];
767 memcpy(local, master,
kN3);
778 for (
Int_t i=0; i<3; i++)
779 local[i] = master[i]-bombtr[i];
788 out <<
" // Translation: " <<
GetName() << std::endl;
792 out <<
" TGeoTranslation *" <<
GetPointerName() <<
" = new TGeoTranslation(\"" <<
GetName() <<
"\",dx,dy,dz);" << std::endl;
805 for (
Int_t i=0; i<9; i++) {
806 if (i%4) fRotationMatrix[i] = 0;
807 else fRotationMatrix[i] = 1.0;
835 for (
Int_t i=0; i<9; i++) {
865 SetAngles(theta1, phi1, theta2, phi2, theta3, phi3);
873 if (&other ==
this)
return *
this;
907 for (
Int_t i=0; i<2; i++) {
908 for (
Int_t j=i+1; j<3; j++) {
910 cij =
TMath::Abs(r[i]*r[j]+r[i+3]*r[j+3]+r[i+6]*r[j+6]);
913 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]);
961 for (
Int_t i=0; i<3; i++) {
962 master[i] = local[0]*rot[3*i]
963 + local[1]*rot[3*i+1]
964 + local[2]*rot[3*i+2];
974 for (
Int_t i=0; i<3; i++) {
975 local[i] = master[0]*rot[i]
977 + master[2]*rot[i+6];
1004 v[4] = c*fRotationMatrix[4]-s*fRotationMatrix[7];
1005 v[5] = c*fRotationMatrix[5]-s*fRotationMatrix[8];
1006 v[6] = s*fRotationMatrix[3]+c*fRotationMatrix[6];
1007 v[7] = s*fRotationMatrix[4]+c*fRotationMatrix[7];
1008 v[8] = s*fRotationMatrix[5]+c*fRotationMatrix[8];
1010 memcpy(fRotationMatrix, v,
kN9);
1024 v[1] = c*fRotationMatrix[1]+s*fRotationMatrix[7];
1025 v[2] = c*fRotationMatrix[2]+s*fRotationMatrix[8];
1026 v[3] = fRotationMatrix[3];
1027 v[4] = fRotationMatrix[4];
1028 v[5] = fRotationMatrix[5];
1029 v[6] = -s*fRotationMatrix[0]+c*fRotationMatrix[6];
1030 v[7] = -s*fRotationMatrix[1]+c*fRotationMatrix[7];
1031 v[8] = -s*fRotationMatrix[2]+c*fRotationMatrix[8];
1033 memcpy(fRotationMatrix, v,
kN9);
1047 v[1] = c*fRotationMatrix[1]-s*fRotationMatrix[4];
1048 v[2] = c*fRotationMatrix[2]-s*fRotationMatrix[5];
1049 v[3] = s*fRotationMatrix[0]+c*fRotationMatrix[3];
1050 v[4] = s*fRotationMatrix[1]+c*fRotationMatrix[4];
1051 v[5] = s*fRotationMatrix[2]+c*fRotationMatrix[5];
1052 v[6] = fRotationMatrix[6];
1053 v[7] = fRotationMatrix[7];
1054 v[8] = fRotationMatrix[8];
1056 memcpy(&fRotationMatrix[0],v,
kN9);
1119 out <<
" // Rotation: " <<
GetName() << std::endl;
1122 out <<
" thx = " << th1 <<
"; phx = " << ph1 <<
";" << std::endl;
1123 out <<
" thy = " << th2 <<
"; phy = " << ph2 <<
";" << std::endl;
1124 out <<
" thz = " << th3 <<
"; phz = " << ph3 <<
";" << std::endl;
1125 out <<
" TGeoRotation *" <<
GetPointerName() <<
" = new TGeoRotation(\"" <<
GetName() <<
"\",thx,phx,thy,phy,thz,phz);" << std::endl;
1162 if (!
IsValid())
Error(
"SetAngles",
"invalid rotation (Euler angles : phi=%f theta=%f psi=%f)",phi,theta,psi);
1183 for (
Int_t i=0; i<9; i++) {
1188 if (!
IsValid())
Error(
"SetAngles",
"invalid rotation (G3 angles, th1=%f phi1=%f, th2=%f ph2=%f, th3=%f phi3=%f)",
1189 theta1,phi1,theta2,phi2,theta3,phi3);
1205 if (phi1<0) phi1+=360.;
1208 if (phi2<0) phi2+=360.;
1211 if (phi3<0) phi3+=360.;
1269 Error(
"GetInverse",
"no place to store the inverse matrix");
1272 for (
Int_t i=0; i<3; i++) {
1273 for (
Int_t j=0; j<3; j++) {
1286 const Double_t *matleft, *matright;
1296 for (
Int_t i=0; i<3; i++) {
1297 for (
Int_t j=0; j<3; j++) {
1298 for (
Int_t k=0; k<3; k++) {
1299 newmat[3*i+j] += matleft[3*i+k] * matright[3*k+j];
1315 for (
Int_t i=0; i<3; i++) fScale[i] = 1.;
1363 if (&other ==
this)
return *
this;
1393 Error(
"SetScale",
"Invalid scale %f, %f, %f for transformation %s",sx,sy,sx,
GetName());
1408 master[0] = local[0]*
fScale[0];
1409 master[1] = local[1]*fScale[1];
1410 master[2] = local[2]*fScale[2];
1448 local[0] = master[0]/
fScale[0];
1449 local[1] = master[1]/
fScale[1];
1450 local[2] = master[2]/
fScale[2];
1468 (dir[1]*dir[1])/(fScale[1]*fScale[1]) +
1469 (dir[2]*dir[2])/(fScale[2]*fScale[2]);
1484 for (
Int_t i=0; i<3; i++) fTranslation[i] = 0.0;
1588 if (&matrix ==
this)
return *
this;
1714 v[3] = c*rot[3]-s*rot[6];
1715 v[4] = c*rot[4]-s*rot[7];
1716 v[5] = c*rot[5]-s*rot[8];
1717 v[6] = s*rot[3]+c*rot[6];
1718 v[7] = s*rot[4]+c*rot[7];
1719 v[8] = s*rot[5]+c*rot[8];
1725 v[2] = s*fTranslation[1]+c*fTranslation[2];
1726 memcpy(fTranslation,v,
kN3);
1745 v[0] = c*rot[0]+s*rot[6];
1746 v[1] = c*rot[1]+s*rot[7];
1747 v[2] = c*rot[2]+s*rot[8];
1751 v[6] = -s*rot[0]+c*rot[6];
1752 v[7] = -s*rot[1]+c*rot[7];
1753 v[8] = -s*rot[2]+c*rot[8];
1758 v[1] = fTranslation[1];
1759 v[2] = -s*fTranslation[0]+c*fTranslation[2];
1760 memcpy(fTranslation,v,
kN3);
1779 v[0] = c*rot[0]-s*rot[3];
1780 v[1] = c*rot[1]-s*rot[4];
1781 v[2] = c*rot[2]-s*rot[5];
1782 v[3] = s*rot[0]+c*rot[3];
1783 v[4] = s*rot[1]+c*rot[4];
1784 v[5] = s*rot[2]+c*rot[5];
1792 v[1] = s*fTranslation[0]+c*fTranslation[1];
1793 v[2] = fTranslation[2];
1794 memcpy(fTranslation,v,
kN3);
1851 out <<
" // Combi transformation: " <<
GetName() << std::endl;
1852 out <<
" dx = " <<
fTranslation[0] <<
";" << std::endl;
1853 out <<
" dy = " <<
fTranslation[1] <<
";" << std::endl;
1854 out <<
" dz = " <<
fTranslation[2] <<
";" << std::endl;
1861 out <<
" " <<
GetPointerName() <<
"->SetTranslation(dx,dy,dz);" << std::endl;
1962 SetBit(kGeoGenTrans);
1963 for (
Int_t i=0; i<3; i++) fTranslation[i] = 0.0;
1964 for (
Int_t j=0; j<3; j++) fScale[j] = 1.0;
2028 if (sx<1.
E-5 || sy<1.
E-5 || sz<1.
E-5) {
2029 Error(
"ctor",
"Invalid scale");
2042 Error(
"Inverse",
"not implemented");
2054 if (normfactor <= 1
E-5)
return kFALSE;
2055 for (
Int_t i=0; i<3; i++)
2056 fScale[i] /= normfactor;
2068 if (!gGeoIdentity) gGeoIdentity =
this;
2078 if (!gGeoIdentity) gGeoIdentity =
this;
2106 memset(&fTranslation[0], 0,
kN3);
2160 if (matrix ==
this)
return *
this;
2162 if (matrix == 0)
return *
this;
2185 if (&matrix ==
this)
return *
this;
2354 for (i=0; i<3; i++) {
2362 for (i=0; i<3; i++) {
2363 for (j=0; j<3; j++) {
2373 for (i=0; i<3; i++)
fScale[i] *= r_scl[i];
2383 if (left == gGeoIdentity)
return;
2416 for (i=0; i<3; i++) {
2417 new_tra[i] = l_tra[i]
2426 for (i=0; i<3; i++) {
2427 for (j=0; j<3; j++) {
2437 for (i=0; i<3; i++)
fScale[i] *= l_scl[i];
2455 v[4] = c*fRotationMatrix[4]-s*fRotationMatrix[7];
2456 v[5] = c*fRotationMatrix[5]-s*fRotationMatrix[8];
2457 v[6] = s*fRotationMatrix[3]+c*fRotationMatrix[6];
2458 v[7] = s*fRotationMatrix[4]+c*fRotationMatrix[7];
2459 v[8] = s*fRotationMatrix[5]+c*fRotationMatrix[8];
2460 memcpy(fRotationMatrix, v,
kN9);
2464 v[2] = s*fTranslation[1]+c*fTranslation[2];
2465 memcpy(fTranslation,v,
kN3);
2479 v[1] = c*fRotationMatrix[1]+s*fRotationMatrix[7];
2480 v[2] = c*fRotationMatrix[2]+s*fRotationMatrix[8];
2481 v[3] = fRotationMatrix[3];
2482 v[4] = fRotationMatrix[4];
2483 v[5] = fRotationMatrix[5];
2484 v[6] = -s*fRotationMatrix[0]+c*fRotationMatrix[6];
2485 v[7] = -s*fRotationMatrix[1]+c*fRotationMatrix[7];
2486 v[8] = -s*fRotationMatrix[2]+c*fRotationMatrix[8];
2487 memcpy(fRotationMatrix, v,
kN9);
2490 v[1] = fTranslation[1];
2491 v[2] = -s*fTranslation[0]+c*fTranslation[2];
2492 memcpy(fTranslation,v,
kN3);
2506 v[1] = c*fRotationMatrix[1]-s*fRotationMatrix[4];
2507 v[2] = c*fRotationMatrix[2]-s*fRotationMatrix[5];
2508 v[3] = s*fRotationMatrix[0]+c*fRotationMatrix[3];
2509 v[4] = s*fRotationMatrix[1]+c*fRotationMatrix[4];
2510 v[5] = s*fRotationMatrix[2]+c*fRotationMatrix[5];
2511 v[6] = fRotationMatrix[6];
2512 v[7] = fRotationMatrix[7];
2513 v[8] = fRotationMatrix[8];
2514 memcpy(&fRotationMatrix[0],v,
kN9);
2517 v[1] = s*fTranslation[0]+c*fTranslation[1];
2518 v[2] = fTranslation[2];
2519 memcpy(fTranslation,v,
kN3);
2587 out <<
" // HMatrix: " <<
GetName() << std::endl;
2588 out <<
" tr[0] = " << tr[0] <<
"; " <<
"tr[1] = " << tr[1] <<
"; " <<
"tr[2] = " << tr[2] <<
";" << std::endl;
2589 out <<
" rot[0] =" << rot[0] <<
"; " <<
"rot[1] = " << rot[1] <<
"; " <<
"rot[2] = " << rot[2] <<
";" << std::endl;
2590 out <<
" rot[3] =" << rot[3] <<
"; " <<
"rot[4] = " << rot[4] <<
"; " <<
"rot[5] = " << rot[5] <<
";" << std::endl;
2591 out <<
" rot[6] =" << rot[6] <<
"; " <<
"rot[7] = " << rot[7] <<
"; " <<
"rot[8] = " << rot[8] <<
";" << std::endl;
2593 out <<
" TGeoHMatrix *" << name <<
" = new TGeoHMatrix(\"" <<
GetName() <<
"\");" << std::endl;
2594 out <<
" " << name <<
"->SetTranslation(tr);" << std::endl;
2595 out <<
" " << name <<
"->SetRotation(rot);" << std::endl;
2596 if (
IsTranslation()) out <<
" " << name <<
"->SetBit(TGeoMatrix::kGeoTranslation);" << std::endl;
2597 if (
IsRotation()) out <<
" " << name <<
"->SetBit(TGeoMatrix::kGeoRotation);" << std::endl;
2598 if (
IsReflection()) out <<
" " << name <<
"->SetBit(TGeoMatrix::kGeoReflection);" << std::endl;
void Subtract(const TGeoTranslation *other)
Subtracting a translation from this one.
virtual const char * GetTitle() const
Returns title of object.
virtual void MasterToLocalVect(const Double_t *master, Double_t *local) const
convert a vector from MARS to local
double dist(Rotation3D const &r1, Rotation3D const &r2)
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
const Double_t kIdentityMatrix[3 *3]
void SetRotation(const TGeoRotation &other)
Copy the rotation from another one.
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 Determinant() const
computes determinant of the rotation matrix
Double_t fRotationMatrix[9]
TGeoMatrix & operator=(const TGeoMatrix &matrix)
Assignment operator.
virtual TGeoMatrix & Inverse() const
Return a temporary inverse of this.
virtual TGeoMatrix & Inverse() const
Return a temporary inverse of this.
virtual TGeoMatrix & Inverse() const
Return a temporary inverse of this.
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 GetInverse(Double_t *invmat) const
Get the inverse rotation matrix (which is simply the transpose)
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.
virtual void LocalToMasterVect(const Double_t *local, Double_t *master) const
convert a vector to MARS
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)
Change (i.e.
virtual TGeoMatrix & Inverse() const
Return a temporary inverse of this.
virtual void ReflectZ(Bool_t leftside, Bool_t rotonly=kFALSE)
Multiply by a reflection respect to XY.
virtual void RotateX(Double_t angle)
Rotate about X axis of the master frame with angle expressed in degrees.
void SetTranslation(const Double_t *vect)
virtual TObject * Remove(TObject *obj)
Remove object from array.
void Multiply(const TGeoMatrix *right)
multiply to the right with an other transformation if right is identity matrix, just return ...
virtual void LocalToMaster(const Double_t *local, Double_t *master) const
Convert a local point to the master frame.
void Add(const TGeoTranslation *other)
Adding a translation to this one.
const Double_t kUnitScale[3]
Int_t GetEntriesFast() const
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 with angle expressed in degrees.
void SetTranslation(const TGeoTranslation &tr)
copy the translation component
Bool_t IsReflection() const
virtual ~TGeoCombiTrans()
destructor
void GetHomogenousMatrix(Double_t *hmat) const
The homogenous matrix associated with the transformation is used for piling up's and visualization...
Bool_t IsRotation() const
virtual TGeoMatrix * MakeClone() const
Make a clone of this matrix.
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.
const char * Data() const
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...
Double_t Determinant() const
computes determinant of the rotation matrix
virtual const Double_t * GetTranslation() const
Bool_t Normalize()
A scale transformation should be normalized by sx*sy*sz factor.
The TNamed class is the base class for all named ROOT classes.
virtual const Double_t * GetScale() const
virtual void ReflectZ(Bool_t leftside, Bool_t rotonly=kFALSE)
Multiply by a reflection respect to XY.
virtual TGeoMatrix & Inverse() const
Return a temporary inverse of this.
virtual ~TGeoGenTrans()
destructor
virtual TGeoMatrix * MakeClone() const
Make a clone of this matrix.
TGeoRotation * GetRotation() const
Bool_t IsIdentity() const
TGeoHMatrix & operator=(const TGeoMatrix *matrix)
assignment
void GetAngles(Double_t &theta1, Double_t &phi1, Double_t &theta2, Double_t &phi2, Double_t &theta3, Double_t &phi3) const
Retreive 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
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 ATan2(Double_t, Double_t)
void CopyFrom(const TGeoMatrix *other)
Fast copy method.
Bool_t IsTranslation() const
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void RotateY(Double_t angle)
Rotate about Y axis of the master frame with angle expressed in degrees.
virtual void ReflectX(Bool_t leftside, Bool_t rotonly=kFALSE)
Multiply by a reflection respect to YZ.
Double_t GetPhiRotation(Bool_t fixX=kFALSE) const
— Returns rotation angle about Z axis in degrees.
TGeoCombiTrans & operator=(const TGeoMatrix &matrix)
Assignment operator.
Bool_t IsValid() const
Perform orthogonality test for rotation.
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
void MultiplyBy(TGeoRotation *rot, Bool_t after=kTRUE)
Multiply this rotation with the one specified by ROT.
char * GetPointerName() const
Provide a pointer name containing uid.
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
void Clear(Option_t *option="")
clear the fields of this transformation
virtual const Double_t * GetRotationMatrix() const
get the rotation array
virtual const Double_t * GetTranslation() const
void Clear(Option_t *option="")
reset data members
virtual void MasterToLocal(const Double_t *master, Double_t *local) const
Convert a global point to local frame.
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");
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
virtual const Double_t * GetRotationMatrix() const
Bool_t TestBit(UInt_t f) const
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.
Bool_t IsCleaning() const
static void Normalize(Double_t *vect)
Normalize a vector.
virtual const char * GetName() const
Returns name of object.
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.
TObjArray * GetListOfMatrices() const
virtual TGeoMatrix * MakeClone() const
Make a clone of this matrix.
virtual void RotateZ(Double_t angle)
Rotate about Z axis of the master frame with angle expressed in degrees.
TGeoIdentity * gGeoIdentity
virtual void RotateZ(Double_t angle)
Rotate about Z axis of the master frame with angle expressed in degrees.
Double_t fRotationMatrix[3 *3]
TGeoMatrix & operator*(const TGeoMatrix &right) const
Multiplication.
virtual void ReflectZ(Bool_t leftside, Bool_t rotonly=kFALSE)
Multiply by a reflection respect to XY.
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
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
Bool_t operator==(const TGeoMatrix &other) const
Is-equal operator.
virtual void ReflectZ(Bool_t leftside, Bool_t rotonly=kFALSE)
Multiply by a reflection respect to XY.
ClassImp(TMCParticle) void TMCParticle printf(": p=(%7.3f,%7.3f,%9.3f) ;", fPx, fPy, fPz)
void RegisterMatrix(const TGeoMatrix *matrix)
Register a matrix to the list of matrices.
Bool_t IsRegistered() const
TGeoTranslation & operator=(const TGeoMatrix &matrix)
Assignment from a general matrix.
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 TGeoMatrix * MakeClone() const
Make a clone of this matrix.
void SetRotation(const TGeoMatrix &other)
Copy rotation elements from other rotation matrix.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
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
void Print(Option_t *option="") const
print the matrix in 4x4 format
virtual UInt_t GetUniqueID() const
Return the unique object id.
void SetScale(const Double_t *scale)
void SetMatrix(const Double_t *rot)
virtual TGeoMatrix & Inverse() const
Return a temporary inverse of this.
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
void SetRotation(const Double_t *matrix)
virtual ~TGeoMatrix()
Destructor.
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
virtual void ReflectX(Bool_t leftside, Bool_t rotonly=kFALSE)
Multiply by a reflection respect to YZ.
virtual TGeoMatrix & Inverse() const
Return a temporary inverse of this.
void SetScale(Double_t sx, Double_t sy, Double_t sz)
scale setter
Bool_t IsRotAboutZ() const
Returns true if no rotation or the rotation is about Z axis.
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.
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 RotateZ(Double_t angle)
Rotate about Z axis with angle expressed in degrees.
virtual Int_t GetByteCount() const
Get total size in bytes of this.
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
virtual const Double_t * GetScale() const =0
virtual TGeoMatrix * MakeClone() const
Make a clone of this matrix.
void SetTranslation(Double_t dx, Double_t dy, Double_t dz)
Set translation components.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
void SetScale(Double_t sx, Double_t sy, Double_t sz)
set the scale
ClassImp(TGeoMatrix) TGeoMatrix
dummy constructor
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.