|
Celeritas 0.7+28f01d9
|
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 Types inherited from celeritas::ParamsDataInterface< VolumeParamsData > | |
| using | HostRef = HostCRef< VolumeParamsData > |
| using | DeviceRef = DeviceCRef< VolumeParamsData > |
Public Member Functions | |
| VolumeParams (inp::Volumes const &) | |
| Construct from input. | |
| VolumeParams () | |
| Construct with no volumes, often for unit testing. | |
| VolumeParams (VolumeParams const &)=delete | |
| VolumeParams & | operator= (VolumeParams const &)=delete |
| VolumeParams (VolumeParams &&)=default | |
| VolumeParams & | operator= (VolumeParams &&)=default |
| bool | empty () const |
| Empty if no volumes are present (e.g., ORANGE debugging) | |
| VolumeId | world () const |
| World volume. | |
| VolumeId::size_type | num_volumes () const |
| Depth of the volume DAG. | |
| VolumeInstanceId::size_type | num_volume_instances () const |
| Number of volume instances. | |
| vol_level_uint | num_volume_levels () const |
| Depth of the volume DAG (a world without children is 1) | |
| VolumeMap const & | volume_labels () const |
| Get volume metadata. | |
| VolInstMap const & | volume_instance_labels () const |
| AllVolumesView | view () const |
| Construct a device-compatible view of all volume data. | |
| VolumeView | get (VolumeId v_id) const |
| Construct a lightweight view for accessing volume properties. | |
| SpanVolInst | children (VolumeId v_id) const |
| Get the child instance edges from a volume. | |
| VolumeId | volume (VolumeInstanceId vi_id) const |
| Get the volume being instantiated (outgoing node). | |
| SpanVolInst | parents (VolumeId v_id) const |
| GeoMatId | material (VolumeId v_id) const |
Data interface | |
| HostRef const & | host_ref () const final |
| Access volume graph data on the host. | |
| DeviceRef const & | device_ref () const final |
| Access volume graph data on the device. | |
Public Member Functions inherited from celeritas::ParamsDataInterface< VolumeParamsData > | |
| VolumeParamsData< Ownership::const_reference, M > const & | ref () const |
| VolumeParamsData< Ownership::const_reference, M > const & | ref () const |
| Dispatch a "ref" call to host or device data. | |
Additional Inherited Members | |
Protected Member Functions inherited from celeritas::ParamsDataInterface< VolumeParamsData > | |
| ParamsDataInterface (ParamsDataInterface const &)=default | |
| ParamsDataInterface (ParamsDataInterface &&)=default | |
| ParamsDataInterface & | operator= (ParamsDataInterface const &)=default |
| ParamsDataInterface & | operator= (ParamsDataInterface &&)=default |
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.
Label-based lookup (volume and volume instance names) is provided through the volume_labels and volume_instance_labels accessors. Graph properties (material, connectivity, world) are stored in the underlying VolumeParamsData and accessed efficiently via VolumeView.
Construction requirements:
|
inlinefinalvirtual |
Access volume graph data on the device.
Implements celeritas::ParamsDataInterface< VolumeParamsData >.
|
inlinefinalvirtual |
Access volume graph data on the host.
Implements celeritas::ParamsDataInterface< VolumeParamsData >.
get instead
|
inline |
Depth of the volume DAG (a world without children is 1)
Depth of the volume DAG.
get instead