File indexing completed on 2025-01-18 09:12:05
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "Acts/Plugins/Python/Utilities.hpp"
0010 #include "ActsExamples/EventData/Index.hpp"
0011 #include "ActsExamples/Vertexing/AdaptiveMultiVertexFinderAlgorithm.hpp"
0012 #include "ActsExamples/Vertexing/IterativeVertexFinderAlgorithm.hpp"
0013 #include "ActsExamples/Vertexing/SingleSeedVertexFinderAlgorithm.hpp"
0014 #include "ActsExamples/Vertexing/VertexFitterAlgorithm.hpp"
0015
0016 #include <memory>
0017
0018 #include <pybind11/pybind11.h>
0019 #include <pybind11/stl.h>
0020
0021 namespace py = pybind11;
0022
0023 using namespace ActsExamples;
0024 using namespace Acts;
0025
0026 namespace Acts::Python {
0027
0028 void addVertexing(Context& ctx) {
0029 using Seeder = ActsExamples::AdaptiveMultiVertexFinderAlgorithm::SeedFinder;
0030 auto mex = ctx.get("examples");
0031 auto& m = ctx.get("main");
0032
0033 py::enum_<Seeder>(m, "VertexSeedFinder")
0034 .value("TruthSeeder", Seeder::TruthSeeder)
0035 .value("GaussianSeeder", Seeder::GaussianSeeder)
0036 .value("AdaptiveGridSeeder", Seeder::AdaptiveGridSeeder);
0037
0038 ACTS_PYTHON_DECLARE_ALGORITHM(
0039 ActsExamples::AdaptiveMultiVertexFinderAlgorithm, mex,
0040 "AdaptiveMultiVertexFinderAlgorithm", inputTrackParameters,
0041 inputTruthParticles, inputTruthVertices, outputProtoVertices,
0042 outputVertices, seedFinder, bField, minWeight, doSmoothing, maxIterations,
0043 useTime, tracksMaxZinterval, initialVariances, doFullSplitting,
0044 tracksMaxSignificance, maxMergeVertexSignificance, spatialBinExtent,
0045 temporalBinExtent);
0046
0047 ACTS_PYTHON_DECLARE_ALGORITHM(ActsExamples::IterativeVertexFinderAlgorithm,
0048 mex, "IterativeVertexFinderAlgorithm",
0049 inputTrackParameters, outputProtoVertices,
0050 outputVertices, bField, maxIterations);
0051
0052 ACTS_PYTHON_DECLARE_ALGORITHM(ActsExamples::VertexFitterAlgorithm, mex,
0053 "VertexFitterAlgorithm", inputTrackParameters,
0054 inputProtoVertices, outputVertices, bField,
0055 doConstrainedFit, constraintPos, constraintCov);
0056
0057 ACTS_PYTHON_DECLARE_ALGORITHM(ActsExamples::SingleSeedVertexFinderAlgorithm,
0058 mex, "SingleSeedVertexFinderAlgorithm",
0059 inputSpacepoints, outputVertices);
0060 }
0061
0062 }