Celeritas 0.7.0-dev.164+develop.929c81eeb
Loading...
Searching...
No Matches
Public Types | 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

using vol_level_uint = VolumeLevelId::size_type
 
Type aliases
using VolumeMap = LabelIdMultiMap< VolumeId >
 
using VolInstMap = LabelIdMultiMap< VolumeInstanceId >
 
using SpanVolInst = Span< VolumeInstanceId const >
 
VolumeVisitor template interface
using VolumeRef = VolumeId
 
using VolumeInstanceRef = VolumeInstanceId
 

Public Member Functions

 VolumeParams (inp::Volumes const &)
 Construct from input.
 
 VolumeParams ()
 Construct with no volumes, often for unit testing.
 
bool empty () const
 Empty if no volumes are present (e.g., ORANGE debugging)
 
VolumeId world () const
 World volume.
 
vol_level_uint num_volume_levels () const
 Depth of the volume DAG (a world without children is 1)
 
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.
 
SpanVolInst parents (VolumeId v_id) const
 Find all instances of a volume (incoming edges).
 
SpanVolInst children (VolumeId v_id) const
 Get the list of daughter volumes (outgoing edges).
 
GeoMatId material (VolumeId v_id) const
 Get the geometry material of a volume.
 
VolumeId volume (VolumeInstanceId vi_id) 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 user-defined volumes, relating nodes (VolumeId, aka logical volume) to edges (VolumeInstanceId, aka physical volume) and providing the means to determine the path (isomorphic to a VolumeUniqueInstanceId, aka touchable history) of a track state. The root of the graph is the world volume, and the level of a volume in the path is the distance to the root: zero for the root volume, one for its direct child, etc. The maximum value of the level in any path is one less than num_volume_levels : an array of VolumeId with that size can represent any path.

In conjunction with GeantGeoParams, this class allows conversion between the Celeritas geometry implementation and the Geant4 geometry navigation.

Construction requirements:


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