ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
detray::test::material_validation_config< algebra_t > Struct Template Reference

Configuration for a detector scan test. More...

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

Inheritance diagram for detray::test::material_validation_config< algebra_t >:
[legend]
Collaboration diagram for detray::test::material_validation_config< algebra_t >:
[legend]

Public Types

using base_type = detray::test::configuration<scalar_type>
 Base test configuration type.
using scalar_type = dscalar<algebra_t>
 Scalar type used by the validation.
using vector3_type = dvector3D<algebra_t>
 Three-dimensional vector type used by the validation.

Public Member Functions

const std::string & name () const
 GettersGet the test name.
vecmem::memory_resource * device_mr () const
 Get the device memory resource.
const std::string & material_file () const
 Get the material trace file name.
std::size_t n_tracks () const
 Get the maximum number of test tracks.
scalar_type relative_error () const
 Get the allowed relative discrepancy.
material_validation_config & name (const std::string &n)
 SettersSet the test name.
material_validation_config & device_mr (vecmem::memory_resource *mr)
 Set the device memory resource.
material_validation_config & material_file (const std::string &f)
 Set the material trace file name.
material_validation_config & n_tracks (std::size_t n)
 Set the maximum number of test tracks.
material_validation_config & relative_error (scalar_type re)
 Set the allowed relative discrepancy.
Public Member Functions inherited from detray::test::configuration< dscalar< algebra_t > >
configuration & tol (scalar_t t)
 SettersSet the tolerance for floating point comparisons.
propagation::config & propagation ()
 Get the propagation configuration.

Public Attributes

vecmem::memory_resource * m_dev_mr {nullptr}
 Vecmem memory resource for the device allocations.
std::string m_material_file {"navigation_material_trace"}
 Name of the output file, containing the complete ray material traces.
std::size_t m_n_tracks {detray::detail::invalid_value<std::size_t>()}
 The maximal number of test tracks to run.
std::string m_name {"material_validation"}
 Name of the test.
scalar_type m_rel_error {0.001f}
 Allowed relative discrepancy between truth and navigation material.
Public Attributes inherited from detray::test::configuration< dscalar< algebra_t > >
scalar_t m_tolerance
 General testingTolerance to compare two floating point values.
scalar_t inf
 Shorthand for infinity.
scalar_t epsilon
 Shorthand for the floating point epsilon.
propagation::config m_prop_cfg
 Propagation.

Detailed Description

template<concepts::algebra algebra_t>
struct detray::test::material_validation_config< algebra_t >

Configuration for a detector scan test.

Member Function Documentation

◆ device_mr() [1/2]

template<concepts::algebra algebra_t>
vecmem::memory_resource * detray::test::material_validation_config< algebra_t >::device_mr ( ) const

Get the device memory resource.

Returns
The device memory resource.

◆ device_mr() [2/2]

template<concepts::algebra algebra_t>
material_validation_config & detray::test::material_validation_config< algebra_t >::device_mr ( vecmem::memory_resource * mr)

Set the device memory resource.

Parameters
mrMemory resource for device allocations.
Returns
This configuration.

◆ material_file() [1/2]

template<concepts::algebra algebra_t>
const std::string & detray::test::material_validation_config< algebra_t >::material_file ( ) const

Get the material trace file name.

Returns
The material trace file name.

◆ material_file() [2/2]

template<concepts::algebra algebra_t>
material_validation_config & detray::test::material_validation_config< algebra_t >::material_file ( const std::string & f)

Set the material trace file name.

Parameters
fNew file name.
Returns
This configuration.

◆ n_tracks() [1/2]

template<concepts::algebra algebra_t>
std::size_t detray::test::material_validation_config< algebra_t >::n_tracks ( ) const

Get the maximum number of test tracks.

Returns
The maximum number of test tracks.

◆ n_tracks() [2/2]

template<concepts::algebra algebra_t>
material_validation_config & detray::test::material_validation_config< algebra_t >::n_tracks ( std::size_t n)

Set the maximum number of test tracks.

Parameters
nNumber of tracks.
Returns
This configuration.

◆ name() [1/2]

template<concepts::algebra algebra_t>
const std::string & detray::test::material_validation_config< algebra_t >::name ( ) const

GettersGet the test name.

Returns
The configured test name.

◆ name() [2/2]

template<concepts::algebra algebra_t>
material_validation_config & detray::test::material_validation_config< algebra_t >::name ( const std::string & n)

SettersSet the test name.

Parameters
nNew test name.
Returns
This configuration.

◆ relative_error() [1/2]

template<concepts::algebra algebra_t>
scalar_type detray::test::material_validation_config< algebra_t >::relative_error ( ) const

Get the allowed relative discrepancy.

Returns
The allowed relative discrepancy.

◆ relative_error() [2/2]

template<concepts::algebra algebra_t>
material_validation_config & detray::test::material_validation_config< algebra_t >::relative_error ( scalar_type re)

Set the allowed relative discrepancy.

Parameters
reRelative discrepancy.
Returns
This configuration.