Celeritas 0.6.0-67+develop.47f47c88
|
Define and manage a hierarchy of volumes and instances thereof. More...
#include <VolumeParams.hh>
Public Types | |
Type aliases | |
using | VolumeMap = LabelIdMultiMap< VolumeId > |
using | VolInstMap = LabelIdMultiMap< VolumeInstanceId > |
Public Member Functions | |
VolumeParams (inp::Volumes const &) | |
Construct from input. | |
VolumeId::size_type | num_volumes () const |
Number of volumes. | |
VolumeInstanceId::size_type | num_volume_instances () const |
Number of volume instances. | |
VolumeMap const & | volume_labels () const |
Get volume metadata. | |
VolInstMap const & | volume_instance_labels () const |
Get volume instance metadata. | |
Span< VolumeInstanceId const > | parents (VolumeId vid) const |
Find all instances of a volume (incoming edges). | |
Span< VolumeInstanceId const > | children (VolumeId vid) const |
Get the list of daughter volumes (outgoing edges). | |
GeoMatId | material (VolumeId vid) const |
Get the geometry material of a volume. | |
VolumeId | volume (VolumeInstanceId vid) const |
Get the volume being instantiated (outgoing node). | |
Define and manage a hierarchy of volumes and instances thereof.
See the introduction to the Geometry API section (api_geometry in user manual) for a detailed description of volumes in the detector geometry description. This class abstracts the graph of volumes, relating nodes (VolumeId, aka logical volume) to edges (VolumeInstanceId, aka physical volume) and providing the means to determine the path (VolumeUniqueInstanceId, aka touchable history) of a track state. In conjunction with GeantGeoParams
this allows conversion between the Celeritas geometry implementation and the Geant4 geometry navigation.
Input material IDs are allowed to be null for testing purposes.