Celeritas 0.6.0-67+develop.47f47c88
Loading...
Searching...
No Matches
Public Member Functions | List of all members
celeritas::VolumeParams Class Reference

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 constvolume_labels () const
 Get volume metadata.
 
VolInstMap constvolume_instance_labels () const
 Get volume instance metadata.
 
Span< VolumeInstanceId constparents (VolumeId vid) const
 Find all instances of a volume (incoming edges).
 
Span< VolumeInstanceId constchildren (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).
 

Detailed Description

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.

Todo:
We should be able to easily move the ID-related methods to a GPU-friendly view rather than just this metadata class. It's not needed at the moment though.

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