File indexing completed on 2025-11-29 09:34:02
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/EventData/Seed.hpp"
0012 #include "Acts/EventData/SpacePointMutableData.hpp"
0013 #include "Acts/Seeding/CandidatesForMiddleSp.hpp"
0014 #include "Acts/Seeding/IExperimentCuts.hpp"
0015 #include "Acts/Seeding/SeedFilterConfig.hpp"
0016 #include "Acts/Utilities/Logger.hpp"
0017
0018 #include <memory>
0019 #include <mutex>
0020 #include <queue>
0021 #include <tuple>
0022 #include <vector>
0023
0024 namespace Acts {
0025 struct SeedFilterState {
0026
0027 float zOrigin = 0;
0028
0029 std::size_t nTopSeedConf = 0;
0030
0031
0032 float rMaxSeedConf =
0033 std::numeric_limits<float>::max();
0034 };
0035
0036
0037
0038 template <typename external_spacepoint_t>
0039 class SeedFilter final {
0040 public:
0041 SeedFilter(const SeedFilterConfig& config,
0042 IExperimentCuts<external_spacepoint_t>* expCuts = nullptr);
0043 SeedFilter(const SeedFilterConfig& config,
0044 std::unique_ptr<const Acts::Logger> logger,
0045 IExperimentCuts<external_spacepoint_t>* expCuts = nullptr);
0046 SeedFilter(const SeedFilter<external_spacepoint_t>&) = delete;
0047 SeedFilter& operator=(const SeedFilter<external_spacepoint_t>&) = delete;
0048 SeedFilter(SeedFilter<external_spacepoint_t>&&) noexcept = default;
0049 SeedFilter& operator=(SeedFilter<external_spacepoint_t>&&) noexcept = default;
0050
0051 SeedFilter() = delete;
0052 ~SeedFilter() = default;
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065 void filterSeeds_2SpFixed(
0066 const Acts::SpacePointMutableData& mutableData,
0067 const external_spacepoint_t& bottomSP,
0068 const external_spacepoint_t& middleSP,
0069 const std::vector<const external_spacepoint_t*>& topSpVec,
0070 const std::vector<float>& invHelixDiameterVec,
0071 const std::vector<float>& impactParametersVec,
0072 SeedFilterState& seedFilterState,
0073 CandidatesForMiddleSp<const external_spacepoint_t>& candidates_collector)
0074 const;
0075
0076
0077
0078
0079
0080
0081 template <typename collection_t>
0082 void filterSeeds_1SpFixed(
0083 Acts::SpacePointMutableData& mutableData,
0084 CandidatesForMiddleSp<const external_spacepoint_t>& candidates_collector,
0085 collection_t& outputCollection) const;
0086
0087
0088
0089
0090
0091
0092
0093 template <typename collection_t>
0094 void filterSeeds_1SpFixed(
0095 Acts::SpacePointMutableData& mutableData,
0096 std::vector<typename CandidatesForMiddleSp<
0097 const external_spacepoint_t>::value_type>& candidates,
0098 const std::size_t numQualitySeeds, collection_t& outputCollection) const;
0099
0100 const SeedFilterConfig getSeedFilterConfig() const { return m_cfg; }
0101 const IExperimentCuts<external_spacepoint_t>* getExperimentCuts() const {
0102 return m_experimentCuts;
0103 }
0104
0105 private:
0106 const Logger& logger() const { return *m_logger; }
0107
0108 const SeedFilterConfig m_cfg;
0109 std::unique_ptr<const Acts::Logger> m_logger =
0110 Acts::getDefaultLogger("Filter", Logging::Level::INFO);
0111 const IExperimentCuts<external_spacepoint_t>* m_experimentCuts;
0112 };
0113 }
0114 #include "Acts/Seeding/SeedFilter.ipp"