DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Enumerations | Functions
dd4hep::detail::matrix Namespace Reference

Namespace for the AIDA detector description matrix helpers. More...

Enumerations

enum  MatrixEqualityCode { MATRICES_EQUAL = 1, MATRICES_DIFFER_TRANSLATION = 2, MATRICES_DIFFER_ROTATION = 4 }
 

Functions

TGeoIdentity * _identity ()
 Access the TGeo identity transformation. More...
 
ROOT::Math::XYZVector _scale (const TGeoMatrix *matrix)
 Extract the scale part of a TGeoMatrix. More...
 
ROOT::Math::XYZVector _scale (const TGeoMatrix &matrix)
 Extract the scale part of a TGeoMatrix. More...
 
TGeoTranslation * _translation (const Position &pos)
 Convert a Position object to a TGeoTranslation. More...
 
Position _translation (const TGeoMatrix *matrix)
 Extract the translational component of a TGeoMatrix as a Position. More...
 
Position _translation (const TGeoMatrix &matrix)
 Extract the translational component of a TGeoMatrix as a Position. More...
 
TGeoRotation * _rotationZYX (const RotationZYX &rot)
 Convert a RotationZYX object to a newly created TGeoRotation. More...
 
TGeoRotation * _rotation3D (const Rotation3D &rot)
 Convert a Rotation3D object to a newly createdTGeoRotation. More...
 
Rotation3D _rotation3D (const TGeoMatrix *matrix)
 Extract the rotational part of a TGeoMatrix as a Rotation3D. More...
 
Rotation3D _rotation3D (const TGeoMatrix &matrix)
 Extract the rotational part of a TGeoMatrix as a Rotation3D. More...
 
TGeoHMatrix * _transform (const Transform3D &trans)
 Convert a Transform3D object to a newly created TGeoHMatrix. More...
 
TGeoHMatrix * _transform (const Position &pos)
 Convert a Position object to a newly created TGeoHMatrix. More...
 
TGeoHMatrix * _transform (const RotationZYX &rot)
 Convert a RotationZYX object to a newly created TGeoHMatrix. More...
 
TGeoHMatrix * _transform (const Rotation3D &rot3D)
 Convert a Rotation3D object to a newly created TGeoHMatrix. More...
 
TGeoHMatrix * _transform (const Position &pos, const RotationZYX &rot)
 Convert a Position followed by a RotationZYX to a newly created TGeoHMatrix. More...
 
TGeoHMatrix & _transform (TGeoHMatrix &mat, const Transform3D &trans)
 Set a Transform3D object to a TGeoHMatrix. More...
 
TGeoHMatrix & _transform (TGeoHMatrix &mat, const Position &pos)
 Set a Position object (translation) to a TGeoHMatrix. More...
 
TGeoHMatrix & _transform (TGeoHMatrix &mat, const RotationZYX &rot)
 Set a RotationZYX object to a TGeoHMatrix. More...
 
TGeoHMatrix & _transform (TGeoHMatrix &mat, const Rotation3D &rot3D)
 Set a Rotation3D object to a TGeoHMatrix. More...
 
TGeoHMatrix & _transform (TGeoHMatrix &mat, const Position &pos, const RotationZYX &rot)
 Set a Position followed by a RotationZYX to a TGeoHMatrix. More...
 
Transform3D _transform (const TGeoMatrix *matrix)
 Convert a TGeoMatrix object to a generic Transform3D. More...
 
Transform3D _transform (const TGeoMatrix &matrix)
 
void _transform (const TGeoMatrix *matrix, Transform3D &trafo)
 Convert a generic ROOT Matrix into a generic transformation Transform3D. More...
 
void _transform (const TGeoMatrix &matrix, Transform3D &trafo)
 Convert a generic ROOT Matrix into a generic transformation Transform3D. More...
 
void _decompose (const TGeoMatrix &matrix, Position &pos, Rotation3D &rot)
 Decompose a generic ROOT Matrix into a translation (Position) and a Rotation3D. More...
 
void _decompose (const TGeoMatrix &matrix, Position &pos, RotationZYX &rot)
 Decompose a generic ROOT Matrix into a translation (Position) and a RotationZYX. More...
 
