7#ifndef G4OCCT_APP_G4OCCTDetectorConstruction_hh
8#define G4OCCT_APP_G4OCCTDetectorConstruction_hh
11#include <G4ThreeVector.hh>
12#include <G4VUserDetectorConstruction.hh>
18class G4GenericMessenger;
19class G4VPhysicalVolume;
66 void AddSTEP(G4String stepFile);
69 void AddSolid(G4String stepFile, G4String materialName =
"");
86 struct AssemblyEntry {
92 std::vector<std::string> fMaterialXmlFiles;
93 std::vector<SolidEntry> fSolidEntries;
94 std::vector<AssemblyEntry> fAssemblyEntries;
95 G4String fWorldMaterial{
"G4_AIR"};
96 G4ThreeVector fWorldHalfSize{0, 0, 0};
98 std::unique_ptr<G4GenericMessenger> fLoadMessenger;
99 std::unique_ptr<G4GenericMessenger> fWorldMessenger;
100 std::unique_ptr<G4GenericMessenger> fVisMessenger;
102 void DefineMessengers();
105 static void UI(
const G4String& cmd);
108 void OpenViewer(G4String driver);
Dynamically constructs a Geant4 world from STEP solids and assemblies.
G4OCCTDetectorConstruction()
void LoadMaterial(G4String xmlFile)
Queue a material-map XML file to be loaded at construction time.
G4VPhysicalVolume * Construct() override
void AddSTEP(G4String stepFile)
Queue a STEP file as a solid or assembly (auto-detected).
void SetWorldMaterial(G4String name)
Set the world volume material by Geant4/NIST name.
void AddSolid(G4String stepFile, G4String materialName="")
Explicitly queue a STEP file as a G4OCCTSolid with an optional material override.
void AddAssembly(G4String stepFile)
Explicitly queue a STEP file as a G4OCCTAssemblyVolume.
void SetWorldHalfSize(G4ThreeVector halfSize)
Set the world half-size. Overrides auto-sizing.
~G4OCCTDetectorConstruction() override