Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-01-09 09:26:47

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/Utilities/Logger.hpp"
0010 #include "ActsExamples/Generators/Pythia8ProcessGenerator.hpp"
0011 #include "ActsPython/Utilities/Helpers.hpp"
0012 #include "ActsPython/Utilities/Macros.hpp"
0013 
0014 #include <memory>
0015 #include <string>
0016 #include <unordered_map>
0017 
0018 #include <pybind11/pybind11.h>
0019 #include <pybind11/stl.h>
0020 #include <pybind11/stl/filesystem.h>
0021 
0022 namespace py = pybind11;
0023 using namespace ActsExamples;
0024 using namespace ActsPython;
0025 
0026 PYBIND11_MODULE(ActsExamplesPythonBindingsPythia8, p8) {
0027   using Gen = Pythia8Generator;
0028   auto gen = py::class_<Gen, ParticlesGenerator, std::shared_ptr<Gen>>(
0029                  p8, "Pythia8Generator")
0030                  .def(py::init<const Gen::Config&, Acts::Logging::Level>(),
0031                       py::arg("config"), py::arg("level"));
0032 
0033   py::class_<Gen::Config>(gen, "Config")
0034       .def(py::init<>())
0035       .def_readwrite("pdgBeam0", &Gen::Config::pdgBeam0)
0036       .def_readwrite("pdgBeam1", &Gen::Config::pdgBeam1)
0037       .def_readwrite("cmsEnergy", &Gen::Config::cmsEnergy)
0038       .def_readwrite("settings", &Gen::Config::settings)
0039       .def_readwrite("printShortEventListing",
0040                      &Gen::Config::printShortEventListing)
0041       .def_readwrite("printLongEventListing",
0042                      &Gen::Config::printLongEventListing)
0043       .def_readwrite("labelSecondaries", &Gen::Config::labelSecondaries)
0044       .def_readwrite("spatialVertexThreshold",
0045                      &Gen::Config::spatialVertexThreshold)
0046       .def_readwrite("initializationSeed", &Gen::Config::initializationSeed)
0047       .def_readwrite("writeHepMC3", &Gen::Config::writeHepMC3);
0048 
0049   patchClassesWithConfig(p8);
0050 }