Loading [MathJax]/extensions/tex2jax.js
Celeritas 0.6.0-rc.2.13+develop.285b9112
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Classes | Public Member Functions | Static Public Member Functions | List of all members
celeritas::test::OrangeGeoTestBase Class Reference

Test base for loading geometry. More...

#include <OrangeGeoTestBase.hh>

Inheritance diagram for celeritas::test::OrangeGeoTestBase:
Inheritance graph
[legend]

Classes

struct  OneVolInput
 
struct  TwoVolInput
 

Public Types

Type aliases
using HostStateRef = HostRef< OrangeStateData >
 
using HostParamsRef = HostCRef< OrangeParamsData >
 
using Params = OrangeParams
 
using SPConstParams = std::shared_ptr< OrangeParams const >
 
using Initializer_t = GeoTrackInitializer
 
- Public Types inherited from celeritas::test::GenericGeoTestBase< G >
using SPConstGeo = std::shared_ptr< G const >
 
using GeoTrackView = typename TraitsT::TrackView
 
- Public Types inherited from celeritas::test::GenericGeoTestInterface
using TrackingResult = GenericGeoTrackingResult
 
using VolumeStackResult = GenericGeoVolumeStackResult
 
using SPConstGeoInterface = std::shared_ptr< GeoParamsInterface const >
 

Public Member Functions

void SetUp () override
 
void build_geometry (std::string const &filename)
 
void build_geometry (OneVolInput)
 
void build_geometry (TwoVolInput)
 
void build_geometry (UnitInput)
 
Params constparams () const
 Get the data after loading.
 
HostStateRef consthost_state ()
 
HostParamsRef consthost_params () const
 
VolumeId find_volume (std::string const &label) const
 
SurfaceId find_surface (std::string const &label) const
 
std::string id_to_label (UniverseId uid, LocalSurfaceId surfid) const
 
std::string id_to_label (LocalSurfaceId surfid) const
 
std::string id_to_label (UniverseId uid, LocalVolumeId vol_id) const
 
std::string id_to_label (LocalVolumeId vol_id) const
 
void describe (std::ostream &os) const
 
VolumeId::size_type num_volumes () const
 
SPConstGeo build_geometry () override
 ! Build the geometry (default to from_basename).
 
- Public Member Functions inherited from celeritas::test::GenericGeoTestBase< G >
void SetUp () override
 Build geometry during setup.
 
virtual size_type num_track_slots () const
 Maximum number of local track slots.
 
SPConstGeo build_geometry_from_basename ()
 Construct from celeritas test data and "basename" value.
 
SPConstGeo constgeometry ()
 
SPConstGeo constgeometry () const
 
std::string volume_name (GeoTrackView const &geo) const
 Get the name of the current volume.
 
std::string surface_name (GeoTrackView const &geo) const
 Get the name of the current surface if available.
 
std::string all_volume_instance_names (GeoTrackView const &geo) const
 Get the stack of volume instances.
 
GeoTrackView make_geo_track_view (TrackSlotId tsid=TrackSlotId{0})
 Get a host track view.
 
GeoTrackView make_geo_track_view (Real3 const &pos_cm, Real3 dir)
 Get and initialize a single-thread host track view.
 
std::string_view geometry_type () const final
 Get the label for this geometry: Geant4, VecGeom, ORANGE.
 
SPConstGeoInterface geometry_interface () const final
 Access the geometry interface, building if needed.
 
TrackingResult track (Real3 const &pos_cm, Real3 const &dir) final
 
TrackingResult track (Real3 const &pos_cm, Real3 const &dir, int max_step) final
 
VolumeStackResult volume_stack (Real3 const &pos_cm) final
 Get the volume instance stack at a position.
 
- Public Member Functions inherited from celeritas::test::Test
std::string make_unique_filename (std::string_view ext={})
 Generate test-unique filename.
 
- Public Member Functions inherited from celeritas::test::GenericGeoTestInterface
virtual std::string geometry_basename () const
 Get the basename or unique geometry key (defaults to suite name).
 
virtual real_type safety_tol () const
 Get the safety tolerance (defaults to SoftEq tol).
 
virtual real_type bump_tol () const
 Get the threshold for a movement being a "bump".
 
virtual VolumeId::size_type volume_offset () const
 Ignore the first N VolumeId.
 
virtual VolumeInstanceId::size_type volume_instance_offset () const
 Ignore the first N VolumeInstanceId.
 
virtual Constant unit_length () const
 Unit length for "track" testing and other results.
 
virtual G4VPhysicalVolume constg4world () const
 Access the loaded geant4 world (if one exists)
 
std::vector< std::string > get_volume_labels () const
 Get all logical volume labels.
 
std::vector< std::string > get_volume_instance_labels () const
 Get all physical volume labels, including extensions.
 
std::vector< std::string > get_g4pv_labels () const
 Get all Geant4 PV names corresponding to volume instances.
 
std::string_view get_volume_name (VolumeId i) const
 Get the volume name, adjusting for offsets from loading multiple geo.
 

Static Public Member Functions

static std::string senses_to_string (Span< SenseValue const > senses)
 
static std::vector< Sensestring_to_senses (std::string const &s)
 
- Static Public Member Functions inherited from celeritas::test::Test
static std::string test_data_path (std::string_view subdir, std::string_view filename)
 Get the path to a test file at {source}/test/{subdir}/data/{filename}.
 
static std::string genericize_pointers (std::string_view s)
 Replace pointer addresses with 0x0 for improved testability.
 
static bool strict_testing ()
 True if strict testing is required.
 

Additional Inherited Members

- Static Public Attributes inherited from celeritas::test::Test
static constexpr double inf = HUGE_VAL
 
static constexpr float inff = HUGE_VALF
 
static constexpr double coarse_eps = 1e-6
 

Detailed Description

Test base for loading geometry.

Member Function Documentation

◆ build_geometry()

SPConstGeo celeritas::test::OrangeGeoTestBase::build_geometry ( )
overridevirtual

! Build the geometry (default to from_basename).

Reimplemented from celeritas::test::GenericGeoTestBase< G >.


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