ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
array_types.hpp
1// This file is part of the ACTS project.
2//
3// Copyright (C) 2016 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 https://mozilla.org/MPL/2.0/.
8
9#pragma once
10
11// Project include(s)
12#include "algebra/impl/array_getter.hpp"
13#include "detray/algebra/concepts.hpp"
14#include "detray/algebra/generic/generic.hpp"
15#include "detray/algebra/type_traits.hpp"
16
17// System include(s).
18#include <array>
19#include <cstddef>
20
21namespace detray {
22
23namespace algebra::array {
24
26using index_type = std::size_t;
28template <concepts::value T>
29using value_type = T;
31template <concepts::value T>
32using scalar_type = T;
34template <typename T, index_type N>
35using storage_type = std::array<T, N>;
37template <concepts::scalar T, std::size_t N>
38using vector_type = storage_type<T, N>;
40template <concepts::scalar T, index_type ROWS, index_type COLS>
41using matrix_type = storage_type<storage_type<T, ROWS>, COLS>;
42
44template <concepts::scalar T>
45using vector3 = storage_type<T, 3>;
47template <concepts::scalar T>
48using point3 = vector3<T>;
50template <concepts::scalar T>
51using vector2 = storage_type<T, 2>;
53template <concepts::scalar T>
54using point2 = vector2<T>;
55
57template <concepts::scalar T>
58using transform3 =
59 algebra::generic::math::transform3<algebra::array::index_type, T,
60 algebra::array::matrix_type,
61 algebra::array::storage_type>;
62
64using element_getter = array::storage::element_getter;
66using block_getter = array::storage::block_getter;
67
68} // namespace algebra::array
69
70DETRAY_ALGEBRA_DEFINE_TYPE_TRAITS(algebra::array)
71
72} // namespace detray
constexpr double T
Magnetic field, native unit (eV*s)/(e*m²).
Definition Units.hpp:168
Detray include(s).
Definition array_operators.hpp:18