G4OCCT 0.1.0
Geant4 interface to Open CASCADE Technology (OCCT) geometry definitions
Loading...
Searching...
No Matches
G4OCCT_STEPAssembly_impl.hh File Reference

Firewall bridge between the DD4hep plugin TU and G4OCCT/OCCT. More...

#include <map>
#include <string>
#include <vector>

Go to the source code of this file.

Functions

int G4OCCT_ImportSTEPAssembly (const std::string &path, const std::map< std::string, G4Material * > &materials, const std::string &detectorName, const std::vector< std::string > &sensitiveNames)
 

Detailed Description

Firewall bridge between the DD4hep plugin TU and G4OCCT/OCCT.

See G4OCCT_STEPSolid_impl.hh for a full explanation of the Printf return-type collision that makes this firewall necessary.

This header must not pull in either DD4hep/ROOT or G4OCCT/OCCT.

Definition in file G4OCCT_STEPAssembly_impl.hh.

Function Documentation

◆ G4OCCT_ImportSTEPAssembly()

int G4OCCT_ImportSTEPAssembly ( const std::string &  path,
const std::map< std::string, G4Material * > &  materials,
const std::string &  detectorName,
const std::vector< std::string > &  sensitiveNames 
)

Import a STEP assembly, build the G4OCCTAssemblyVolume, register it in G4OCCTAssemblyRegistry under detectorName, and return the number of constituent solids found. The assembly lifetime is managed by the registry.

Parameters
pathPath to the STEP file.
materialsMap of STEP material name → G4Material*.
detectorNameKey to register the assembly under in G4OCCTAssemblyRegistry.
sensitiveNamesVolume name patterns to receive SD assignment (informational; SD assignment happens at ConstructSDandField time). Throws std::runtime_error on failure.

Definition at line 25 of file G4OCCT_STEPAssembly_impl.cc.

References G4OCCTMaterialMap::Add(), G4OCCTAssemblyVolume::FromSTEP(), G4OCCTAssemblyRegistry::Instance(), and G4OCCTAssemblyRegistry::Register().

Referenced by create_step_assembly().