Geant4 geometry¶
Celeritas defines mappings to the underlying Geant4 geometry objects for integration in the rest of the code base. There is limited support for executing the main simulation engine using Geant4 navigation states, but this class is to be used as an interface between the Celeritas indexing and an in-memory Geant4 geometry.
-
class GeantGeoParams : public celeritas::GeoParamsInterface, public celeritas::ParamsDataInterface<GeantGeoParamsData>¶
Shared Geant4 geometry model wrapper.
This can be constructed directly by loading a GDML file, or in-memory using an existing physical volume. The
make_model_input
function returns the geometry hierarchy including surface definitions for optical physics.The
VolumeId
used by Celeritas is equal to the index of aG4LogicalVolume
in theG4LogicalVolumeStore
. Due to potential resetting of the geometry, the “volume instance ID” for the logical volume may be offset from this index.Analogously, the
G4VPhysicalVolume
is equivalent to the index in its store. Due to the way Geant4 represents “parameterised” and “replicated” placements, a single PV may correspond to multiple spatial placements and is disambiguated withReplicaId
, which corresponds to the PV’s “copy
number”.
Each
SurfaceId
maps to aG4LogicalSurface
instance, which is ether aG4LogicalBorderSurface
(an “interface” surface between two volume instances) or aG4LogicalSkinSurface
(a “boundary” surrounding a single logical volume). To ensure reproducible surface IDs across runs, we put boundaries before interfaces, and sort within each set by volume IDs (not by Geant4 object pointers, which is what the Geant4 implementation stores in a table). Surface labels are accessed via the SurfaceParams object, which can be created by the model input returned by this class.