28 #include <pybind11/pybind11.h>
29 #include <pybind11/stl.h>
34 namespace ActsExamples {
38 namespace py = pybind11;
39 using namespace pybind11::literals;
41 using namespace ActsExamples;
43 namespace Acts::Python {
45 auto [
m, mex] = ctx.
get(
"main",
"examples");
48 std::shared_ptr<Acts::IMaterialDecorator>>(
m,
49 "IMaterialDecorator");
55 std::shared_ptr<RootMaterialDecorator>>(
56 mex,
"RootMaterialDecorator")
58 py::init<RootMaterialDecorator::Config, Acts::Logging::Level>(),
59 py::arg(
"config"), py::arg(
"level"));
62 auto c = py::class_<Config>(rmd,
"Config").def(py::init<>());
87 std::shared_ptr<MappingMaterialDecorator>>(
88 m,
"MappingMaterialDecorator")
91 py::arg(
"tGeometry"), py::arg(
"level"),
92 py::arg(
"clearSurfaceMaterial") =
true,
93 py::arg(
"clearVolumeMaterial") =
true)
94 .def(
"binningMap", &MappingMaterialDecorator::binningMap)
95 .def(
"setBinningMap", &MappingMaterialDecorator::setBinningMap);
101 auto alg = py::class_<Alg, ActsExamples::IAlgorithm, std::shared_ptr<Alg>>(
102 mex,
"MaterialMapping")
103 .def(py::init<const Alg::Config&, Acts::Logging::Level>(),
104 py::arg(
"config"), py::arg(
"level"))
105 .def(
"scoringParameters", &Alg::scoringParameters)
108 auto c = py::class_<Alg::Config>(alg,
"Config")
127 std::shared_ptr<SurfaceMaterialMapper>>(
128 m,
"SurfaceMaterialMapper")
132 return std::make_shared<SurfaceMaterialMapper>(
136 py::arg(
"config"), py::arg(
"propagator"), py::arg(
"level"));
138 auto c = py::class_<SurfaceMaterialMapper::Config>(cls,
"Config")
150 py::class_<VolumeMaterialMapper, std::shared_ptr<VolumeMaterialMapper>>(
151 m,
"VolumeMaterialMapper")
155 return std::make_shared<VolumeMaterialMapper>(
159 py::arg(
"config"), py::arg(
"propagator"), py::arg(
"level"));
161 auto c = py::class_<VolumeMaterialMapper::Config>(cls,
"Config")