Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Pythia8.cpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Pythia8.cpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2021 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
15 
16 #include <memory>
17 #include <string>
18 #include <unordered_map>
19 #include <vector>
20 
21 #include <pybind11/pybind11.h>
22 #include <pybind11/stl.h>
23 
24 namespace py = pybind11;
25 using namespace ActsExamples;
26 
27 namespace Acts::Python {
28 void addPythia8(Context& ctx) {
29  auto mex = ctx.get("examples");
30 
31  auto p8 = mex.def_submodule("pythia8");
32  ctx.modules["pythia8"] = p8;
33 
36  std::shared_ptr<Gen>>(p8, "Pythia8Generator")
37  .def(py::init<const Gen::Config&, Acts::Logging::Level>(),
38  py::arg("config"), py::arg("level"));
39 
40  py::class_<Gen::Config>(gen, "Config")
41  .def(py::init<>())
42  .def_readwrite("pdgBeam0", &Gen::Config::pdgBeam0)
43  .def_readwrite("pdgBeam1", &Gen::Config::pdgBeam1)
44  .def_readwrite("cmsEnergy", &Gen::Config::cmsEnergy)
45  .def_readwrite("settings", &Gen::Config::settings)
46  .def_readwrite("printShortEventListing",
47  &Gen::Config::printShortEventListing)
48  .def_readwrite("printLongEventListing",
49  &Gen::Config::printLongEventListing);
50 
52 }
53 } // namespace Acts::Python