12#ifndef ROOT_TGeoMatrix
13#define ROOT_TGeoMatrix
417 memcpy(master, local, 3 *
sizeof(
Double_t));
421 memcpy(master, local, 3 *
sizeof(
Double_t));
430 memcpy(local, master, 3 *
sizeof(
Double_t));
434 memcpy(local, master, 3 *
sizeof(
Double_t));
#define ClassDefOverride(name, id)
Option_t Option_t TPoint TPoint angle
const Double_t kUnitScale[3]
const Double_t kIdentityMatrix[3 *3]
R__EXTERN TGeoIdentity * gGeoIdentity
const Double_t kNullVector[3]
Class describing rotation + translation.
void Multiply(const TGeoMatrix *right)
multiply to the right with an other transformation if right is identity matrix, just return
TGeoCombiTrans & operator*=(const TGeoMatrix &other)
Composition.
void ReflectX(Bool_t leftside, Bool_t rotonly=kFALSE) override
Multiply by a reflection respect to YZ.
Bool_t operator==(const TGeoMatrix &other) const
Is-equal operator.
TGeoCombiTrans()
dummy ctor
void SetDz(Double_t dz) override
void RegisterYourself() override
Register the matrix in the current manager, which will become the owner.
const Double_t * GetTranslation() const override
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
TGeoMatrix * MakeClone() const override
Make a clone of this matrix.
TGeoHMatrix Inverse() const override
Return a temporary inverse of this.
void RotateY(Double_t angle) override
Rotate about Y axis with angle expressed in degrees.
void SetDy(Double_t dy) override
void SetDx(Double_t dx) override
void RotateX(Double_t angle) override
Rotate about X axis with angle expressed in degrees.
TGeoRotation * GetRotation() const
void SetTranslation(const TGeoTranslation &tr)
copy the translation component
void SetRotation(const TGeoRotation &other)
Copy the rotation from another one.
TGeoCombiTrans(const TGeoCombiTrans &other)
void Clear(Option_t *option="") override
Reset translation/rotation to identity.
TGeoCombiTrans & operator=(const TGeoCombiTrans &other)
void ReflectY(Bool_t leftside, Bool_t rotonly=kFALSE) override
Multiply by a reflection respect to ZX.
~TGeoCombiTrans() override
destructor
TGeoCombiTrans operator*(const TGeoMatrix &other) const
void RotateZ(Double_t angle) override
Rotate about Z axis with angle expressed in degrees.
const Double_t * GetRotationMatrix() const override
get the rotation array
const Double_t * GetScale() const override
void ReflectZ(Bool_t leftside, Bool_t rotonly=kFALSE) override
Multiply by a reflection respect to XY.
Most general transformation, holding a translation, a rotation and a scale.
const Double_t * GetScale() const override
void Clear(Option_t *option="") override
clear the fields of this transformation
~TGeoGenTrans() override
destructor
TGeoMatrix * MakeClone() const override
Make a clone of this matrix.
Bool_t Normalize()
A scale transformation should be normalized by sx*sy*sz factor.
void SetScale(Double_t sx, Double_t sy, Double_t sz)
set the scale
TGeoHMatrix Inverse() const override
Return a temporary inverse of this.
void SetScale(Double_t *scale)
Matrix class used for computing global transformations Should NOT be used for node definition.
TGeoHMatrix & operator*=(const TGeoMatrix &other)
Composition.
virtual Double_t * GetRotationMatrix()
void RotateX(Double_t angle) override
Rotate about X axis with angle expressed in degrees.
const Double_t * GetScale() const override
void SetRotation(const Double_t *matrix)
const Double_t * GetRotationMatrix() const override
TGeoHMatrix(const TGeoHMatrix &other)
void SetScale(const Double_t *scale)
void MultiplyLeft(const TGeoMatrix *left)
multiply to the left with an other transformation if right is identity matrix, just return
Double_t Determinant() const
computes determinant of the rotation matrix
TGeoMatrix * MakeClone() const override
Make a clone of this matrix.
TGeoHMatrix Inverse() const override
Return a temporary inverse of this.
void RotateZ(Double_t angle) override
Rotate about Z axis with angle expressed in degrees.
void SetDz(Double_t dz) override
void ReflectX(Bool_t leftside, Bool_t rotonly=kFALSE) override
Multiply by a reflection respect to YZ.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
void CopyFrom(const TGeoMatrix *other)
Fast copy method.
void ReflectY(Bool_t leftside, Bool_t rotonly=kFALSE) override
Multiply by a reflection respect to ZX.
void FastRotZ(const Double_t *sincos)
Perform a rotation about Z having the sine/cosine of the rotation angle.
Bool_t operator==(const TGeoMatrix &other) const
Is-equal operator.
void SetDy(Double_t dy) override
void MultiplyLeft(const TGeoMatrix &left)
Double_t fRotationMatrix[9]
~TGeoHMatrix() override
destructor
void RotateY(Double_t angle) override
Rotate about Y axis with angle expressed in degrees.
void Clear(Option_t *option="") override
clear the data for this matrix
const Double_t * GetTranslation() const override
TGeoHMatrix & operator=(const TGeoHMatrix &other)
void Multiply(const TGeoMatrix *right)
multiply to the right with an other transformation if right is identity matrix, just return
void SetDx(Double_t dx) override
virtual Double_t * GetTranslation()
void ReflectZ(Bool_t leftside, Bool_t rotonly=kFALSE) override
Multiply by a reflection respect to XY.
TGeoHMatrix operator*(const TGeoMatrix &other) const
virtual Double_t * GetScale()
void Multiply(const TGeoMatrix &right)
void SetTranslation(const Double_t *vect)
An identity transformation.
const Double_t * GetTranslation() const override
TGeoHMatrix Inverse() const override
Return a temporary inverse of this.
void MasterToLocalVect(const Double_t *master, Double_t *local) const override
convert a point by multiplying its column vector (x, y, z, 1) to matrix
void MasterToLocal(const Double_t *master, Double_t *local) const override
convert a point by multiplying its column vector (x, y, z, 1) to matrix
void LocalToMaster(const Double_t *local, Double_t *master) const override
convert a point by multiplying its column vector (x, y, z, 1) to matrix inverse
void LocalToMasterVect(const Double_t *local, Double_t *master) const override
convert a vector by multiplying its column vector (x, y, z, 1) to matrix inverse
const Double_t * GetRotationMatrix() const override
void SavePrimitive(std::ostream &, Option_t *="") override
Save a primitive as a C++ statement(s) on output stream "out".
void LocalToMasterBomb(const Double_t *local, Double_t *master) const override
convert a point by multiplying its column vector (x, y, z, 1) to matrix inverse
TGeoMatrix * MakeClone() const override
const Double_t * GetScale() const override
void MasterToLocalBomb(const Double_t *master, Double_t *local) const override
convert a point by multiplying its column vector (x, y, z, 1) to matrix
Geometrical transformation package.
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 SetDefaultName()
If no name was supplied in the ctor, the type of transformation is checked.
void Print(Option_t *option="") const override
print the matrix in 4x4 format
virtual void RotateZ(Double_t)
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 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 ReflectZ(Bool_t leftside, Bool_t rotonly=kFALSE)
Multiply by a reflection respect to XY.
virtual const Double_t * GetTranslation() const =0
virtual void SetDz(Double_t)
Bool_t IsTranslation() const
virtual void SetDy(Double_t)
Bool_t IsReflection() const
Bool_t IsRotation() 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 RegisterYourself()
Register the matrix in the current manager, which will become the owner.
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 void RotateY(Double_t)
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
Bool_t IsRotAboutZ() const
Returns true if no rotation or the rotation is about Z axis.
virtual void RotateX(Double_t)
void GetHomogenousMatrix(Double_t *hmat) const
The homogenous matrix associated with the transformation is used for piling up's and visualization.
TGeoMatrix()
dummy constructor
virtual TGeoMatrix * MakeClone() const =0
virtual const Double_t * GetScale() const =0
static void Normalize(Double_t *vect)
Normalize a vector.
Bool_t IsIdentity() const
const char * GetPointerName() const
Provide a pointer name containing uid.
void SetShared(Bool_t flag=kTRUE)
virtual void SetDx(Double_t)
Bool_t IsRegistered() const
virtual const Double_t * GetRotationMatrix() const =0
virtual Int_t GetByteCount() const
Get total size in bytes of this.
virtual TGeoHMatrix Inverse() const =0
~TGeoMatrix() override
Destructor.
virtual void ReflectY(Bool_t leftside, Bool_t rotonly=kFALSE)
Multiply by a reflection respect to ZX.
virtual void ReflectX(Bool_t leftside, Bool_t rotonly=kFALSE)
Multiply by a reflection respect to YZ.
Class describing rotations.
void LocalToMasterBomb(const Double_t *local, Double_t *master) const override
convert a point by multiplying its column vector (x, y, z, 1) to matrix inverse
void RotateX(Double_t angle) override
Rotate about X axis of the master frame with angle expressed in degrees.
const Double_t * GetScale() const override
void ReflectZ(Bool_t leftside, Bool_t rotonly=kFALSE) override
Multiply by a reflection respect to XY.
TGeoRotation()
Default constructor.
void MasterToLocalVect(const Double_t *master, Double_t *local) const override
convert a point by multiplying its column vector (x, y, z, 1) to matrix
void Clear(Option_t *option="") override
reset data members
const Double_t * GetRotationMatrix() const override
void SetAngles(Double_t phi, Double_t theta, Double_t psi)
Set matrix elements according to Euler angles.
void MasterToLocalBomb(const Double_t *master, Double_t *local) const override
convert a point by multiplying its column vector (x, y, z, 1) to matrix
void MultiplyBy(const TGeoRotation *rot, Bool_t after=kTRUE)
Multiply this rotation with the one specified by ROT.
void RotateY(Double_t angle) override
Rotate about Y axis of the master frame with angle expressed in degrees.
Bool_t operator==(const TGeoRotation &other) const
Is-equal operator.
void SetMatrix(const Double_t *rot)
void RotateZ(Double_t angle) override
Rotate about Z axis of the master frame with angle expressed in degrees.
void LocalToMaster(const Double_t *local, Double_t *master) const override
convert a point by multiplying its column vector (x, y, z, 1) to matrix inverse
TGeoRotation & operator*=(const TGeoRotation &other)
Composition.
void CheckMatrix()
performes an orthogonality check and finds if the matrix is a reflection Warning("CheckMatrix",...
void ReflectY(Bool_t leftside, Bool_t rotonly=kFALSE) override
Multiply by a reflection respect to ZX.
Double_t GetPhiRotation(Bool_t fixX=kFALSE) const
Returns rotation angle about Z axis in degrees.
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)
Double_t Determinant() const
computes determinant of the rotation matrix
void GetAngles(Double_t &theta1, Double_t &phi1, Double_t &theta2, Double_t &phi2, Double_t &theta3, Double_t &phi3) const
Retrieve rotation angles.
Bool_t IsValid() const
Perform orthogonality test for rotation.
void MasterToLocal(const Double_t *master, Double_t *local) const override
convert a point by multiplying its column vector (x, y, z, 1) to matrix
TGeoMatrix * MakeClone() const override
Make a clone of this matrix.
TGeoRotation operator*(const TGeoRotation &other) const
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
const Double_t * GetTranslation() const override
void ReflectX(Bool_t leftside, Bool_t rotonly=kFALSE) override
Multiply by a reflection respect to YZ.
Double_t fRotationMatrix[3 *3]
void SetRotation(const TGeoMatrix &other)
Copy rotation elements from other rotation matrix.
void LocalToMasterVect(const Double_t *local, Double_t *master) const override
convert a vector by multiplying its column vector (x, y, z, 1) to matrix inverse
TGeoRotation & operator=(const TGeoRotation &other)
TGeoHMatrix Inverse() const override
Return a temporary inverse of this.
Class describing scale transformations.
TGeoScale()
default constructor
const Double_t * GetScale() const override
void LocalToMasterVect(const Double_t *local, Double_t *master) const override
convert a vector by multiplying its column vector (x, y, z, 1) to matrix inverse
TGeoScale & operator=(const TGeoScale &other)
TGeoMatrix * MakeClone() const override
Make a clone of this matrix.
Bool_t operator==(const TGeoScale &other) const
Is-equal operator.
~TGeoScale() override
destructor
void SetScale(Double_t sx, Double_t sy, Double_t sz)
scale setter
void ReflectY(Bool_t, Bool_t) override
Multiply by a reflection respect to ZX.
void MasterToLocalVect(const Double_t *master, Double_t *local) const override
convert a point by multiplying its column vector (x, y, z, 1) to matrix
void ReflectZ(Bool_t, Bool_t) override
Multiply by a reflection respect to XY.
void LocalToMaster(const Double_t *local, Double_t *master) const override
Convert a local point to the master frame.
const Double_t * GetRotationMatrix() const override
TGeoHMatrix Inverse() const override
Return a temporary inverse of this.
TGeoScale operator*(const TGeoScale &other) const
void ReflectX(Bool_t, Bool_t) override
Multiply by a reflection respect to YZ.
TGeoScale & operator*=(const TGeoScale &other)
Scale composition.
const Double_t * GetTranslation() const override
void MasterToLocal(const Double_t *master, Double_t *local) const override
Convert a global point to local frame.
Class describing translations.
void RotateX(Double_t angle) override
Rotate about X axis of the master frame with angle expressed in degrees.
void RotateY(Double_t angle) override
Rotate about Y axis of the master frame with angle expressed in degrees.
Bool_t operator==(const TGeoTranslation &other) const
Is-equal operator.
TGeoTranslation & operator*=(const TGeoTranslation &other)
Translation composition.
const Double_t * GetScale() const override
TGeoTranslation operator*(const TGeoTranslation &right) const
void Add(const TGeoTranslation *other)
Adding a translation to this one.
void RotateZ(Double_t angle) override
Rotate about Z axis of the master frame with angle expressed in degrees.
~TGeoTranslation() override
void LocalToMasterVect(const Double_t *local, Double_t *master) const override
convert a vector to MARS
void LocalToMaster(const Double_t *local, Double_t *master) const override
convert a point by multiplying its column vector (x, y, z, 1) to matrix inverse
void MasterToLocalBomb(const Double_t *master, Double_t *local) const override
convert a point by multiplying its column vector (x, y, z, 1) to matrix
void SetTranslation(Double_t dx, Double_t dy, Double_t dz)
Set translation components.
TGeoTranslation & operator=(const TGeoTranslation &other)
void SetDy(Double_t dy) override
const Double_t * GetRotationMatrix() const override
const Double_t * GetTranslation() const override
void MasterToLocal(const Double_t *master, Double_t *local) const override
convert a point by multiplying its column vector (x, y, z, 1) to matrix
void LocalToMasterBomb(const Double_t *local, Double_t *master) const override
convert a point by multiplying its column vector (x, y, z, 1) to matrix inverse
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
TGeoTranslation()
Default constructor.
void Subtract(const TGeoTranslation *other)
Subtracting a translation from this one.
TGeoMatrix * MakeClone() const override
Make a clone of this matrix.
void MasterToLocalVect(const Double_t *master, Double_t *local) const override
convert a vector from MARS to local
void SetDz(Double_t dz) override
TGeoHMatrix Inverse() const override
Return a temporary inverse of this.
void SetDx(Double_t dx) override
The TNamed class is the base class for all named ROOT classes.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.