Celeritas 0.6.0-dev.115+3b60a5fd
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< SurfaceId >
 
using UniverseMap = LabelIdMultiMap< UniverseId >
 
- Public Types inherited from celeritas::GeoParamsSurfaceInterface
using SurfaceMap = LabelIdMultiMap< SurfaceId >
 
- Public Types inherited from celeritas::GeoParamsInterface
using SpanConstVolumeId = Span< VolumeId const >
 
using VolumeMap = LabelIdMultiMap< VolumeId >
 
using VolInstanceMap = LabelIdMultiMap< VolumeInstanceId >
 
- Public Types inherited from celeritas::ParamsDataInterface< OrangeParamsData >
using HostRef = HostCRef< OrangeParamsData >
 
using DeviceRef = DeviceCRef< OrangeParamsData >
 

Public Member Functions

 OrangeParams (std::string const &filename)
 Construct from a JSON file (if JSON is enabled).
 
 OrangeParams (G4VPhysicalVolume const *)
 Construct in-memory from a Geant4 geometry.
 
 OrangeParams (OrangeInput &&input)
 Advanced usage: construct from explicit host data.
 
 ~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 final
 Maximum universe depth.
 
SurfaceMap constsurfaces () const final
 Get surface metadata.
 
UniverseMap constuniverses () const
 Get universe metadata.
 
VolumeMap constvolumes () const final
 Get volume metadata.
 
VolInstanceMap constvolume_instances () const final
 Get volume instance metadata.
 
VolumeId find_volume (G4LogicalVolume const *volume) const final
 Locate the volume ID corresponding to a Geant4 volume.
 
G4VPhysicalVolume constid_to_pv (VolumeInstanceId vol_id) const final
 Get the Geant4 physical volume corresponding to a volume instance ID.
 
Label constid_to_label (UniverseId univ_id) const
 
UniverseId find_universe (std::string const &name) const
 
UniverseId::size_type num_universes () const
 
HostRef consthost_ref () const final
 Reference to CPU geometry data.
 
DeviceRef constdevice_ref () const final
 Reference to managed GPU geometry data.
 
Label constid_to_label (SurfaceId surf_id) const
 Get the label for a placed volume ID.
 
Label constid_to_label (VolumeId vol_id) const
 Get the label for a placed volume ID.
 
- Public Member Functions inherited from celeritas::GeoParamsSurfaceInterface
 ~GeoParamsSurfaceInterface () override=0
 Default virtual destructor.
 
Label constid_to_label (SurfaceId surf_id) const
 Get the label for a placed volume ID.
 
SurfaceId find_surface (std::string const &name) const
 Get the surface ID corresponding to a unique label name.
 
SurfaceId::size_type num_surfaces () const
 Number of distinct surfaces.
 
Label constid_to_label (VolumeId vol_id) const
 Get the label for a placed volume ID.
 
- Public Member Functions inherited from celeritas::GeoParamsInterface
virtual ~GeoParamsInterface ()=0
 Default virtual destructor.
 
VolumeId::size_type num_volumes () const
 Number of volumes.
 
Label constid_to_label (VolumeId vol_id) const
 Get the label for a placed volume ID.
 
VolumeId find_volume (std::string const &name) const
 Get the volume ID corresponding to a unique name.
 
VolumeId find_volume (Label const &label) const
 Get the volume ID corresponding to a unique label.
 
VolumeId find_volume (char const *name) const
 Get the volume ID corresponding to a unique name.
 
SpanConstVolumeId find_volumes (std::string const &name) const
 Get the volume ID corresponding to a unique name.
 
- 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.
 

Additional Inherited Members

- Protected Member Functions inherited from celeritas::GeoParamsSurfaceInterface
 CELER_DEFAULT_COPY_MOVE (GeoParamsSurfaceInterface)
 
- 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() [1/3]

celeritas::OrangeParams::OrangeParams ( std::string const filename)
explicit

Construct from a JSON file (if JSON is enabled).

The JSON format is defined by the SCALE ORANGE exporter (not currently distributed).

◆ OrangeParams() [2/3]

celeritas::OrangeParams::OrangeParams ( G4VPhysicalVolume const world)
explicit

Construct in-memory from a Geant4 geometry.

TODO: expose options? Fix volume mappings?

◆ OrangeParams() [3/3]

celeritas::OrangeParams::OrangeParams ( OrangeInput &&  input)
explicit

Advanced usage: construct from explicit host data.

Volume and surface labels must be unique for the time being.

◆ ~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()

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

Locate the volume ID corresponding to a Geant4 volume.

Todo:
Implement using g4org::Converter

Implements celeritas::GeoParamsInterface.

◆ host_ref()

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

Reference to CPU geometry data.

Implements celeritas::ParamsDataInterface< OrangeParamsData >.

◆ id_to_pv()

G4VPhysicalVolume const * celeritas::OrangeParams::id_to_pv ( VolumeInstanceId  vol_id) const
inlinefinalvirtual

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

Todo:
Implement using g4org::Converter

Implements celeritas::GeoParamsInterface.

◆ max_depth()

size_type celeritas::OrangeParams::max_depth ( ) const
inlinefinalvirtual

Maximum universe depth.

Implements celeritas::GeoParamsInterface.

◆ supports_safety()

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

Whether safety distance calculations are accurate and precise.

Implements celeritas::GeoParamsInterface.

◆ surfaces()

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

Get surface metadata.

Implements celeritas::GeoParamsSurfaceInterface.

◆ volume_instances()

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

Get volume instance metadata.

Implements celeritas::GeoParamsInterface.

◆ volumes()

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

Get volume metadata.

Implements celeritas::GeoParamsInterface.


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