Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Algebra.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Algebra.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2016-2020 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 #pragma once
10 
11 // for GNU: ignore this specific warning, otherwise just include Eigen/Dense
12 #if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER)
13 #pragma GCC diagnostic push
14 #pragma GCC diagnostic ignored "-Wmisleading-indentation"
15 #if __GNUC__ == 13
16 #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
17 #endif
18 #include <Eigen/Core>
19 #include <Eigen/Geometry>
20 #pragma GCC diagnostic pop
21 #else
22 #include <Eigen/Core>
23 #include <Eigen/Geometry>
24 #endif
25 
26 namespace Acts {
27 
46 
50 #ifdef ACTS_CUSTOM_SCALARTYPE
51 using ActsScalar = ACTS_CUSTOM_SCALARTYPE;
52 #else
54 #endif
55 
56 template <unsigned int kSize>
57 using ActsVector = Eigen::Matrix<ActsScalar, kSize, 1>;
58 
59 template <unsigned int kRows, unsigned int kCols>
60 using ActsMatrix = Eigen::Matrix<ActsScalar, kRows, kCols>;
61 
62 template <unsigned int kSize>
63 using ActsSquareMatrix = Eigen::Matrix<ActsScalar, kSize, kSize>;
64 
65 using ActsDynamicVector = Eigen::Matrix<ActsScalar, Eigen::Dynamic, 1>;
66 
67 using ActsDynamicMatrix =
68  Eigen::Matrix<ActsScalar, Eigen::Dynamic, Eigen::Dynamic>;
69 
71 
79 
80 // coordinate vectors
84 
85 // square matrices e.g. for coordinate covariance matrices
89 
90 // pure translation transformations
91 using Translation2 = Eigen::Translation<ActsScalar, 2>;
92 using Translation3 = Eigen::Translation<ActsScalar, 3>;
93 
94 // linear (rotation) matrices
97 
98 // pure rotation defined by a rotation angle around a rotation axis
99 using AngleAxis3 = Eigen::AngleAxis<ActsScalar>;
100 
101 // combined affine transformations. types are chosen for better data alignment:
102 // - 2d affine compact stored as 2x3 matrix
103 // - 3d affine stored as 4x4 matrix
104 using Transform2 = Eigen::Transform<ActsScalar, 2, Eigen::AffineCompact>;
105 using Transform3 = Eigen::Transform<ActsScalar, 3, Eigen::Affine>;
106 
108 
109 } // namespace Acts