Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:10:04

0001 // This file is part of the Acts project.
0002 //
0003 // Copyright (C) 2022 CERN for the benefit of the Acts project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
0008 
0009 #include "Acts/Plugins/Python/Utilities.hpp"
0010 #include "ActsExamples/DD4hepDetector/DD4hepDetector.hpp"
0011 #include "ActsExamples/Io/EDM4hep/EDM4hepMeasurementReader.hpp"
0012 #include "ActsExamples/Io/EDM4hep/EDM4hepMeasurementWriter.hpp"
0013 #include "ActsExamples/Io/EDM4hep/EDM4hepMultiTrajectoryWriter.hpp"
0014 #include "ActsExamples/Io/EDM4hep/EDM4hepParticleWriter.hpp"
0015 #include "ActsExamples/Io/EDM4hep/EDM4hepReader.hpp"
0016 #include "ActsExamples/Io/EDM4hep/EDM4hepSimHitWriter.hpp"
0017 #include "ActsExamples/Io/EDM4hep/EDM4hepTrackReader.hpp"
0018 #include "ActsExamples/Io/EDM4hep/EDM4hepTrackWriter.hpp"
0019 
0020 #include <memory>
0021 
0022 #include <pybind11/pybind11.h>
0023 #include <pybind11/stl.h>
0024 
0025 namespace py = pybind11;
0026 using namespace pybind11::literals;
0027 
0028 using namespace Acts;
0029 using namespace Acts::Python;
0030 
0031 PYBIND11_MODULE(ActsPythonBindingsEDM4hep, m) {
0032   ACTS_PYTHON_DECLARE_READER(
0033       ActsExamples::EDM4hepReader, m, "EDM4hepReader", inputPath,
0034       inputParticles, inputSimHits, outputParticlesInitial,
0035       outputParticlesFinal, outputParticlesGenerator, outputSimHits,
0036       graphvizOutput, dd4hepDetector, trackingGeometry, sortSimHitsInTime);
0037 
0038   ACTS_PYTHON_DECLARE_WRITER(
0039       ActsExamples::EDM4hepSimHitWriter, m, "EDM4hepSimHitWriter", inputSimHits,
0040       inputParticles, outputPath, outputParticles, outputSimTrackerHits);
0041 
0042   ACTS_PYTHON_DECLARE_READER(ActsExamples::EDM4hepMeasurementReader, m,
0043                              "EDM4hepMeasurementReader", inputPath,
0044                              outputMeasurements, outputMeasurementSimHitsMap,
0045                              outputSourceLinks, outputClusters);
0046 
0047   ACTS_PYTHON_DECLARE_WRITER(ActsExamples::EDM4hepMeasurementWriter, m,
0048                              "EDM4hepMeasurementWriter", inputMeasurements,
0049                              inputClusters, outputPath);
0050 
0051   ACTS_PYTHON_DECLARE_WRITER(ActsExamples::EDM4hepParticleWriter, m,
0052                              "EDM4hepParticleWriter", inputParticles,
0053                              outputPath, outputParticles);
0054 
0055   ACTS_PYTHON_DECLARE_WRITER(ActsExamples::EDM4hepMultiTrajectoryWriter, m,
0056                              "EDM4hepMultiTrajectoryWriter", inputTrajectories,
0057                              inputMeasurementParticlesMap, outputPath, Bz);
0058 
0059   ACTS_PYTHON_DECLARE_WRITER(ActsExamples::EDM4hepTrackWriter, m,
0060                              "EDM4hepTrackWriter", inputTracks, outputPath, Bz);
0061 
0062   ACTS_PYTHON_DECLARE_READER(ActsExamples::EDM4hepTrackReader, m,
0063                              "EDM4hepTrackReader", inputTracks, outputTracks,
0064                              inputPath, Bz);
0065 }