void _decompose (const TGeoMatrix &matrix, Position &pos, XYZAngles &rot)
 Decompose a generic ROOT Matrix into a translation (Position) and XYZAngles. More...
 
void _decompose (const Transform3D &matrix, Position &pos, Rotation3D &rot)
 Decompose a generic Transform3D into a translation (Position) and a Rotation3D. More...
 
void _decompose (const Transform3D &matrix, Position &pos, RotationZYX &rot)
 Decompose a generic Transform3D into a translation (Position) and a RotationZYX. More...
 
void _decompose (const Transform3D &matrix, Position &pos, XYZAngles &rot)
 Decompose a generic Transform3D into a translation (Position) and XYZAngles. More...
 
void _decompose (const Transform3D &matrix, Translation3D &pos, RotationZYX &rot)
 Decompose a generic Transform3D into a translation (Translation3D) and a RotationZYX. More...
 
void _decompose (const Transform3D &matrix, Translation3D &pos, XYZAngles &rot)
 Decompose a generic Transform3D into a translation (Translation3D) and XYZAngles. More...
 
void _decompose (const Rotation3D &rot, Position &x, Position &y, Position &z)
 Decompose a Rotation3D into a 3 orthogonal unit vectors. More...
 
XYZAngles _xyzAngles (const double *matrix)
 Convert a 3x3 rotation matrix to XYZAngles. More...
 
XYZAngles _xyzAngles (const TGeoMatrix *matrix)
 Convert a the rotation part of a TGeoMatrix to XYZAngles. More...
 
double determinant (const TGeoMatrix *matrix)
 Access determinant of rotation component (0 if no rotation present) More...
 
double determinant (const TGeoMatrix &matrix)
 Access determinant of rotation component (0 if no rotation present) More...
 
double determinant (const Transform3D &trafo)
 Access determinant of the rotation component of a Transform3D. More...
 
double determinant (const Rotation3D &rot)
 Access determinant of a Rotation3D. More...
 
int _matrixEqual (const TGeoMatrix &left, const TGeoMatrix &right)
 Check matrices for equality. More...
 

Detailed Description

Namespace for the AIDA detector description matrix helpers.

Enumeration Type Documentation

◆ MatrixEqualityCode

Enumerator
MATRICES_EQUAL 
MATRICES_DIFFER_TRANSLATION 
MATRICES_DIFFER_ROTATION 

Definition at line 120 of file MatrixHelpers.h.

Function Documentation

◆ _decompose()

void dd4hep::detail::matrix::_decompose ( const Rotation3D rot,
Position x,
Position y,
Position z 
)

Decompose a Rotation3D into a 3 orthogonal unit vectors.

Definition at line 219 of file MatrixHelpers.cpp.

◆ _matrixEqual()

int dd4hep::detail::matrix::_matrixEqual ( const TGeoMatrix &  left,
const TGeoMatrix &  right 
)

Check matrices for equality.

Return codes: MATRICES_EQUAL: matrices left and right are equal MATRICES_DIFFER_TRANSLATION: matrices differ in translation MATRICES_DIFFER_ROTATION: matrices differ in rotation or combination: MATRICES_DIFFER_TRANSLATION|MATRICES_DIFFER_ROTATION

Definition at line 277 of file MatrixHelpers.cpp.

◆ _transform()

dd4hep::Transform3D dd4hep::detail::matrix::_transform ( const TGeoMatrix &  matrix)

Definition at line 164 of file MatrixHelpers.cpp.

◆ determinant() [1/4]

double dd4hep::detail::matrix::determinant ( const Rotation3D rot)

Access determinant of a Rotation3D.

Definition at line 269 of file MatrixHelpers.cpp.

◆ determinant() [2/4]

double dd4hep::detail::matrix::determinant ( const TGeoMatrix &  matrix)

Access determinant of rotation component (0 if no rotation present)

Definition at line 249 of file MatrixHelpers.cpp.

◆ determinant() [3/4]

double dd4hep::detail::matrix::determinant ( const TGeoMatrix *  matrix)

Access determinant of rotation component (0 if no rotation present)

Definition at line 244 of file MatrixHelpers.cpp.

◆ determinant() [4/4]

double dd4hep::detail::matrix::determinant ( const Transform3D trafo)

Access determinant of the rotation component of a Transform3D.

Definition at line 261 of file MatrixHelpers.cpp.