Celeritas 0.7.0-dev.79+develop.b3dc2e108
|
Map a string or Geant4 volume pointer to a volume ID. More...
#include <VolumeIdBuilder.hh>
Public Types | |
Type aliases | |
using | G4LV = G4LogicalVolume |
Public Member Functions | |
VolumeIdBuilder () | |
Construct from global geometry. | |
VolumeIdBuilder (VolumeParams const *, GeantGeoParams const *) | |
Construct using geant4 params and/or volume params. | |
VolumeId | operator() (std::string const &s) const |
Map from a string using VolumeParams. | |
VolumeId | operator() (Label const &lab) const |
Map from a label using VolumeParams. | |
VolumeId | operator() (G4LogicalVolume const *lv) const |
Map from Geant4 volume pointer using geant_geo. | |
Map a string or Geant4 volume pointer to a volume ID.
This std::visit
-compatible class will convert input types to a canonical volume ID depending on what metadata (constructed Geant4 geometry, volume parameters) are available. A "null" ID can be returned (and warning/error message emitted) if the mapping fails.
This helper class should only have temporary scope.
|
inline |
Construct using geant4 params and/or volume params.
If both are null, this class will be nonfunctional.