Celeritas 0.6.0-129+develop.846910afa
Loading...
Searching...
No Matches
Public Member Functions | List of all members
celeritas::OrangeParams Class Referencefinal

Persistent model data for an ORANGE geometry. More...

#include <OrangeParams.hh>

Inheritance diagram for celeritas::OrangeParams:
Inheritance graph
[legend]

Public Types

Type aliases
using SurfaceMap = LabelIdMultiMap< ImplSurfaceId >
 
using UniverseMap = LabelIdMultiMap< UniverseId >
 
using SPConstVolumes = std::shared_ptr< VolumeParams const >
 
- Public Types inherited from celeritas::GeoParamsInterface
using SpanConstVolumeId = Span< ImplVolumeId const >
 
using ImplVolumeMap = LabelIdMultiMap< ImplVolumeId >
 
- Public Types inherited from celeritas::ParamsDataInterface< OrangeParamsData >
using HostRef = HostCRef< OrangeParamsData >
 
using DeviceRef = DeviceCRef< OrangeParamsData >
 

Public Member Functions

 OrangeParams (OrangeInput &&input)
 Advanced usage: construct from explicit host data.
 
 OrangeParams (OrangeInput &&input, SPConstVolumes &&volumes)
 Advanced usage: construct from explicit host data and volumes.
 
 ~OrangeParams () final
 Default destructor to define vtable externally.
 
 CELER_DELETE_COPY_MOVE (OrangeParams)
 
bool supports_safety () const final
 Whether safety distance calculations are accurate and precise.
 
BBox constbbox () const final
 Outer bounding box of geometry.
 
size_type max_depth () const
 Maximum universe depth.
 
inp::Model make_model_input () const final
 Create model parameters corresponding to our internal representation.
 
SurfaceMap constsurfaces () const
 Get surface metadata.
 
UniverseMap constuniverses () const
 Get universe metadata.
 
ImplVolumeMap constimpl_volumes () const final
 Get volume metadata.
 
ImplVolumeId find_volume (G4LogicalVolume const *volume) const final
 Locate the volume ID corresponding to a Geant4 volume.
 
GeantPhysicalInstance id_to_geant (VolumeInstanceId vol_id) const final
 Get the Geant4 physical volume corresponding to a volume instance ID.
 
VolumeId volume_id (ImplVolumeId) const final
 Get the canonical volume IDs corresponding to an implementation volume.
 
VolumeInstanceId volume_instance_id (ImplVolumeId) const
 Get the canonical volume instance corresponding to an implementation volume.
 
HostRef consthost_ref () const final
 Reference to CPU geometry data.
 
DeviceRef constdevice_ref () const final
 Reference to managed GPU geometry data.
 
- Public Member Functions inherited from celeritas::GeoParamsInterface
virtual ~GeoParamsInterface ()=0
 Default virtual destructor.
 
- Public Member Functions inherited from celeritas::ParamsDataInterface< OrangeParamsData >
OrangeParamsData< Ownership::const_reference, M > const & ref () const
 
OrangeParamsData< Ownership::const_reference, M > const & ref () const
 Dispatch a "ref" call to host or device data.
 

Static Public Member Functions

Static constructor helpers
Todo:
: move these to a "model" abstraction that loads/emits geometry, materials, volumes?
static std::shared_ptr< OrangeParamsfrom_gdml (std::string const &filename)
 Build by loading a GDML file.
 
static std::shared_ptr< OrangeParamsfrom_geant (std::shared_ptr< GeantGeoParams const > const &geo, SPConstVolumes volumes)
 Build from a Geant4 world.
 
static std::shared_ptr< OrangeParamsfrom_geant (std::shared_ptr< GeantGeoParams const > const &geo)
 Build from a Geant4 world (no volumes available?).
 
static std::shared_ptr< OrangeParamsfrom_json (std::string const &filename)
 Build from a JSON input.
 

Additional Inherited Members

- Protected Member Functions inherited from celeritas::GeoParamsInterface
 CELER_DEFAULT_COPY_MOVE (GeoParamsInterface)
 
- Protected Member Functions inherited from celeritas::ParamsDataInterface< OrangeParamsData >
 CELER_DEFAULT_COPY_MOVE (ParamsDataInterface)
 

Detailed Description

Persistent model data for an ORANGE geometry.

This class initializes and manages the data used by ORANGE (surfaces, volumes) and provides a host-based interface for them.

Constructor & Destructor Documentation

◆ ~OrangeParams()

celeritas::OrangeParams::~OrangeParams ( )
finaldefault

Default destructor to define vtable externally.

Needed due to a buggy LLVM optimization that causes dynamic-casts in downstream libraries to fail: see https://github.com/celeritas-project/celeritas/pull/1436 .

Member Function Documentation

◆ bbox()

BBox const & celeritas::OrangeParams::bbox ( ) const
inlinefinalvirtual

Outer bounding box of geometry.

Implements celeritas::GeoParamsInterface.

◆ device_ref()

DeviceRef const & celeritas::OrangeParams::device_ref ( ) const
inlinefinalvirtual

Reference to managed GPU geometry data.

Implements celeritas::ParamsDataInterface< OrangeParamsData >.

◆ find_volume()

ImplVolumeId celeritas::OrangeParams::find_volume ( G4LogicalVolume const volume) const
inlinefinalvirtual

Locate the volume ID corresponding to a Geant4 volume.

Todo:
Replace with GeantGeoParams + VolumeId

Implements celeritas::GeoParamsInterface.

◆ from_gdml()

std::shared_ptr< OrangeParams > celeritas::OrangeParams::from_gdml ( std::string const filename)
static

Build by loading a GDML file.

This mode is incompatible with having an existing run manager.

◆ host_ref()

HostRef const & celeritas::OrangeParams::host_ref ( ) const
inlinefinalvirtual

Reference to CPU geometry data.

Implements celeritas::ParamsDataInterface< OrangeParamsData >.

◆ id_to_geant()

GeantPhysicalInstance celeritas::OrangeParams::id_to_geant ( VolumeInstanceId  vol_id) const
inlinefinalvirtual

Get the Geant4 physical volume corresponding to a volume instance ID.

Todo:
Implement using g4org::Converter

Implements celeritas::GeoParamsInterface.

◆ impl_volumes()

auto celeritas::OrangeParams::impl_volumes ( ) const
inlinefinalvirtual

Get volume metadata.

Implements celeritas::GeoParamsInterface.

◆ make_model_input()

inp::Model celeritas::OrangeParams::make_model_input ( ) const
finalvirtual

Create model parameters corresponding to our internal representation.

This currently just maps volumes to volume instances to allow tests to pass when Geant4 is disabled and the real volume hierarchy is unavailable.

Implements celeritas::GeoParamsInterface.

◆ supports_safety()

bool celeritas::OrangeParams::supports_safety ( ) const
inlinefinalvirtual

Whether safety distance calculations are accurate and precise.

Implements celeritas::GeoParamsInterface.

◆ volume_id()

VolumeId celeritas::OrangeParams::volume_id ( ImplVolumeId  iv_id) const
inlinefinalvirtual

Get the canonical volume IDs corresponding to an implementation volume.

Implements celeritas::GeoParamsInterface.

◆ volume_instance_id()

VolumeInstanceId celeritas::OrangeParams::volume_instance_id ( ImplVolumeId  iv_id) const
inline

Get the canonical volume instance corresponding to an implementation volume.

This may be null if the local volume corresponds to a "background" volume or "outside".


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