File indexing completed on 2025-07-05 08:12:07
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "Acts/Plugins/Hashing/HashingAlgorithmConfig.hpp"
0010 #include "Acts/Plugins/Hashing/HashingTrainingConfig.hpp"
0011 #include "Acts/Plugins/Python/Utilities.hpp"
0012 #include "ActsExamples/TrackFinding/SeedingAlgorithmHashing.hpp"
0013
0014 #include <memory>
0015
0016 #include <pybind11/pybind11.h>
0017 #include <pybind11/stl.h>
0018
0019 namespace py = pybind11;
0020
0021 using namespace ActsExamples;
0022 using namespace Acts;
0023
0024 namespace Acts::Python {
0025
0026 void addHashing(Context& ctx) {
0027 auto [m, mex] = ctx.get("main", "examples");
0028
0029 auto hashingModule = m.def_submodule("hashing");
0030 auto hashingExampleModule = mex.def_submodule("_hashing");
0031
0032 {
0033 using Config = Acts::HashingAlgorithmConfig;
0034 auto c = py::class_<Config>(hashingModule, "HashingAlgorithmConfig")
0035 .def(py::init<>());
0036 ACTS_PYTHON_STRUCT(c, bucketSize, zBins, phiBins);
0037 patchKwargsConstructor(c);
0038 }
0039
0040 {
0041 using Config = Acts::HashingTrainingConfig;
0042 auto c = py::class_<Config>(hashingModule, "HashingTrainingConfig")
0043 .def(py::init<>());
0044 ACTS_PYTHON_STRUCT(c, annoySeed, f);
0045 patchKwargsConstructor(c);
0046 }
0047
0048 ACTS_PYTHON_DECLARE_ALGORITHM(
0049 ActsExamples::SeedingAlgorithmHashing, hashingExampleModule,
0050 "SeedingAlgorithmHashing", inputSpacePoints, outputSeeds, outputBuckets,
0051 seedFilterConfig, seedFinderConfig, seedFinderOptions, gridConfig,
0052 gridOptions, allowSeparateRMax, zBinNeighborsTop, zBinNeighborsBottom,
0053 numPhiNeighbors, hashingConfig, hashingTrainingConfig, useExtraCuts);
0054 }
0055
0056 }