SHiP Geometry Service
Framework-agnostic C++20 library wrapping the SHiP GeoModel geometry behind a stable interface.
Loading...
Searching...
No Matches
Classes | Functions
ship Namespace Reference

Classes

class  G4RayScanner
 Straight-line material scanner over a Geant4 geometry. More...
 
class  GeometryThread
 Runs posted tasks on one dedicated thread until destroyed. More...
 
class  IGeometryService
 Framework-agnostic interface to the SHiP detector geometry. More...
 
struct  RayScan
 Result of a ray scan: where the ray entered the world and what it crossed. More...
 
struct  RaySegment
 One material segment along a straight ray, in Geant4 native units (mm). More...
 
class  SHiPGeometryService
 Concrete implementation of IGeometryService backed by GeoModel. More...
 

Functions

GeometryThreadgeometry_thread ()
 The process-wide Geant4 geometry thread, shared by every geometry user (GENIE geometry analyzers, the Geant4 run-manager master) and never torn down (a parked thread at exit is harmless).
 

Function Documentation

◆ geometry_thread()

GeometryThread & ship::geometry_thread ( )

The process-wide Geant4 geometry thread, shared by every geometry user (GENIE geometry analyzers, the Geant4 run-manager master) and never torn down (a parked thread at exit is harmless).

Geant4 MT allows only a single geometry-*creating* thread per process: G4GeomSplitter's slot count is shared across threads while the data array is thread-local, so a second creating thread writes through its still-null array pointer the moment the first thread has grown the shared count (Geant4 bug #2747, verified with the conda Geant4 11.3 build). Defined in the shared library so dlopened plugins all see the same instance.