ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Definitions.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Definitions.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2016-2018 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 #include <Eigen/Dense>
16 #pragma GCC diagnostic pop
17 #else
18 #include <Eigen/Dense>
19 #endif
20 
21 namespace Acts {
22 
24 static constexpr double s_epsilon = 3 * std::numeric_limits<double>::epsilon();
25 
31 static constexpr double s_onSurfaceTolerance = 1e-4;
32 
36 static constexpr double s_curvilinearProjTolerance = 0.999995;
37 
41 enum NavigationDirection : int { backward = -1, forward = 1 };
42 
47 enum MaterialUpdateStage : int {
48  preUpdate = -1,
51 };
52 
57 enum NoiseUpdateMode : int { removeNoise = -1, addNoise = 1 };
58 
59 // Eigen definitions
60 template <typename T, unsigned int rows, unsigned int cols>
61 using ActsMatrix = Eigen::Matrix<T, rows, cols>;
62 
63 template <unsigned int rows, unsigned int cols>
65 
66 template <unsigned int rows, unsigned int cols>
68 
69 template <typename T, unsigned int rows>
70 using ActsSymMatrix = Eigen::Matrix<T, rows, rows>;
71 
72 template <unsigned int rows>
74 
75 template <unsigned int rows>
77 
78 template <typename T, unsigned int rows>
79 using ActsVector = Eigen::Matrix<T, rows, 1>;
80 
81 template <unsigned int rows>
83 
84 template <unsigned int rows>
86 
87 template <typename T, unsigned int cols>
88 using ActsRowVector = Eigen::Matrix<T, 1, cols>;
89 
90 template <unsigned int cols>
92 
93 template <unsigned int cols>
95 
96 template <typename T>
97 using ActsMatrixX = Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>;
98 
101 
102 template <typename T>
103 using ActsVectorX = Eigen::Matrix<T, Eigen::Dynamic, 1>;
104 
107 
108 template <typename T>
109 using ActsRowVectorX = Eigen::Matrix<T, 1, Eigen::Dynamic>;
110 
113 
114 using Rotation3D = Eigen::Quaternion<double>;
115 using Translation3D = Eigen::Translation<double, 3>;
116 using AngleAxis3D = Eigen::AngleAxisd;
117 using Transform3D = Eigen::Affine3d;
118 using Vector3D = Eigen::Matrix<double, 3, 1>;
119 using Vector2D = Eigen::Matrix<double, 2, 1>;
120 using RotationMatrix3D = Eigen::Matrix<double, 3, 3>;
121 
122 using Rotation3F = Eigen::Quaternion<float>;
123 using Translation3F = Eigen::Translation<float, 3>;
124 using AngleAxis3F = Eigen::AngleAxisf;
125 using Transform3F = Eigen::Affine3f;
126 using Vector3F = Eigen::Matrix<float, 3, 1>;
127 using Vector2F = Eigen::Matrix<float, 2, 1>;
128 using RotationMatrix3F = Eigen::Matrix<float, 3, 3>;
129 
135 enum AxisDefs : int {
136  // position access
137  eX = 0,
138  eY = 1,
139  eZ = 2,
140  // momentum access
141  ePX = 0,
142  ePY = 1,
143  ePZ = 2
144 };
145 
146 } // namespace Acts