Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:10:05

0001 // This file is part of the Acts project.
0002 //
0003 // Copyright (C) 2021-2024 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 http://mozilla.org/MPL/2.0/.
0008 
0009 #include "Acts/Utilities/TypeTraits.hpp"
0010 #include "ActsExamples/DD4hepDetector/DD4hepDetector.hpp"
0011 #include "ActsExamples/DDG4/DDG4DetectorConstruction.hpp"
0012 #include "ActsExamples/Framework/ProcessCode.hpp"
0013 #include "ActsExamples/Geant4/RegionCreator.hpp"
0014 
0015 #include <G4VUserDetectorConstruction.hh>
0016 #include <pybind11/pybind11.h>
0017 #include <pybind11/stl.h>
0018 
0019 class G4VUserDetectorConstruction;
0020 
0021 namespace py = pybind11;
0022 
0023 using namespace ActsExamples;
0024 using namespace Acts;
0025 
0026 PYBIND11_MODULE(ActsPythonBindingsDDG4, m) {
0027   py::module_::import("acts.ActsPythonBindingsGeant4");
0028 
0029   py::class_<DDG4DetectorConstructionFactory, DetectorConstructionFactory,
0030              std::shared_ptr<DDG4DetectorConstructionFactory>>(
0031       m, "DDG4DetectorConstructionFactory")
0032       .def(py::init<std::shared_ptr<DD4hep::DD4hepDetector>,
0033                     std::vector<std::shared_ptr<RegionCreator>>>(),
0034            py::arg("detector"),
0035            py::arg("regionCreators") =
0036                std::vector<std::shared_ptr<RegionCreator>>());
0037 }