12 #ifndef ROOT_TGeoMatrix
13 #define ROOT_TGeoMatrix
67 #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40600
68 #pragma GCC diagnostic push
69 #pragma GCC diagnostic ignored "-Weffc++"
72 #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40600
73 #pragma GCC diagnostic pop
void SetShared(Bool_t flag=kTRUE)
void Subtract(const TGeoTranslation *other)
Subtracting a translation from this one.
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 const Double_t * GetScale() const
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]
virtual TGeoMatrix * MakeClone() const
TGeoMatrix & operator=(const TGeoMatrix &matrix)
Assignment operator.
virtual void SetDy(Double_t dy)
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
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 LocalToMasterVect(const Double_t *local, Double_t *master) const
convert a vector to MARS
virtual const Double_t * GetRotationMatrix() const
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 SetDy(Double_t dy)
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 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 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.
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 SetTranslation(const Double_t *vect)
virtual void SetDx(Double_t dx)
virtual void SetDz(Double_t)
virtual Double_t * GetTranslation()
virtual void RotateZ(Double_t)
void Multiply(const TGeoMatrix *right)
multiply to the right with an other transformation if right is identity matrix, just return ...
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 SetDx(Double_t)
virtual void SetDx(Double_t dx)
virtual void SetDz(Double_t dz)
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]
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 const Double_t * GetRotationMatrix() 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 const Double_t * GetScale() const
virtual void RotateY(Double_t angle)
Rotate about Y axis with angle expressed in degrees.
TGeoRotation & operator=(const TGeoRotation &other)
virtual void RotateX(Double_t angle)
Rotate about X axis with angle expressed in degrees.
TGeoHMatrix & operator*=(const TGeoMatrix &matrix)
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 const Double_t * GetScale() const
virtual ~TGeoHMatrix()
destructor
virtual TGeoMatrix * MakeClone() const =0
#define ClassDef(name, id)
Double_t Determinant() const
computes determinant of the rotation matrix
virtual const Double_t * GetRotationMatrix() const
virtual const Double_t * GetTranslation() const
virtual void RotateY(Double_t)
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 MasterToLocalVect(const Double_t *master, Double_t *local) const
convert a point by multiplying its column vector (x, y, z, 1) to 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 void ReflectZ(Bool_t leftside, Bool_t rotonly=kFALSE)
Multiply by a reflection respect to XY.
virtual void SetDz(Double_t dz)
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
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 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 const Double_t * GetRotationMatrix() 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
void CopyFrom(const TGeoMatrix *other)
Fast copy method.
Bool_t IsTranslation() const
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.
virtual Double_t * GetScale()
virtual void SetDx(Double_t dx)
Bool_t IsValid() const
Perform orthogonality test for rotation.
virtual void ReflectY(Bool_t, Bool_t)
Multiply by a reflection respect to ZX.
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
virtual TGeoMatrix * MakeClone() const
Make a clone of this 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.
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 Double_t * GetRotationMatrix()
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 const Double_t * GetScale() 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
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.
TGeoTranslation & operator=(const TGeoTranslation &other)
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.
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 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.
virtual void RotateZ(Double_t angle)
Rotate about Z axis of the master frame with angle expressed in degrees.
virtual void SetDy(Double_t dy)
Double_t fRotationMatrix[3 *3]
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
TGeoMatrix & operator*(const TGeoMatrix &right) const
Multiplication.
void SetScale(Double_t *scale)
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.
virtual const Double_t * GetScale() const
virtual TGeoMatrix & Inverse() const =0
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.
virtual const Double_t * GetTranslation() const
Bool_t IsRegistered() const
TGeoTranslation & operator=(const TGeoMatrix &matrix)
Assignment from a general matrix.
virtual const Double_t * GetScale() const
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 ReflectZ(Bool_t, Bool_t)
Multiply by a reflection respect to XY.
virtual TGeoMatrix * MakeClone() const
Make a clone of this matrix.
void SetRotation(const TGeoMatrix &other)
Copy rotation elements from other rotation matrix.
virtual void ReflectX(Bool_t, Bool_t)
Multiply by a reflection respect to YZ.
TGeoCombiTrans & operator=(const TGeoCombiTrans &other)
virtual void RotateX(Double_t)
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
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
void SetScale(const Double_t *scale)
void SetMatrix(const Double_t *rot)
TGeoHMatrix & operator=(const TGeoHMatrix &other)
virtual void SavePrimitive(std::ostream &, Option_t *="")
Save a primitive as a C++ statement(s) on output stream "out".
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
R__EXTERN TGeoIdentity * gGeoIdentity
virtual void SetDy(Double_t)
virtual const Double_t * GetTranslation() const
void SetRotation(const Double_t *matrix)
virtual ~TGeoMatrix()
Destructor.
virtual const Double_t * GetTranslation() const
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 MasterToLocalVect(const Double_t *master, Double_t *local) const
convert a point by multiplying its column vector (x, y, z, 1) to matrix
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.
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 const Double_t * GetTranslation() const
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 void SetDz(Double_t dz)
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 ~TGeoTranslation()
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