17 namespace ActsFatras {
25 std::function<Acts::Result<std::pair<double, double>>(double)>;
40 template <
typename values_t,
typename covariance_t>
43 Eigen::MatrixBase<covariance_t>& covariances,
45 auto sResult = sFunction(values[idx]);
47 const auto& smeared = sResult.value();
48 values[idx] = smeared.first;
49 covariances(idx, idx) = smeared.second * smeared.second;
60 template <
typename indices_t, indices_t... kParameters>
71 template <
typename values_t,
typename covariance_t>
73 Eigen::MatrixBase<values_t>&
values,
74 Eigen::MatrixBase<covariance_t>& covariances,
75 const std::array<
SmearFunction,
sizeof...(kParameters)>& sFunctions) {
79 template <
typename values_t,
typename covariance_t, std::size_t... kStorage>
81 Eigen::MatrixBase<values_t>& values,
82 Eigen::MatrixBase<covariance_t>& covariances,
83 const std::array<
SmearFunction,
sizeof...(kParameters)>& sFunctions,
84 std::index_sequence<kStorage...>) {
85 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(values_t,
sizeof...(kParameters));
86 EIGEN_STATIC_ASSERT_MATRIX_SPECIFIC_SIZE(
87 covariance_t,
sizeof...(kParameters),
sizeof...(kParameters));
88 static_assert(
sizeof...(kParameters) ==
sizeof...(kStorage),
89 "Parameters and storage index packs must have the same size");
93 ((scs(kStorage, values, covariances, sFunctions[kStorage], result)), ...);