Celeritas 0.6.0-rc.2.10+develop.de0a3a05
|
Load a GDML file into memory. More...
#include <GeantGdmlLoader.hh>
Classes | |
struct | Options |
struct | Result |
Public Types | |
enum class | PointerTreatment { ignore , truncate , remove } |
How to handle pointers in volume names. More... | |
Type aliases | |
using | MapDetectors = std::multimap< std::string, G4LogicalVolume * > |
Public Member Functions | |
GeantGdmlLoader (Options const &opts) | |
Construct with options. | |
GeantGdmlLoader () | |
Construct with defaults. | |
Result | operator() (std::string const &filename) const |
Load a gdml input file, creating a pointer owned by Geant4. | |
Load a GDML file into memory.
The pointer treatment gives three options:
ignore
leaves names as they are imported by Geant4's GDML reader, which strips them from material/region names but leaves solid/logical/physical pointers in place.truncate
lets the Geant4 GDML remove the pointers, which cuts everything after 0x
including suffixes like _refl
added during volume construction.remove
uses a regular expression to remove pointers from volume names.The detectors
option reads auxiliary
tags in the structure
that have auxtype=SensDet
and returns a multimap of strings to volume pointers.
Load a gdml input file, creating a pointer owned by Geant4.
Geant4's constructors for physical/logical volumes register this
pointers in the "volume stores" which can be cleared with celeritas::reset_geant_geometry
.
Note that material and element names (at least as of Geant4@11.0) are always stripped: only volumes and solids keep their extension.