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