Geometry

Detector geometry descriptions for HEP are almost universally defined using a hierarchy of fully nested volumes, often saved as a GDML file [Chytracek et al., 2006]. These volumes can be represented as a directional acyclic graph (DAG): the nodes are the geometric elements, and the edges are a geometry placement (which is associated with a transformation and other metadata). In HEP geometries, child nodes may not overlap each other or their enclosing parent [1] volume.

To support multiple geometry applications (including detector descriptions that are not Geant4 hierarchies), and to make the code backend-agnostic for integrating with physics, Celeritas defines abstract geometry concepts indexed as IDs.

VolumeId

A volume corresponds to a physical object that can have multiple instances but is treated (almost always) identically: it has the same shape, material, and associated scoring/sensitive region. In Geant4 this is a “logical volume”, and VecGeom refers to these as “unplaced volumes”. This is simply a node in the graph of volumes.

VolumeInstanceId

A volume instance is a unique placement of a volume in the geometry hierarchy. The instance usually has a transformation to the enclosing volume’s coordinate system. In Geant4 this roughly corresponds to a physical volume. (It corresponds exactly to a G4PVPlacement, but “replica” and “parameterized” volumes use a single physical volume to represent multiple spatial elements. For those, we define a celeritas::GeantPhysicalInstance that is a tuple containing a physical volume and a replica instance.) VecGeom refers to volume instances as placed volumes. In ORANGE for KENO, this would correspond to a hole placement, array element, or local media. The volume instance is an edge in the graph of volumes.

VolumeUniqueInstanceId

A “unique” volume instance refers to a unique region of global space in the geometry model. It is the full directed trail from the root volume node to a node somewhere in the graph, thereby describing all enclosing volumes and their locations. This path can be encoded uniquely as a single integer by pre-calculating the number of direct and indirect children for each node. Celeritas always uses 64-bit integers to store this unique instance ID.

struct GeantPhysicalInstance

Unique placement/replica of a Geant4 physical volume.

This should correspond to a VolumeInstanceId and be a unique instantiation of a Geant4 physical volume (PV). Some Geant4 PVs are “parameterised” or “replica” types, which allows a single instance to be mutated at runtime to form a sort of array. If the pointed-to physical volume is not a replica/parameterised volume, replica is false. Otherwise, it corresponds to the PV’s copy number, which can be used to reconstruct the placed volume instance.

class GeoParamsInterface

Interface class for accessing host geometry metadata.

This class is implemented by OrangeParams to allow navigation with the ORANGE geometry implementation, VecgeomParams for using VecGeom, and GeantGeoParams for testing with the Geant4-provided navigator.

Subclassed by celeritas::GeantGeoParams, celeritas::GeoParamsSurfaceInterface, celeritas::VecgeomParams