File indexing completed on 2025-01-18 09:28:02
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/Definitions/Algebra.hpp"
0012 #include "Acts/Definitions/TrackParametrization.hpp"
0013
0014 #include <unordered_set>
0015 #include <utility>
0016
0017 namespace ActsFatras {
0018
0019
0020 using Cell = std::pair<unsigned int, Acts::ActsScalar>;
0021
0022
0023
0024
0025
0026 template <typename signal_t, std::size_t kSize>
0027 struct Channel {
0028
0029 std::array<Cell, kSize> cellId;
0030
0031
0032 signal_t value = 0;
0033
0034 std::unordered_set<unsigned int> links = {};
0035
0036
0037
0038
0039
0040
0041 Channel(std::array<Cell, kSize> cellId_, signal_t value_,
0042 std::unordered_set<unsigned int> links_ = {})
0043 : cellId(cellId_), value(value_), links(std::move(links_)) {}
0044
0045 Channel() = delete;
0046 };
0047
0048
0049
0050
0051
0052 template <typename signal_t, std::size_t kSize>
0053 struct Cluster {
0054 using Scalar = Acts::ActsScalar;
0055 using ParametersVector = Acts::ActsVector<kSize>;
0056 using CovarianceMatrix = Acts::ActsSquareMatrix<kSize>;
0057
0058
0059 ParametersVector parameters = ParametersVector::Zero();
0060
0061 CovarianceMatrix covariance = CovarianceMatrix::Zero();
0062
0063 std::array<unsigned int, kSize> clusterSize;
0064
0065 std::vector<Channel<signal_t, kSize>> channels;
0066
0067
0068
0069
0070
0071
0072
0073 template <typename parameters_t, typename covariance_t>
0074 Cluster(const Eigen::MatrixBase<parameters_t>& p,
0075 const Eigen::MatrixBase<covariance_t>& c,
0076 std::array<unsigned int, kSize> cSize,
0077 std::vector<Channel<signal_t, kSize>> cChannels)
0078 : parameters(p), covariance(c), clusterSize(cSize), channels(cChannels) {}
0079
0080 Cluster() = delete;
0081 };
0082
0083 }