Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EventData.cpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file EventData.cpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2023 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 
11 
12 #include <pybind11/pybind11.h>
13 #include <pybind11/stl.h>
14 
15 namespace py = pybind11;
16 
17 using namespace Acts;
18 
19 namespace Acts::Python {
20 
21 void addEventData(Context& ctx) {
22  auto [m, mex] = ctx.get("main", "examples");
23 
24  py::class_<Acts::ParticleHypothesis>(m, "ParticleHypothesis")
25  .def("__str__",
27  std::stringstream os;
28  particleHypothesis.toStream(os);
29  return os.str();
30  })
31  .def_property_readonly_static("muon",
32  [](py::object /* self */) {
34  })
35  .def_property_readonly_static("pion",
36  [](py::object /* self */) {
38  })
39  .def_property_readonly_static(
40  "electron",
41  [](py::object /* self */) {
43  })
44  .def_property_readonly_static(
45  "geantino",
46  [](py::object /* self */) {
48  })
49  .def_property_readonly_static(
50  "chargedGeantino", [](py::object /* self */) {
52  });
53 }
54 
55 } // namespace Acts::Python