Warning, file /acts/Python/Plugins/src/Geant4.cpp was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "ActsPlugins/Geant4/Geant4DetectorElement.hpp"
0010 #include "ActsPlugins/Geant4/Geant4DetectorSurfaceFactory.hpp"
0011 #include "ActsPlugins/Geant4/Geant4PhysicalVolumeSelectors.hpp"
0012 #include "ActsPython/Utilities/Helpers.hpp"
0013 #include "ActsPython/Utilities/Macros.hpp"
0014
0015 #include <memory>
0016 #include <string>
0017
0018 #include <pybind11/pybind11.h>
0019
0020 namespace py = pybind11;
0021 using namespace pybind11::literals;
0022
0023 PYBIND11_MODULE(ActsPluginsPythonBindingsGeant4, geant4) {
0024 using namespace Acts;
0025 using namespace ActsPlugins;
0026
0027
0028 py::class_<Geant4DetectorElement, std::shared_ptr<Geant4DetectorElement>,
0029 DetectorElementBase>(geant4, "Geant4DetectorElement")
0030 .def("surface", [](const Geant4DetectorElement& self) {
0031 return self.surface().getSharedPtr();
0032 });
0033
0034
0035 {
0036 using ISelector = IGeant4PhysicalVolumeSelector;
0037 auto is = py::class_<ISelector, std::shared_ptr<ISelector>>(
0038 geant4, "IVolumeSelector");
0039
0040 using NameSelector = Geant4PhysicalVolumeSelectors::NameSelector;
0041 auto ns = py::class_<NameSelector, std::shared_ptr<NameSelector>>(
0042 geant4, "VolumeNameSelector", is)
0043 .def(py::init<const std::vector<std::string>&, bool>());
0044
0045 using Factory = Geant4DetectorSurfaceFactory;
0046 auto o = py::class_<Factory::Options>(geant4, "SurfaceFactoryOptions")
0047 .def(py::init<>());
0048 ACTS_PYTHON_STRUCT(o, scaleConversion, convertMaterial,
0049 convertedMaterialThickness, sensitiveSurfaceSelector,
0050 passiveSurfaceSelector);
0051 }
0052 }