All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TransformationMatrix.h
Go to the documentation of this file.
1 /**
2  * @file larcorealg/Geometry/TransformationMatrix.h
3  * @brief Selection of the type of transformation matrix used in geometry.
4  * @author Gianluca Petrillo (petrillo@slac.stanford.edu)
5  * @date February 1, 2019
6  * @see `larcorealg/Geometry/GeoVectorLocalTransformation.h`
7  * @ingroup Geometry
8  *
9  * This is a header-only library.
10  */
11 
12 #ifndef LARCOREALG_GEOMETRY_TRANSFORMATIONMATRIX_H
13 #define LARCOREALG_GEOMETRY_TRANSFORMATIONMATRIX_H
14 
15 // LArSoft libraries
17 
18 // ROOT libraries
19 #include "Math/GenVector/Transform3D.h"
20 
21 
22 namespace geo {
23 
24  /**
25  * @brief Type of transformation matrix used in geometry.
26  *
27  * This type is used for storing the transformation matrices of the various
28  * geometry description objects (e.g. `geo::WireGeo`, `geo::OpDetGeo`, ...).
29  */
30  using TransformationMatrix = ROOT::Math::Transform3D;
31 
32 
33  /// Converts a transformation matrix into a `geo::TransformationMatrix`.
34  template <typename Trans>
35  decltype(auto) makeTransformationMatrix(Trans&& trans)
36  { return convertTransformationMatrix<geo::TransformationMatrix>(trans); }
37 
38 
39 } // namespace geo
40 
41 
42 #endif // LARCOREALG_GEOMETRY_TRANSFORMATIONMATRIX_H
decltype(auto) makeTransformationMatrix(Trans &&trans)
Converts a transformation matrix into a geo::TransformationMatrix.
ROOT::Math::Transform3D TransformationMatrix
Type of transformation matrix used in geometry.
Specialization of local-to-world transformations for ROOT GenVector.