8#include <GeoModelKernel/GeoVPhysVol.h>
29 [[nodiscard]]
static std::unique_ptr<SHiPGeometryService>
fromSource();
32 [[nodiscard]]
static std::unique_ptr<SHiPGeometryService>
fromFile(
33 const std::filesystem::path& dbPath);
46 [[nodiscard]]
static std::shared_ptr<SHiPGeometryService>
sharedFromFile(
47 const std::filesystem::path& dbPath);
50 [[nodiscard]]
static std::unique_ptr<SHiPGeometryService>
fromWorld(PVConstLink world);
69 mutable std::once_flag m_g4ConversionDone;
70 G4LogicalVolume* m_g4WorldLV{
nullptr};
71 std::exception_ptr m_conversionError;
Framework-agnostic interface to the SHiP detector geometry.
Definition IGeometryService.h:15
Concrete implementation of IGeometryService backed by GeoModel.
Definition SHiPGeometryService.h:26
SHiPGeometryService & operator=(const SHiPGeometryService &)=delete
const GeoVPhysVol * geoModelWorld() const override
GeoModel world physical volume (const — tree is immutable after build).
Definition SHiPGeometryService.cpp:126
static std::unique_ptr< SHiPGeometryService > fromWorld(PVConstLink world)
Wrap an already-built GeoModel world (e.g. a small test geometry).
Definition SHiPGeometryService.cpp:114
static std::unique_ptr< SHiPGeometryService > fromSource()
Build geometry from the C++ SHiPGeometryBuilder.
Definition SHiPGeometryService.cpp:49
SHiPGeometryService(const SHiPGeometryService &)=delete
G4LogicalVolume * getLogicalVolume(const std::string &name) const override
Look up a G4LogicalVolume by name within this service's converted tree (depth-first).
Definition SHiPGeometryService.cpp:188
G4LogicalVolume * geant4WorldLogical() override
G4LogicalVolume* for the world.
Definition SHiPGeometryService.cpp:130
static std::shared_ptr< SHiPGeometryService > sharedFromFile(const std::filesystem::path &dbPath)
Process-wide shared instance per geometry file, keyed by the canonical path.
Definition SHiPGeometryService.cpp:86
~SHiPGeometryService() override=default
SHiPGeometryService & operator=(SHiPGeometryService &&)=delete
SHiPGeometryService(SHiPGeometryService &&)=delete
static std::unique_ptr< SHiPGeometryService > fromFile(const std::filesystem::path &dbPath)
Load geometry from a previously written GeoModel SQLite database.
Definition SHiPGeometryService.cpp:62
Definition G4RayScanner.h:15