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