DD4hep - The AIDA detector description toolkit for high energy physics experiments
DD4hep  Rev:Unversioneddirectory
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MatrixHelpers.h
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation for LCD
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 // Author : M.Frank
11 //
12 //==========================================================================
13 
14 #ifndef DD4HEP_IMP_MATRIXHELPERS_H
15 #define DD4HEP_IMP_MATRIXHELPERS_H
16 
17 // Framework include files
18 #include "DD4hep/Objects.h"
19 
20 // Forward declarations
21 class TGeoTranslation;
22 class TGeoRotation;
23 class TGeoHMatrix;
24 class TGeoMatrix;
25 
27 namespace DD4hep {
29  namespace Geometry {
30 
32 
34  TGeoIdentity* identityTransform();
36  TGeoTranslation* _translation(const Geometry::Position& pos);
38  TGeoRotation* _rotationZYX(const Geometry::RotationZYX& rot);
40  TGeoRotation* _rotation3D(const Geometry::Rotation3D& rot);
42  TGeoHMatrix* _transform(const Geometry::Transform3D& trans);
44  TGeoHMatrix* _transform(const Geometry::Position& pos);
46  TGeoHMatrix* _transform(const Geometry::RotationZYX& rot);
48  TGeoHMatrix* _transform(const Geometry::Rotation3D& rot3D);
50  TGeoHMatrix* _transform(const Geometry::Position& pos, const Geometry::RotationZYX& rot);
51 
53  TGeoHMatrix& _transform(TGeoHMatrix& mat, const Geometry::Transform3D& trans);
55  TGeoHMatrix& _transform(TGeoHMatrix& mat, const Geometry::Position& pos);
57  TGeoHMatrix& _transform(TGeoHMatrix& mat, const Geometry::RotationZYX& rot);
59  TGeoHMatrix& _transform(TGeoHMatrix& mat, const Geometry::Rotation3D& rot3D);
61  TGeoHMatrix& _transform(TGeoHMatrix& mat, const Geometry::Position& pos, const Geometry::RotationZYX& rot);
62 
64  Geometry::Transform3D _transform(const TGeoMatrix* matrix);
65 
69  void _decompose(const Geometry::Transform3D& trafo, Geometry::Position& pos, XYZAngles& rot);
74 
76  XYZAngles _XYZangles(const double* matrix);
78  XYZAngles _XYZangles(const TGeoMatrix* matrix);
79 
80  } /* End namespace Geometry */
81 } /* End namespace DD4hep */
82 
83 #endif // DD4HEP_IMP_MATRIXHELPERS_H
Position XYZAngles
Definition: MatrixHelpers.h:31
TGeoTranslation * _translation(const Geometry::Position &pos)
Convert a Position object to a TGeoTranslation
TGeoRotation * _rotationZYX(const Geometry::RotationZYX &rot)
Convert a RotationZYX object to a TGeoRotation
XYZAngles _XYZangles(const double *matrix)
Convert a 3x3 rotation matrix to XYZAngles
void _decompose(const Geometry::Transform3D &trafo, Geometry::Position &pos, Geometry::RotationZYX &rot)
Decompose a generic Transform3D into a translation (Position) and a RotationZYX
ROOT::Math::RotationZYX RotationZYX
Definition: Objects.h:98
TGeoIdentity * identityTransform()
Access the TGeo identity transformation
ROOT::Math::Rotation3D Rotation3D
Definition: Objects.h:106
TGeoRotation * _rotation3D(const Geometry::Rotation3D &rot)
Convert a Rotation3D object to a TGeoRotation
TGeoHMatrix * _transform(const Geometry::Transform3D &trans)
Convert a Transform3D object to a TGeoHMatrix
ROOT::Math::XYZVector Position
Definition: Objects.h:75
ROOT::Math::Translation3D Translation3D
Definition: Objects.h:112
ROOT::Math::Transform3D Transform3D
Definition: Objects.h:110