26 const std::map<std::string, G4Material*>& materials,
27 const std::string& detectorName,
28 const std::vector<std::string>& ) {
30 for (
const auto& [stepName, g4mat] : materials) {
31 matMap.
Add(stepName, g4mat);
34 std::unique_ptr<G4OCCTAssemblyVolume> assembly;
37 }
catch (
const std::exception& ex) {
38 throw std::runtime_error(
"G4OCCT_STEPAssembly: failed to import '" + path +
"' (" + ex.what() +
42 const int nConstituents =
static_cast<int>(assembly->GetLogicalVolumes().size());
Declaration of G4OCCTAssemblyRegistry.
Declaration of G4OCCTAssemblyVolume.
Declaration of G4OCCTMaterialMap.
int G4OCCT_ImportSTEPAssembly(const std::string &path, const std::map< std::string, G4Material * > &materials, const std::string &detectorName, const std::vector< std::string > &)
Firewall bridge between the DD4hep plugin TU and G4OCCT/OCCT.
static G4OCCTAssemblyRegistry & Instance()
Return the singleton instance.
void Register(const std::string &name, G4OCCTAssemblyVolume *assembly)
static G4OCCTAssemblyVolume * FromSTEP(const std::string &path, const G4OCCTMaterialMap &materialMap)
Maps STEP material names to Geant4 G4Material objects.
void Add(const G4String &stepName, G4Material *material)