File indexing completed on 2025-10-16 08:03:29
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "ActsExamples/Io/Root/RootAthenaDumpReader.hpp"
0010 #include "ActsExamples/Io/Root/RootAthenaNTupleReader.hpp"
0011 #include "ActsExamples/Io/Root/RootMaterialDecorator.hpp"
0012 #include "ActsExamples/Io/Root/RootMaterialTrackReader.hpp"
0013 #include "ActsExamples/Io/Root/RootMuonSpacePointReader.hpp"
0014 #include "ActsExamples/Io/Root/RootParticleReader.hpp"
0015 #include "ActsExamples/Io/Root/RootSimHitReader.hpp"
0016 #include "ActsExamples/Io/Root/RootTrackSummaryReader.hpp"
0017 #include "ActsExamples/Io/Root/RootVertexReader.hpp"
0018 #include "ActsPython/Utilities/Helpers.hpp"
0019 #include "ActsPython/Utilities/Macros.hpp"
0020
0021 #include <pybind11/pybind11.h>
0022 #include <pybind11/stl.h>
0023
0024 namespace py = pybind11;
0025 using namespace pybind11::literals;
0026
0027 using namespace Acts;
0028 using namespace ActsExamples;
0029
0030 namespace ActsPython {
0031
0032 void addRootInput(Context& ctx) {
0033 auto mex = ctx.get("examples");
0034
0035 ACTS_PYTHON_DECLARE_READER(RootParticleReader, mex, "RootParticleReader",
0036 outputParticles, treeName, filePath);
0037
0038 ACTS_PYTHON_DECLARE_READER(RootVertexReader, mex, "RootVertexReader",
0039 outputVertices, treeName, filePath);
0040
0041 ACTS_PYTHON_DECLARE_READER(RootMaterialTrackReader, mex,
0042 "RootMaterialTrackReader", outputMaterialTracks,
0043 treeName, fileList, readCachedSurfaceInformation);
0044
0045 ACTS_PYTHON_DECLARE_READER(RootTrackSummaryReader, mex,
0046 "RootTrackSummaryReader", outputTracks,
0047 outputParticles, treeName, filePath);
0048 ACTS_PYTHON_DECLARE_READER(RootMuonSpacePointReader, mex,
0049 "RootMuonSpacePointReader", outputSpacePoints,
0050 filePath, treeName);
0051
0052 ACTS_PYTHON_DECLARE_READER(
0053 RootAthenaNTupleReader, mex, "RootAthenaNTupleReader", inputTreeName,
0054 inputFilePath, outputTrackParameters, outputTruthVtxParameters,
0055 outputRecoVtxParameters, outputBeamspotConstraint);
0056
0057 ACTS_PYTHON_DECLARE_READER(
0058 RootAthenaDumpReader, mex, "RootAthenaDumpReader", treename, inputfiles,
0059 outputMeasurements, outputPixelSpacePoints, outputStripSpacePoints,
0060 outputSpacePoints, outputClusters, outputMeasurementParticlesMap,
0061 outputParticleMeasurementsMap, outputParticles, onlySpacepoints,
0062 onlyPassedParticles, skipOverlapSPsPhi, skipOverlapSPsEta, geometryIdMap,
0063 trackingGeometry, absBoundaryTolerance, onlySpacepoints, noTruth,
0064 readCellData);
0065
0066 #ifdef WITH_GEOMODEL_PLUGIN
0067 ACTS_PYTHON_DECLARE_READER(RootAthenaDumpGeoIdCollector, mex,
0068 "RootAthenaDumpGeoIdCollector", treename,
0069 inputfile, trackingGeometry, geometryIdMap);
0070 #endif
0071
0072 ACTS_PYTHON_DECLARE_READER(RootSimHitReader, mex, "RootSimHitReader",
0073 treeName, filePath, outputSimHits);
0074
0075 {
0076 auto rmd =
0077 py::class_<RootMaterialDecorator, IMaterialDecorator,
0078 std::shared_ptr<RootMaterialDecorator>>(
0079 mex, "RootMaterialDecorator")
0080 .def(py::init<RootMaterialDecorator::Config, Logging::Level>(),
0081 py::arg("config"), py::arg("level"));
0082
0083 using Config = RootMaterialDecorator::Config;
0084 auto c = py::class_<Config>(rmd, "Config").def(py::init<>());
0085
0086 ACTS_PYTHON_STRUCT(c, accessorConfig, accessorOptions, fileName);
0087 }
0088 }
0089
0090 }