Celeritas 0.6.0-rc.2.10+develop.de0a3a05
Loading...
Searching...
No Matches
Public Member Functions | List of all members
celeritas::test::GenericGeoTestBase< G > Class Template Reference

Templated base class for loading geometry. More...

#include <GenericGeoTestBase.hh>

Inheritance diagram for celeritas::test::GenericGeoTestBase< G >:
Inheritance graph
[legend]

Public Types

Type aliases
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
 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 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.
 

Additional Inherited Members

- 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.
 
- 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

template<class G>
class celeritas::test::GenericGeoTestBase< G >

Templated base class for loading geometry.

Template Parameters
GGeometry host params class, e.g. OrangeParams
See also
AllGeoTypedTestBase
Note
This class is instantiated in XTestBase.cc for geometry type X.

Member Function Documentation

◆ build_geometry()

template<class HP >
auto celeritas::test::GenericGeoTestBase< HP >::build_geometry ( )
virtual

! Build the geometry (default to from_basename).

Reimplemented in celeritas::test::AllGeoTypedTestBase< HP >, and celeritas::test::OrangeGeoTestBase.

◆ geometry_interface()

template<class HP >
auto celeritas::test::GenericGeoTestBase< HP >::geometry_interface ( ) const
finalvirtual

Access the geometry interface, building if needed.

Implements celeritas::test::GenericGeoTestInterface.

◆ geometry_type()

template<class HP >
std::string_view celeritas::test::GenericGeoTestBase< HP >::geometry_type ( ) const
finalvirtual

Get the label for this geometry: Geant4, VecGeom, ORANGE.

Implements celeritas::test::GenericGeoTestInterface.

◆ track() [1/2]

template<class HP >
auto celeritas::test::GenericGeoTestBase< HP >::track ( Real3 const pos_cm,
Real3 const dir 
)
finalvirtual

◆ track() [2/2]

template<class HP >
auto celeritas::test::GenericGeoTestBase< HP >::track ( Real3 const pos_cm,
Real3 const dir,
int  max_step 
)
finalvirtual

◆ volume_stack()

template<class HP >
auto celeritas::test::GenericGeoTestBase< HP >::volume_stack ( Real3 const pos_cm)
finalvirtual

Get the volume instance stack at a position.

Implements celeritas::test::GenericGeoTestInterface.


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