File indexing completed on 2026-06-17 07:59:45
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/EventData/SeedContainer2.hpp"
0012 #include "Acts/EventData/SpacePointContainer2.hpp"
0013 #include "Acts/Seeding2/GbtsConfig.hpp"
0014 #include "Acts/Seeding2/GbtsDataStorage.hpp"
0015 #include "Acts/Seeding2/GbtsGeometry.hpp"
0016 #include "Acts/Seeding2/RoiDescriptor.hpp"
0017 #include "Acts/Utilities/Logger.hpp"
0018
0019 #include <cstdint>
0020 #include <memory>
0021 #include <string>
0022 #include <utility>
0023 #include <vector>
0024
0025 namespace Acts::Experimental {
0026
0027
0028 class GraphBasedTrackSeeder {
0029 public:
0030
0031 struct SeedProperties {
0032
0033
0034
0035
0036 SeedProperties(float quality, std::int32_t clone,
0037 std::vector<std::uint32_t> sps)
0038 : seedQuality(quality), isClone(clone), spacePoints(std::move(sps)) {}
0039
0040
0041 float seedQuality{};
0042
0043 std::int32_t isClone{};
0044
0045 std::vector<std::uint32_t> spacePoints;
0046
0047
0048
0049
0050 auto operator<=>(const SeedProperties& o) const = default;
0051 };
0052
0053
0054 struct SlidingWindow {
0055
0056 std::uint32_t firstIt{};
0057
0058 float deltaPhi{};
0059
0060 bool hasNodes{};
0061
0062 const GbtsEtaBin* bin{};
0063 };
0064
0065
0066
0067
0068
0069
0070 GraphBasedTrackSeeder(const GbtsConfig& config,
0071 std::unique_ptr<GbtsGeometry> gbtsGeo,
0072 const std::vector<TrigInDetSiLayer>& layerGeometry,
0073 std::unique_ptr<const Acts::Logger> logger =
0074 Acts::getDefaultLogger("Finder",
0075 Acts::Logging::Level::INFO));
0076
0077
0078
0079
0080
0081
0082 SeedContainer2 createSeeds(const RoiDescriptor& roi,
0083 const SpacePointContainer2& spacePoints,
0084 std::uint32_t maxLayers) const;
0085
0086 private:
0087 GbtsConfig m_cfg{};
0088
0089 const std::shared_ptr<const GbtsGeometry> m_geo;
0090
0091 const std::vector<TrigInDetSiLayer>* m_layerGeometry{};
0092
0093 GbtsMlLookupTable m_mlLut;
0094
0095 std::unique_ptr<const Acts::Logger> m_logger =
0096 Acts::getDefaultLogger("Finder", Acts::Logging::Level::INFO);
0097
0098 const Acts::Logger& logger() const { return *m_logger; }
0099
0100
0101
0102
0103
0104 std::vector<std::vector<GbtsNode>> createNodes(
0105 const SpacePointContainer2& spacePoints, std::uint32_t maxLayers) const;
0106
0107
0108
0109
0110 GbtsMlLookupTable parseGbtsMlLookupTable(const std::string& lutInputFile);
0111
0112
0113
0114
0115
0116
0117 std::pair<std::int32_t, std::int32_t> buildTheGraph(
0118 const RoiDescriptor& roi, const std::unique_ptr<GbtsDataStorage>& storage,
0119 std::vector<GbtsEdge>& edgeStorage) const;
0120
0121
0122
0123
0124
0125 std::int32_t runCCA(std::uint32_t nEdges,
0126 std::vector<GbtsEdge>& edgeStorage) const;
0127
0128
0129
0130
0131
0132
0133
0134 void extractSeedsFromTheGraph(
0135 std::uint32_t maxLevel, std::uint32_t nEdges, std::int32_t nHits,
0136 std::vector<GbtsEdge>& edgeStorage,
0137 std::vector<SeedProperties>& vSeedCandidates) const;
0138
0139
0140
0141
0142
0143
0144
0145
0146 bool checkZ0BitMask(std::uint16_t z0BitMask, float z0, float minZ0,
0147 float z0HistoCoeff) const;
0148 };
0149
0150 }