27 #include <pybind11/pybind11.h>
28 #include <pybind11/stl.h>
34 namespace ActsExamples {
38 namespace py = pybind11;
40 using namespace ActsExamples;
43 namespace Acts::Python {
46 auto mex = ctx.
get(
"examples");
49 "SurfaceSortingAlgorithm", inputProtoTracks,
50 inputSimHits, inputMeasurementSimHitsMap,
54 "TrackFittingAlgorithm", inputMeasurements,
55 inputSourceLinks, inputProtoTracks,
56 inputInitialTrackParameters, inputClusters,
64 py::class_<TrackFitterFunction, std::shared_ptr<TrackFitterFunction>>(
65 mex,
"TrackFitterFunction");
68 "makeKalmanFitterFunction",
70 std::shared_ptr<const Acts::MagneticFieldProvider>
magneticField,
71 bool multipleScattering,
bool energyLoss,
72 double reverseFilteringMomThreshold,
76 trackingGeometry, magneticField, multipleScattering, energyLoss,
77 reverseFilteringMomThreshold, freeToBoundCorrection,
80 py::arg(
"trackingGeometry"), py::arg(
"magneticField"),
81 py::arg(
"multipleScattering"), py::arg(
"energyLoss"),
82 py::arg(
"reverseFilteringMomThreshold"),
83 py::arg(
"freeToBoundCorrection"), py::arg(
"level"));
85 py::class_<MeasurementCalibrator, std::shared_ptr<MeasurementCalibrator>>(
86 mex,
"MeasurementCalibrator");
88 mex.def(
"makePassThroughCalibrator",
89 []() -> std::shared_ptr<MeasurementCalibrator> {
90 return std::make_shared<PassThroughCalibrator>();
94 "makeScalingCalibrator",
95 [](
const char*
path) -> std::shared_ptr<MeasurementCalibrator> {
96 return std::make_shared<ActsExamples::ScalingCalibrator>(
path);
100 py::enum_<Acts::MixtureReductionMethod>(mex,
"FinalReductionMethod")
101 .
value(
"mean", Acts::MixtureReductionMethod::eMean)
102 .value(
"maxWeight", Acts::MixtureReductionMethod::eMaxWeight);
104 py::class_<ActsExamples::BetheHeitlerApprox>(mex,
"AtlasBetheHeitlerApprox")
105 .def_static(
"loadFromFiles",
107 py::arg(
"lowParametersPath"), py::arg(
"lowParametersPath"))
108 .def_static(
"makeDefault",
112 "makeGsfFitterFunction",
113 [](std::shared_ptr<const Acts::TrackingGeometry> trackingGeometry,
114 std::shared_ptr<const Acts::MagneticFieldProvider> magneticField,
120 trackingGeometry, magneticField, betheHeitlerApprox,
121 maxComponents, weightCutoff, finalReductionMethod, abortOnError,
122 disableAllMaterialHandling,
125 py::arg(
"trackingGeometry"), py::arg(
"magneticField"),
126 py::arg(
"betheHeitlerApprox"), py::arg(
"maxComponents"),
127 py::arg(
"weightCutoff"), py::arg(
"finalReductionMethod"),
128 py::arg(
"abortOnError"), py::arg(
"disableAllMaterialHandling"),
132 "makeGlobalChiSquareFitterFunction",
133 [](std::shared_ptr<const Acts::TrackingGeometry> trackingGeometry,
134 std::shared_ptr<const Acts::MagneticFieldProvider> magneticField,
135 bool multipleScattering,
bool energyLoss,
139 trackingGeometry, magneticField, multipleScattering, energyLoss,
142 py::arg(
"trackingGeometry"), py::arg(
"magneticField"),
143 py::arg(
"multipleScattering"), py::arg(
"energyLoss"),
144 py::arg(
"freeToBoundCorrection"), py::arg(
"level"));
151 py::class_<FreeToBoundCorrection>(mex,
"FreeToBoundCorrection")
153 .def(py::init<bool>(), py::arg(
"apply") =
false)
154 .def(py::init<bool, double, double>(), py::arg(
"apply") =
false,
155 py::arg(
"alpha") = 0.1, py::arg(
"beta") = 2);