ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
detray::navigation_validator::surface_stats Struct Reference

Struct that keeps track of the number of encountered/skipped surfaces. More...

#include <detray/test/validation/navigation_validation_utils.hpp>

Public Member Functions

std::size_t n_total () const
 The total number of skipped surfaces.
surface_stats & operator+= (const surface_stats &other)
 Count up.
template<typename sf_descriptor_t>
bool count (const sf_descriptor_t &sf_desc, const bool verbose=true)
 Count a surface depending on its type.
bool count (geometry::identifier geo_id, const bool verbose=true)
 Count a surface by its geometry identifier.

Public Attributes

std::size_t n_passives {0u}
 Number of encountered passive surfaces.
std::size_t n_portals {0u}
 Number of encountered portals.
std::size_t n_sensitives {0u}
 Number of encountered sensitive surfaces.

Detailed Description

Struct that keeps track of the number of encountered/skipped surfaces.

Member Function Documentation

◆ count() [1/2]

template<typename sf_descriptor_t>
bool detray::navigation_validator::surface_stats::count ( const sf_descriptor_t & sf_desc,
const bool verbose = true )

Count a surface depending on its type.

Returns
true of the surface type was recognized
Parameters
sf_descDescriptor of the surface to count.
verboseWhether to log unknown surface types.

◆ count() [2/2]

bool detray::navigation_validator::surface_stats::count ( geometry::identifier geo_id,
const bool verbose = true )

Count a surface by its geometry identifier.

Parameters
geo_idIdentifier of the surface.
verboseWhether to log unknown surface types.
Returns
Whether the surface type was recognized.

◆ n_total()

std::size_t detray::navigation_validator::surface_stats::n_total ( ) const

The total number of skipped surfaces.

Returns
Total number of counted surfaces.

◆ operator+=()

surface_stats & detray::navigation_validator::surface_stats::operator+= ( const surface_stats & other)

Count up.

Parameters
otherStatistics to add.
Returns
This statistics object after addition.