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

Concrete implementation of IGeometryService backed by GeoModel. More...

#include <SHiPGeometryService.h>

Inheritance diagram for ship::SHiPGeometryService:
Inheritance graph
[legend]
Collaboration diagram for ship::SHiPGeometryService:
Collaboration graph
[legend]

Public Member Functions

 ~SHiPGeometryService () override=default
 
 SHiPGeometryService (const SHiPGeometryService &)=delete
 
SHiPGeometryServiceoperator= (const SHiPGeometryService &)=delete
 
 SHiPGeometryService (SHiPGeometryService &&)=delete
 
SHiPGeometryServiceoperator= (SHiPGeometryService &&)=delete
 
const GeoVPhysVol * geoModelWorld () const override
 GeoModel world physical volume (const — tree is immutable after build).
 
G4LogicalVolume * geant4WorldLogical () override
 G4LogicalVolume* for the world.
 
G4LogicalVolume * getLogicalVolume (const std::string &name) const override
 Look up a G4LogicalVolume by name (via G4LogicalVolumeStore).
 
- Public Member Functions inherited from ship::IGeometryService
virtual ~IGeometryService ()=default
 

Static Public Member Functions

static std::unique_ptr< SHiPGeometryServicefromSource ()
 Build geometry from the C++ SHiPGeometryBuilder.
 
static std::unique_ptr< SHiPGeometryServicefromFile (const std::string &dbPath)
 Load geometry from a previously written GeoModel SQLite database.
 

Detailed Description

Concrete implementation of IGeometryService backed by GeoModel.

Two factory functions: SHiPGeometryService::fromSource() — builds via SHiPGeometryBuilder SHiPGeometryService::fromFile(dbPath) — reads from a GeoModel .db file

Constructor & Destructor Documentation

◆ ~SHiPGeometryService()

ship::SHiPGeometryService::~SHiPGeometryService ( )
overridedefault

◆ SHiPGeometryService() [1/2]

ship::SHiPGeometryService::SHiPGeometryService ( const SHiPGeometryService )
delete

◆ SHiPGeometryService() [2/2]

ship::SHiPGeometryService::SHiPGeometryService ( SHiPGeometryService &&  )
delete

Member Function Documentation

◆ fromFile()

std::unique_ptr< SHiPGeometryService > ship::SHiPGeometryService::fromFile ( const std::string &  dbPath)
static

Load geometry from a previously written GeoModel SQLite database.

◆ fromSource()

std::unique_ptr< SHiPGeometryService > ship::SHiPGeometryService::fromSource ( )
static

Build geometry from the C++ SHiPGeometryBuilder.

◆ geant4WorldLogical()

G4LogicalVolume * ship::SHiPGeometryService::geant4WorldLogical ( )
overridevirtual

G4LogicalVolume* for the world.

Triggers GeoModel2G4 on first call. Must be called from within G4VUserDetectorConstruction::Construct().

Implements ship::IGeometryService.

◆ geoModelWorld()

const GeoVPhysVol * ship::SHiPGeometryService::geoModelWorld ( ) const
overridevirtual

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

Implements ship::IGeometryService.

◆ getLogicalVolume()

G4LogicalVolume * ship::SHiPGeometryService::getLogicalVolume ( const std::string &  name) const
overridevirtual

Look up a G4LogicalVolume by name (via G4LogicalVolumeStore).

Valid only after geant4WorldLogical() has been called.

Implements ship::IGeometryService.

◆ operator=() [1/2]

SHiPGeometryService & ship::SHiPGeometryService::operator= ( const SHiPGeometryService )
delete

◆ operator=() [2/2]

SHiPGeometryService & ship::SHiPGeometryService::operator= ( SHiPGeometryService &&  )
delete

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