Celeritas 0.6.0-rc.2.10+develop.de0a3a05
|
Templated base class for loading geometry. More...
#include <GenericGeoTestBase.hh>
Public Types | |
Type aliases | |
using | SPConstGeo = std::shared_ptr< G const > |
using | GeoTrackView = typename TraitsT::TrackView |
![]() | |
using | TrackingResult = GenericGeoTrackingResult |
using | VolumeStackResult = GenericGeoVolumeStackResult |
using | SPConstGeoInterface = std::shared_ptr< GeoParamsInterface const > |
Public Member Functions | |
void | SetUp () override |
Build geometry during setup. | |
virtual SPConstGeo | build_geometry () |
! Build the geometry (default to from_basename). | |
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 const & | geometry () |
SPConstGeo const & | geometry () 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. | |
![]() | |
std::string | make_unique_filename (std::string_view ext={}) |
Generate test-unique filename. | |
![]() | |
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 const * | g4world () 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. | |
Additional Inherited Members | |
![]() | |
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. | |
![]() | |
static constexpr double | inf = HUGE_VAL |
static constexpr float | inff = HUGE_VALF |
static constexpr double | coarse_eps = 1e-6 |
Templated base class for loading geometry.
G | Geometry host params class, e.g. OrangeParams |
|
virtual |
! Build the geometry (default to from_basename).
Reimplemented in celeritas::test::AllGeoTypedTestBase< HP >, and celeritas::test::OrangeGeoTestBase.
|
finalvirtual |
Access the geometry interface, building if needed.
Implements celeritas::test::GenericGeoTestInterface.
|
finalvirtual |
Get the label for this geometry: Geant4, VecGeom, ORANGE.
Implements celeritas::test::GenericGeoTestInterface.
|
finalvirtual |
Implements celeritas::test::GenericGeoTestInterface.
|
finalvirtual |
Implements celeritas::test::GenericGeoTestInterface.
|
finalvirtual |
Get the volume instance stack at a position.
Implements celeritas::test::GenericGeoTestInterface.