Celeritas 0.6.0-rc.2.10+develop.de0a3a05
|
Shared Geant4 geometry model wrapper. More...
#include <GeantGeoParams.hh>
Public Member Functions | |
GeantGeoParams (std::string const &gdml_filename) | |
Construct from a GDML input. | |
GeantGeoParams (G4VPhysicalVolume const *world) | |
Use an existing loaded Geant4 geometry. | |
CELER_DEFAULT_MOVE_DELETE_COPY (GeantGeoParams) | |
~GeantGeoParams () final | |
Clean up on destruction. | |
G4VPhysicalVolume const * | world () const |
Access the world volume. | |
bool | supports_safety () const final |
Whether safety distance calculations are accurate and precise. | |
BBox const & | bbox () const final |
Outer bounding box of geometry. | |
LevelId::size_type | max_depth () const final |
Maximum nested volume instance depth. | |
VolumeMap const & | volumes () const final |
Get volume metadata. | |
VolInstanceMap const & | volume_instances () const final |
Get volume instance metadata. | |
VolumeId | find_volume (G4LogicalVolume const *volume) const final |
Locate the volume ID corresponding to a Geant4 logical volume. | |
GeantPhysicalInstance | id_to_geant (VolumeInstanceId vol_id) const final |
Get the Geant4 physical volume corresponding to a volume instance ID. | |
G4LogicalVolume const * | id_to_geant (VolumeId vol_id) const |
Get the Geant4 logical volume corresponding to a volume ID. | |
VolumeId::size_type | lv_offset () const |
Offset of logical volume ID after reloading geometry. | |
VolumeId::size_type | pv_offset () const |
Offset of physical volume ID after reloading geometry. | |
HostRef const & | host_ref () const final |
Access geometry data on host. | |
DeviceRef const & | device_ref () const final |
No GPU support code. | |
virtual VolumeId | find_volume (G4LogicalVolume const *volume) const=0 |
Get the volume ID corresponding to a Geant4 logical volume. | |
![]() | |
virtual | ~GeoParamsInterface ()=0 |
Default virtual destructor. | |
![]() | |
GeantGeoParamsData< Ownership::const_reference, M > const & | ref () const |
GeantGeoParamsData< Ownership::const_reference, M > const & | ref () const |
Dispatch a "ref" call to host or device data. | |
Additional Inherited Members | |
![]() | |
using | SpanConstVolumeId = Span< VolumeId const > |
using | VolumeMap = LabelIdMultiMap< VolumeId > |
using | VolInstanceMap = LabelIdMultiMap< VolumeInstanceId > |
![]() | |
using | HostRef = HostCRef< GeantGeoParamsData > |
using | DeviceRef = DeviceCRef< GeantGeoParamsData > |
![]() | |
CELER_DEFAULT_COPY_MOVE (GeoParamsInterface) | |
![]() | |
CELER_DEFAULT_COPY_MOVE (ParamsDataInterface) | |
Shared Geant4 geometry model wrapper.
This can be constructed directly by loading a GDML file, or in-memory using an existing physical volume. One "gotcha" is that due to persistent static variables in Geant4, the volume IDs will be offset if a geometry has been loaded and closed previously.
|
explicit |
Construct from a GDML input.
This assumes that Celeritas is driving and will manage Geant4 exceptions etc.
Outer bounding box of geometry.
Implements celeritas::GeoParamsInterface.
|
inlinefinalvirtual |
No GPU support code.
Implements celeritas::ParamsDataInterface< GeantGeoParamsData >.
|
finalvirtual |
Locate the volume ID corresponding to a Geant4 logical volume.
Implements celeritas::GeoParamsInterface.
|
virtual |
Get the volume ID corresponding to a Geant4 logical volume.
Implements celeritas::GeoParamsInterface.
|
inlinefinalvirtual |
Access geometry data on host.
Implements celeritas::ParamsDataInterface< GeantGeoParamsData >.
G4LogicalVolume const * celeritas::GeantGeoParams::id_to_geant | ( | VolumeId | id | ) | const |
Get the Geant4 logical volume corresponding to a volume ID.
If the input volume ID is unassigned, a null pointer will be returned.
|
finalvirtual |
Get the Geant4 physical volume corresponding to a volume instance ID.
Implements celeritas::GeoParamsInterface.
|
inlinefinalvirtual |
Maximum nested volume instance depth.
Implements celeritas::GeoParamsInterface.
|
inlinefinalvirtual |
Whether safety distance calculations are accurate and precise.
Implements celeritas::GeoParamsInterface.
|
inlinefinalvirtual |
Get volume instance metadata.
Volume instances correspond directly to Geant4 physical volumes.
Implements celeritas::GeoParamsInterface.
|
inlinefinalvirtual |
Get volume metadata.
Volumes correspond directly to Geant4 logical volumes.
Implements celeritas::GeoParamsInterface.