12 #ifndef ROOT_TGeoMatrix 13 #define ROOT_TGeoMatrix 65 #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40600 66 #pragma GCC diagnostic push 67 #pragma GCC diagnostic ignored "-Weffc++" 70 #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40600 71 #pragma GCC diagnostic pop void SetShared(Bool_t flag=kTRUE)
void Subtract(const TGeoTranslation *other)
Subtracting a translation from this one.
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
virtual void SetDy(Double_t dy)
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.
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 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
Geometrical transformation package.
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
TGeoMatrix & operator*(const TGeoMatrix &right) const
Multiplication.
virtual const Double_t * GetTranslation() const
virtual void SetDy(Double_t dy)
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.
virtual const Double_t * GetRotationMatrix() const =0
const Double_t kNullVector[3]
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)
virtual void SetDx(Double_t dx)
virtual void SetDz(Double_t)
TGeoRotation()
Default constructor.
Class describing translations.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual Double_t * GetTranslation()
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 const Double_t * GetScale() const
virtual void RotateZ(Double_t)
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 ...
virtual void SetDx(Double_t)
virtual void SetDx(Double_t dx)
virtual void SetDz(Double_t dz)
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
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 const Double_t * GetTranslation() 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.
TGeoRotation & operator=(const TGeoRotation &other)
virtual const Double_t * GetScale() const
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 const Double_t * GetTranslation() const
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 ~TGeoHMatrix()
destructor
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 =0
#define ClassDef(name, id)
virtual void RotateY(Double_t)
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.
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
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.
virtual void SetDz(Double_t dz)
virtual ~TGeoGenTrans()
destructor
Bool_t IsIdentity() const
virtual TGeoMatrix & Inverse() const
Return a temporary inverse of this.
TGeoHMatrix & operator=(const TGeoMatrix *matrix)
assignment
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 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 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.
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
TGeoCombiTrans & operator=(const TGeoMatrix &matrix)
Assignment operator.
virtual Double_t * GetScale()
virtual void SetDx(Double_t dx)
virtual const Double_t * GetRotationMatrix() const
virtual void ReflectY(Bool_t, Bool_t)
Multiply by a reflection respect to ZX.
virtual const Double_t * GetRotationMatrix() const
virtual TGeoMatrix * MakeClone() const
Make a clone of this matrix.
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.
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 Double_t * GetRotationMatrix()
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");
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
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
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.
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.
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...
virtual const Double_t * GetRotationMatrix() const
virtual void RotateZ(Double_t angle)
Rotate about Z axis of the master frame with angle expressed in degrees.
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 * GetScale() const
Class describing rotations.
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]
Bool_t IsValid() const
Perform orthogonality test for rotation.
Bool_t IsRotation() const
void SetScale(Double_t *scale)
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.
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 TGeoMatrix & Inverse() const =0
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 ReflectZ(Bool_t leftside, Bool_t rotonly=kFALSE)
Multiply by a reflection respect to XY.
TGeoTranslation & operator=(const TGeoMatrix &matrix)
Assignment from a general matrix.
TGeoScale()
default constructor
virtual void ReflectZ(Bool_t, Bool_t)
Multiply by a reflection respect to XY.
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.
Double_t Determinant() const
computes determinant of the rotation matrix
TGeoCombiTrans & operator=(const TGeoCombiTrans &other)
virtual void RotateX(Double_t)
Bool_t IsReflection() 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 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.
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.
R__EXTERN TGeoIdentity * gGeoIdentity
virtual TGeoMatrix & Inverse() const
Return a temporary inverse of this.
virtual void SetDy(Double_t)
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
void SetRotation(const Double_t *matrix)
virtual ~TGeoMatrix()
Destructor.
virtual TGeoMatrix * MakeClone() const
Make a clone of this matrix.
virtual const Double_t * GetTranslation() const
Bool_t IsTranslation() const
virtual const Double_t * GetRotationMatrix() 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 TGeoMatrix * MakeClone() const
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
virtual const Double_t * GetScale() const
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
virtual void SetDz(Double_t dz)
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 ~TGeoTranslation()
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
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.
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