File indexing completed on 2025-10-14 08:01:31
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, double>;
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
0055 using ParametersVector = Acts::ActsVector<kSize>;
0056
0057 using CovarianceMatrix = Acts::ActsSquareMatrix<kSize>;
0058
0059
0060 ParametersVector parameters = ParametersVector::Zero();
0061
0062 CovarianceMatrix covariance = CovarianceMatrix::Zero();
0063
0064 std::array<unsigned int, kSize> clusterSize;
0065
0066 std::vector<Channel<signal_t, kSize>> channels;
0067
0068
0069
0070
0071
0072
0073
0074 template <typename parameters_t, typename covariance_t>
0075 Cluster(const Eigen::MatrixBase<parameters_t>& p,
0076 const Eigen::MatrixBase<covariance_t>& c,
0077 std::array<unsigned int, kSize> cSize,
0078 std::vector<Channel<signal_t, kSize>> cChannels)
0079 : parameters(p), covariance(c), clusterSize(cSize), channels(cChannels) {}
0080
0081 Cluster() = delete;
0082 };
0083
0084 }