Celeritas 0.7.0-dev.168+develop.6e17e5869
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 WrappedGeoTrack = WrappedGeoTrackView< typename TraitsT::TrackView >
 
- Public Types inherited from celeritas::test::GenericGeoTestInterface
using TrackingResult = GenericGeoTrackingResult
 
using VolumeStackResult = GenericGeoVolumeStackResult
 
using GeoTrackView = GeoTrackInterface< real_type >
 
using UPGeoTrack = std::unique_ptr< GeoTrackView >
 
- Public Types inherited from celeritas::test::LazyGeantGeoManager
using SPConstGeoI = std::shared_ptr< GeoParamsInterface const >
 
using SPConstGeantGeo = std::shared_ptr< GeantGeoParams const >
 
using SPConstVolumes = std::shared_ptr< VolumeParams const >
 

Public Member Functions

 GenericGeoTestBase ()
 Default constructor.
 
virtual ~GenericGeoTestBase ()
 Anchored destructor.
 
 CELER_DELETE_COPY_MOVE (GenericGeoTestBase)
 
void SetUp () override
 Build geometry during setup.
 
virtual SPConstGeo build_geometry () const
 Build the geometry, defaulting to using the lazy Geant4 construction.
 
SPConstGeo constgeometry ()
 
SPConstGeo constgeometry () const
 
WrappedGeoTrack make_geo_track_view (TrackSlotId tsid=TrackSlotId{0})
 Get a host track view.
 
WrappedGeoTrack make_geo_track_view (Real3 const &pos_cm, Real3 dir)
 Get and initialize a single-thread host track view.
 
UPGeoTrack make_geo_track_view_interface () final
 Create a track view.
 
std::string_view geometry_type () const final
 Get the label for this geometry: Geant4, VecGeom, ORANGE.
 
GeoParamsInterface constgeometry_interface () const final
 Access the geometry interface, building if needed.
 
- Public Member Functions inherited from celeritas::test::Test
virtual std::string make_unique_filename (std::string_view ext)
 Generate test-unique filename.
 
std::string make_unique_filename ()
 
- Public Member Functions inherited from celeritas::test::GenericGeoTestInterface
TrackingResult track (Real3 const &pos_cm, Real3 const &dir)
 Track until exiting the geometry.
 
VolumeStackResult volume_stack (Real3 const &pos_cm)
 Get the volume instance stack at a position.
 
std::string_view gdml_basename () const override
 Return test suite name by default.
 
virtual Constant unit_length () const
 Unit length for "track" testing and other results (defaults to cm).
 
virtual size_type num_track_slots () const
 
virtual bool supports_surface_normal () const
 Whether surface normals work for the current geometry/test.
 
virtual GenericGeoTrackingTolerance tracking_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".
 
GeoTrackInitializer make_initializer (Real3 const &pos_unit, Real3 const &dir) const
 Construct an initializer with correct scaling/normalization.
 
std::string volume_name (GeoTrackView const &geo) const
 Get the name of the current volume.
 
std::string unique_volume_name (GeoTrackView const &geo) const
 Get the stack of volume instances.
 
- Public Member Functions inherited from celeritas::test::LazyGeantGeoManager
virtual SPConstGeantGeo build_geant_geo (std::string const &filename) const
 Build a Geant4 geometry.
 
std::string constcached_gdml_basename () const
 Access the basename of the geometry that's currently cached.
 
SPConstGeoI lazy_geo () const
 Construct a geometry for the first time.
 
SPConstGeantGeo geant_geo () const
 Access persistent geant geometry after construction.
 
SPConstVolumes volumes () const
 Access volumes from built geometry or geant4 model.
 

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 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 fine_eps = 1e-12
 
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
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 ( ) const
virtual

Build the geometry, defaulting to using the lazy Geant4 construction.

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

◆ make_geo_track_view_interface()

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

Create a track view.

Implements celeritas::test::GenericGeoTestInterface.


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