File indexing completed on 2026-07-26 08:22:09
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "traccc/seeding/device/seed_parameter_estimation_algorithm.hpp"
0010
0011 namespace traccc::device {
0012
0013 struct seed_parameter_estimation_algorithm::data {
0014
0015 track_params_estimation_config m_config;
0016
0017 };
0018
0019 seed_parameter_estimation_algorithm::seed_parameter_estimation_algorithm(
0020 const track_params_estimation_config& config,
0021 const traccc::memory_resource& mr, const vecmem::copy& copy,
0022 std::unique_ptr<const Logger> logger)
0023 : messaging(std::move(logger)),
0024 algorithm_base{mr, copy},
0025 m_data{std::make_unique<data>(data{config})} {}
0026
0027 seed_parameter_estimation_algorithm::~seed_parameter_estimation_algorithm() =
0028 default;
0029
0030 auto seed_parameter_estimation_algorithm::operator()(
0031 const magnetic_field& bfield,
0032 const edm::measurement_collection::const_view& measurements,
0033 const edm::spacepoint_collection::const_view& spacepoints,
0034 const edm::seed_collection::const_view& seeds) const -> output_type {
0035
0036 edm::seed_collection::const_view::size_type n_seeds = 0u;
0037 if (mr().host) {
0038 const vecmem::async_size size = copy().get_size(seeds, *(mr().host));
0039
0040
0041 n_seeds = size.get();
0042 } else {
0043 n_seeds = copy().get_size(seeds);
0044 }
0045
0046
0047 if (n_seeds == 0) {
0048 return {};
0049 }
0050
0051
0052 bound_track_parameters_collection_types::buffer result(n_seeds, mr().main);
0053 copy().setup(result)->ignore();
0054
0055
0056 estimate_seed_params_kernel({n_seeds, m_data->m_config, bfield, measurements,
0057 spacepoints, seeds, result});
0058
0059
0060 return result;
0061 }
0062
0063 }