Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:12:03

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 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 https://mozilla.org/MPL/2.0/.
0008 
0009 #include "Acts/Plugins/Python/Utilities.hpp"
0010 #include "ActsExamples/HepMC/HepMCProcessExtractor.hpp"
0011 #include "ActsExamples/Io/HepMC3/HepMC3Reader.hpp"
0012 #include "ActsExamples/Io/HepMC3/HepMC3Writer.hpp"
0013 
0014 #include <memory>
0015 
0016 #include <pybind11/pybind11.h>
0017 #include <pybind11/stl.h>
0018 
0019 namespace py = pybind11;
0020 using namespace pybind11::literals;
0021 
0022 using namespace Acts;
0023 
0024 namespace Acts::Python {
0025 void addHepMC3(Context& ctx) {
0026   auto [m, mex] = ctx.get("main", "examples");
0027 
0028   auto hepmc3 = mex.def_submodule("_hepmc3");
0029 
0030   ACTS_PYTHON_DECLARE_ALGORITHM(ActsExamples::HepMCProcessExtractor, hepmc3,
0031                                 "HepMCProcessExtractor", inputEvents,
0032                                 outputSimulationProcesses, extractionProcess,
0033                                 absPdgMin, absPdgMax, pMin);
0034 
0035   ACTS_PYTHON_DECLARE_WRITER(ActsExamples::HepMC3AsciiWriter, hepmc3,
0036                              "HepMC3AsciiWriter", outputDir, outputStem,
0037                              inputEvents);
0038 
0039   ACTS_PYTHON_DECLARE_READER(ActsExamples::HepMC3AsciiReader, hepmc3,
0040                              "HepMC3AsciiReader", inputDir, inputStem,
0041                              outputEvents);
0042 }
0043 }  // namespace Acts::Python