Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DD4hepComponent.cpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file DD4hepComponent.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 
14 
15 #include <array>
16 #include <memory>
17 #include <utility>
18 #include <vector>
19 
20 #include <pybind11/pybind11.h>
21 #include <pybind11/stl.h>
22 
23 namespace Acts {
24 class IMaterialDecorator;
25 } // namespace Acts
26 
27 namespace py = pybind11;
28 using namespace ActsExamples;
29 using namespace Acts::Python;
30 
31 PYBIND11_MODULE(ActsPythonBindingsDD4hep, m) {
32  {
34  auto s = py::class_<DD4hep::DD4hepGeometryService,
35  std::shared_ptr<DD4hep::DD4hepGeometryService>>(
36  m, "DD4hepGeometryService")
37  .def(py::init<const Config&>());
38 
39  auto c = py::class_<Config>(s, "Config").def(py::init<>());
42  ACTS_PYTHON_MEMBER(dd4hepLogLevel);
43  ACTS_PYTHON_MEMBER(xmlFileNames);
45  ACTS_PYTHON_MEMBER(bTypePhi);
46  ACTS_PYTHON_MEMBER(bTypeR);
47  ACTS_PYTHON_MEMBER(bTypeZ);
48  ACTS_PYTHON_MEMBER(envelopeR);
49  ACTS_PYTHON_MEMBER(envelopeZ);
50  ACTS_PYTHON_MEMBER(defaultLayerThickness);
51  ACTS_PYTHON_MEMBER(geometryIdentifierHook);
53 
55  }
56 
57  {
58  py::class_<DD4hep::DD4hepDetector, std::shared_ptr<DD4hep::DD4hepDetector>>(
59  m, "DD4hepDetector")
60  .def(py::init<>())
61  .def("finalize",
62  py::overload_cast<DD4hep::DD4hepGeometryService::Config,
63  std::shared_ptr<const Acts::IMaterialDecorator>>(
65  }
66 }