42 #include <pybind11/pybind11.h>
43 #include <pybind11/stl.h>
49 namespace ActsExamples {
54 namespace py = pybind11;
56 using namespace ActsExamples;
59 namespace Acts::Python {
62 auto [
m, mex] = ctx.
get(
"main",
"examples");
65 "SpacePointMaker", inputSourceLinks,
66 inputMeasurements, outputSpacePoints,
71 auto c = py::class_<Config>(
m,
"SeedFilterConfig").def(py::init<>());
94 auto c = py::class_<Config>(
m,
"SeedFinderConfig").def(py::init<>());
146 auto c = py::class_<seedOptions>(
m,
"SeedFinderOptions").def(py::init<>());
156 py::class_<Config>(
m,
"SeedFinderOrthogonalConfig").def(py::init<>());
200 auto c = py::class_<Config>(
m,
"SeedFinderFTFConfig").def(py::init<>());
218 auto c = py::class_<seedConf>(
m,
"SeedConfirmationRangeConfig")
235 auto c = py::class_<Config>(
m,
"SpacePointGridConfig").def(py::init<>());
255 auto c = py::class_<Options>(
m,
"SpacePointGridOptions").def(py::init<>());
265 outputSeeds, seedFilterConfig, seedFinderConfig, seedFinderOptions,
266 gridConfig, gridOptions, allowSeparateRMax, zBinNeighborsTop,
267 zBinNeighborsBottom, numPhiNeighbors);
270 "SeedingOrthogonalAlgorithm", inputSpacePoints,
271 outputSeeds, seedFilterConfig, seedFinderConfig,
276 inputSpacePoints, outputSeeds, seedFilterConfig, seedFinderConfig,
284 yMin, yMax, houghHistSize_x, houghHistSize_y, hitExtend_x, threshold,
285 localMaxWindowSize, kA);
289 "TrackParamsEstimationAlgorithm", inputSeeds, inputProtoTracks,
291 magneticField, bFieldMin, initialSigmas, initialVarInflation,
299 py::class_<Alg, ActsExamples::IAlgorithm, std::shared_ptr<Alg>>(
300 mex,
"TrackFindingAlgorithm")
301 .def(py::init<const Config&, Acts::Logging::Level>(),
302 py::arg(
"config"), py::arg(
"level"))
304 .def_static(
"makeTrackFinderFunction",
305 [](std::shared_ptr<const Acts::TrackingGeometry>
307 std::shared_ptr<const Acts::MagneticFieldProvider>
310 return Alg::makeTrackFinderFunction(
311 trackingGeometry, magneticField,
315 py::class_<Alg::TrackFinderFunction,
316 std::shared_ptr<Alg::TrackFinderFunction>>(
317 alg,
"TrackFinderFunction");
319 auto c = py::class_<Config>(alg,
"Config").def(py::init<>());
342 auto constructor = [](
const std::vector<
344 std::tuple<std::vector<double>,
346 std::vector<size_t>>>>&
input) {
347 std::vector<std::pair<GeometryIdentifier, MeasurementSelectorCuts>>
349 converted.reserve(
input.size());
351 const auto& [
bins, chi2, num] =
cuts;
354 return std::make_unique<MeasurementSelector::Config>(converted);
357 py::class_<MeasurementSelectorCuts>(
m,
"MeasurementSelectorCuts")
359 .def(
py::init<std::vector<double>, std::vector<double>,
360 std::vector<size_t>>())
361 .def_readwrite(
"etaBins", &MeasurementSelectorCuts::etaBins)
362 .def_readwrite(
"chi2CutOff", &MeasurementSelectorCuts::chi2CutOff)
363 .def_readwrite(
"numMeasurementsCutOff",
364 &MeasurementSelectorCuts::numMeasurementsCutOff);
366 auto ms = py::class_<MeasurementSelector>(
m,
"MeasurementSelector");
368 py::class_<MeasurementSelector::Config>(
ms,
"Config")
370 std::pair<GeometryIdentifier, MeasurementSelectorCuts>>>())
375 "SeedsToPrototracks", inputSeeds,
380 inputProtoTracks, inputSpacePoints, outputSeeds, outputProtoTracks);
384 inputMeasurementParticleMap, inputSourceLinks,