18 #include <type_traits>
42 std::vector<std::tuple<double, BoundVector, std::optional<BoundSquareMatrix>>>
50 template <
typename projector_t>
52 using Ret = std::decay_t<decltype(proj(std::declval<Parameters>()))>;
56 if constexpr (std::is_floating_point_v<Ret>) {
63 const auto [weight, single_pars] = (*this)[
i];
64 ret += weight *
proj(single_pars);
72 template <
typename covariance_t>
74 std::shared_ptr<const Surface>
surface,
75 const std::vector<std::tuple<double, BoundVector, covariance_t>>& cmps,
80 std::is_same_v<BoundSquareMatrix, covariance_t> ||
81 std::is_same_v<std::optional<BoundSquareMatrix>,
covariance_t>);
82 if constexpr (std::is_same_v<BoundSquareMatrix, covariance_t>) {
83 for (
const auto& [weight, params,
cov] : cmps) {
106 std::optional<BoundSquareMatrix>
cov,
133 return std::make_pair(
136 std::get<std::optional<BoundSquareMatrix>>(
m_components[i]),
151 if (ret == CovarianceMatrix::Zero()) {
161 template <BoundIndices kIndex>
248 std::tuple<std::shared_ptr<Acts::Surface>,
249 std::vector<std::tuple<double, BoundVector, covariance_t>>>;
253 const std::vector<ConstructionTuple>& curvi) {
260 for (
const auto& [w,
pos4, dir, qop,
cov] : curvi) {
261 avgPos += w *
pos4.template segment<3>(0);
265 auto s = Surface::makeShared<PlaneSurface>(avgPos, avgDir);
267 std::vector<std::tuple<double, BoundVector, covariance_t>> bound;
268 bound.reserve(curvi.size());
271 for (
const auto& [w,
pos4, dir, qop,
cov] : curvi) {
282 *(
s->globalToLocal(
gctx, newPos, dir));
284 bound.emplace_back(w, bv,
cov);
293 :
Base(std::
get<0>(t), std::
get<1>(t), particleHypothesis) {}
297 const std::vector<ConstructionTuple>& cmps,
300 particleHypothesis) {}