SHiP Geometry Service
Framework-agnostic C++20 library wrapping the SHiP GeoModel geometry behind a stable interface.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ship::IGeometryService Class Referenceabstract

Framework-agnostic interface to the SHiP detector geometry. More...

#include <IGeometryService.h>

Inheritance diagram for ship::IGeometryService:
Inheritance graph
[legend]

Public Member Functions

virtual ~IGeometryService ()=default
 
virtual const GeoVPhysVol * geoModelWorld () const =0
 GeoModel world physical volume (const — tree is immutable after build).
 
virtual G4LogicalVolume * geant4WorldLogical ()=0
 G4LogicalVolume* for the world.
 
virtual G4LogicalVolume * getLogicalVolume (const std::string &name) const =0
 Look up a G4LogicalVolume by name within this service's converted tree (depth-first).
 

Detailed Description

Framework-agnostic interface to the SHiP detector geometry.

Ownership of all returned pointers stays with the service.

Constructor & Destructor Documentation

◆ ~IGeometryService()

virtual ship::IGeometryService::~IGeometryService ( )
virtualdefault

Member Function Documentation

◆ geant4WorldLogical()

virtual G4LogicalVolume * ship::IGeometryService::geant4WorldLogical ( )
pure virtual

G4LogicalVolume* for the world.

Triggers GeoModel2G4 on first call, which must run on the process-wide geometry thread (ship::geometry_thread(), see GeometryThread.h) whenever more than one thread touches Geant4 geometry.

Implemented in ship::SHiPGeometryService.

◆ geoModelWorld()

virtual const GeoVPhysVol * ship::IGeometryService::geoModelWorld ( ) const
pure virtual

GeoModel world physical volume (const — tree is immutable after build).

Implemented in ship::SHiPGeometryService.

◆ getLogicalVolume()

virtual G4LogicalVolume * ship::IGeometryService::getLogicalVolume ( const std::string &  name) const
pure virtual

Look up a G4LogicalVolume by name within this service's converted tree (depth-first).

Returns nullptr before geant4WorldLogical() has been called or when no such volume exists; rethrows a stored conversion failure instead of masking it as nullptr.

Implemented in ship::SHiPGeometryService.


The documentation for this class was generated from the following file: