Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:10:06

0001 // This file is part of the Acts project.
0002 //
0003 // Copyright (C) 2023 CERN for the benefit of the Acts project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
0008 
0009 #include "Acts/Plugins/Python/Utilities.hpp"
0010 #include "ActsExamples/TrackFindingML/AmbiguityResolutionMLAlgorithm.hpp"
0011 #include "ActsExamples/TrackFindingML/AmbiguityResolutionMLDBScanAlgorithm.hpp"
0012 #include "ActsExamples/TrackFindingML/SeedFilterMLAlgorithm.hpp"
0013 
0014 #include <pybind11/pybind11.h>
0015 #include <pybind11/stl.h>
0016 
0017 namespace py = pybind11;
0018 
0019 using namespace ActsExamples;
0020 using namespace Acts;
0021 
0022 namespace Acts::Python {
0023 
0024 void addOnnx(Context& ctx) {
0025   auto [m, mex] = ctx.get("main", "examples");
0026   auto onnx = mex.def_submodule("_onnx");
0027   ctx.modules["onnx"] = onnx;
0028 
0029   ACTS_PYTHON_DECLARE_ALGORITHM(ActsExamples::AmbiguityResolutionMLAlgorithm,
0030                                 onnx, "AmbiguityResolutionMLAlgorithm",
0031                                 inputTracks, inputDuplicateNN, outputTracks,
0032                                 nMeasurementsMin);
0033 
0034   ACTS_PYTHON_DECLARE_ALGORITHM(
0035       ActsExamples::AmbiguityResolutionMLDBScanAlgorithm, onnx,
0036       "AmbiguityResolutionMLDBScanAlgorithm", inputTracks, inputDuplicateNN,
0037       outputTracks, nMeasurementsMin, epsilonDBScan, minPointsDBScan);
0038 
0039   ACTS_PYTHON_DECLARE_ALGORITHM(ActsExamples::SeedFilterMLAlgorithm, onnx,
0040                                 "SeedFilterMLAlgorithm", inputTrackParameters,
0041                                 inputSimSeeds, inputSeedFilterNN,
0042                                 outputTrackParameters, outputSimSeeds,
0043                                 epsilonDBScan, minPointsDBScan, minSeedScore);
0044 }
0045 }  // namespace Acts::Python