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