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

Configuration for a detector scan test. More...

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

Inheritance diagram for detray::test::navigation_validation_config< algebra_t >:
[legend]
Collaboration diagram for detray::test::navigation_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.
const std::string & intersection_file () const
 Get the intersection input file name.
const std::string & track_param_file () const
 Get the track parameter input file name.
std::size_t n_tracks () const
 Get the maximum number of tracks.
pdg_particle< scalar_type > ptc_hypothesis () const
 Get the particle hypothesis.
navigation::direction navigation_direction () const
 Get the navigation direction.
bool collect_sensitives_only () const
 Check whether only sensitive surfaces are collected.
bool display_svg () const
 Check whether SVG output is enabled.
bool display_only_missed () const
 Check whether SVG output is limited to missed surfaces.
bool fail_on_diff () const
 Check whether validation stops at the first difference.
bool verbose () const
 Check whether verbose output is enabled.
darray< scalar_type, 2 > p_range () const
 Get the configured momentum range.
const vector3_type & B_vector () const
 Get the magnetic field vector.
const auto & svg_style () const
 Get the SVG style.
navigation_validation_config & name (const std::string &n)
 SettersSet the test name.
navigation_validation_config & intersection_file (const std::string &f)
 Set the intersection input file name.
navigation_validation_config & track_param_file (const std::string &f)
 Set the track parameter input file name.
navigation_validation_config & ptc_hypothesis (pdg_particle< scalar_type > pdg_ptc)
 Set the particle hypothesis.
navigation_validation_config & navigation_direction (const navigation::direction dir)
 Set the navigation direction.
navigation_validation_config & collect_sensitives_only (const bool only_sensitives)
 Set whether to collect only sensitive surfaces.
navigation_validation_config & display_svg (const bool do_display)
 Set whether SVG output is enabled.
navigation_validation_config & display_only_missed (const bool only_missed)
 Set whether SVG output is limited to missed surfaces.
navigation_validation_config & fail_on_diff (const bool fail_on_diff)
 Set whether validation stops at the first difference.
navigation_validation_config & verbose (const bool v)
 Set whether verbose output is enabled.
navigation_validation_config & n_tracks (std::size_t n)
 Set the maximum number of tracks.
navigation_validation_config & p_range (const darray< scalar_type, 2 > pr)
 Set the momentum range.
navigation_validation_config & B_vector (const vector3_type &B)
 Set the magnetic field vector.
navigation_validation_config & B_vector (const scalar_type B0, const scalar_type B1, const scalar_type B2)
 Set the magnetic field vector components.
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

vector3_type m_B
 B-field vector for helix.
bool m_collect_sensitives_only {false}
 Collect only the sensitive intersections for comparison.
bool m_display_only_missed {false}
 Drop an SVG only if navigation missed a surface.
bool m_display_svg {false}
 Toggle SVG display.
bool m_fail_on_diff {true}
 Whether to stop execution at the first error.
std::string m_intersection_file {"truth_intersections.csv"}
 Name of the input file, containing the complete ray scan traces.
std::size_t m_n_tracks {detray::detail::invalid_value<std::size_t>()}
 The maximum number of test tracks to run.
std::string m_name {"navigation_validation"}
 Name of the test.
navigation::direction m_nav_dir {navigation::direction::e_forward}
 Navigation direction.
darray< scalar_type, 2 > m_p_range
 Configured momentum range of the test sample (only needed to generate correct file names).
pdg_particle< scalar_type > m_ptc_hypo {muon<scalar_type>()}
 Particle hypothesis (truth particle from simulation).
detray::svgtools::styling::style m_style
 Visualization style to be applied to the SVGs.
std::string m_track_param_file {"truth_trk_parameters.csv"}
 Name of the input file containing track parameters.
bool m_verbose {true}
 Verbosity of the console output.
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::navigation_validation_config< algebra_t >

Configuration for a detector scan test.

Member Function Documentation

◆ B_vector() [1/3]

template<concepts::algebra algebra_t>
const vector3_type & detray::test::navigation_validation_config< algebra_t >::B_vector ( ) const

Get the magnetic field vector.

Returns
The magnetic field vector.

◆ B_vector() [2/3]

template<concepts::algebra algebra_t>
navigation_validation_config & detray::test::navigation_validation_config< algebra_t >::B_vector ( const scalar_type B0,
const scalar_type B1,
const scalar_type B2 )

Set the magnetic field vector components.

Parameters
B0First field component.
B1Second field component.
B2Third field component.
Returns
This configuration.

◆ B_vector() [3/3]

template<concepts::algebra algebra_t>
navigation_validation_config & detray::test::navigation_validation_config< algebra_t >::B_vector ( const vector3_type & B)

Set the magnetic field vector.

Parameters
BNew field vector.
Returns
This configuration.

◆ collect_sensitives_only() [1/2]

template<concepts::algebra algebra_t>
bool detray::test::navigation_validation_config< algebra_t >::collect_sensitives_only ( ) const

Check whether only sensitive surfaces are collected.

Returns
Whether only sensitive surfaces are collected.

◆ collect_sensitives_only() [2/2]

template<concepts::algebra algebra_t>
navigation_validation_config & detray::test::navigation_validation_config< algebra_t >::collect_sensitives_only ( const bool only_sensitives)

Set whether to collect only sensitive surfaces.

Parameters
only_sensitivesWhether to restrict collection.
Returns
This configuration.

◆ display_only_missed() [1/2]

template<concepts::algebra algebra_t>
bool detray::test::navigation_validation_config< algebra_t >::display_only_missed ( ) const

Check whether SVG output is limited to missed surfaces.

Returns
Whether SVG output is limited to missed surfaces.

◆ display_only_missed() [2/2]

template<concepts::algebra algebra_t>
navigation_validation_config & detray::test::navigation_validation_config< algebra_t >::display_only_missed ( const bool only_missed)

Set whether SVG output is limited to missed surfaces.

Parameters
only_missedWhether to display only misses.
Returns
This configuration.

◆ display_svg() [1/2]

template<concepts::algebra algebra_t>
bool detray::test::navigation_validation_config< algebra_t >::display_svg ( ) const

Check whether SVG output is enabled.

Returns
Whether SVG output is enabled.

◆ display_svg() [2/2]

template<concepts::algebra algebra_t>
navigation_validation_config & detray::test::navigation_validation_config< algebra_t >::display_svg ( const bool do_display)

Set whether SVG output is enabled.

Parameters
do_displayWhether to display SVGs.
Returns
This configuration.

◆ fail_on_diff() [1/2]

template<concepts::algebra algebra_t>
bool detray::test::navigation_validation_config< algebra_t >::fail_on_diff ( ) const

Check whether validation stops at the first difference.

Returns
Whether validation stops at the first difference.

◆ fail_on_diff() [2/2]

template<concepts::algebra algebra_t>
navigation_validation_config & detray::test::navigation_validation_config< algebra_t >::fail_on_diff ( const bool fail_on_diff)

Set whether validation stops at the first difference.

Parameters
fail_on_diffWhether to stop on a difference.
Returns
This configuration.

◆ intersection_file() [1/2]

template<concepts::algebra algebra_t>
const std::string & detray::test::navigation_validation_config< algebra_t >::intersection_file ( ) const

Get the intersection input file name.

Returns
The intersection input file name.

◆ intersection_file() [2/2]

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

Set the intersection input file name.

Parameters
fNew file name.
Returns
This configuration.

◆ n_tracks() [1/2]

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

Get the maximum number of tracks.

Returns
The maximum number of tracks.

◆ n_tracks() [2/2]

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

Set the maximum number of tracks.

Parameters
nNumber of tracks.
Returns
This configuration.

◆ name() [1/2]

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

GettersGet the test name.

Returns
The configured test name.

◆ name() [2/2]

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

SettersSet the test name.

Parameters
nNew test name.
Returns
This configuration.

◆ navigation_direction() [1/2]

template<concepts::algebra algebra_t>
navigation::direction detray::test::navigation_validation_config< algebra_t >::navigation_direction ( ) const

Get the navigation direction.

Returns
The navigation direction.

◆ navigation_direction() [2/2]

template<concepts::algebra algebra_t>
navigation_validation_config & detray::test::navigation_validation_config< algebra_t >::navigation_direction ( const navigation::direction dir)

Set the navigation direction.

Parameters
dirNew direction.
Returns
This configuration.

◆ p_range() [1/2]

template<concepts::algebra algebra_t>
darray< scalar_type, 2 > detray::test::navigation_validation_config< algebra_t >::p_range ( ) const

Get the configured momentum range.

Returns
The configured momentum range.

◆ p_range() [2/2]

template<concepts::algebra algebra_t>
navigation_validation_config & detray::test::navigation_validation_config< algebra_t >::p_range ( const darray< scalar_type, 2 > pr)

Set the momentum range.

Parameters
prNew momentum range.
Returns
This configuration.

◆ ptc_hypothesis() [1/2]

template<concepts::algebra algebra_t>
pdg_particle< scalar_type > detray::test::navigation_validation_config< algebra_t >::ptc_hypothesis ( ) const

Get the particle hypothesis.

Returns
The particle hypothesis.

◆ ptc_hypothesis() [2/2]

template<concepts::algebra algebra_t>
navigation_validation_config & detray::test::navigation_validation_config< algebra_t >::ptc_hypothesis ( pdg_particle< scalar_type > pdg_ptc)

Set the particle hypothesis.

Parameters
pdg_ptcNew particle hypothesis.
Returns
This configuration.

◆ svg_style()

template<concepts::algebra algebra_t>
const auto & detray::test::navigation_validation_config< algebra_t >::svg_style ( ) const

Get the SVG style.

Returns
The SVG style.

◆ track_param_file() [1/2]

template<concepts::algebra algebra_t>
const std::string & detray::test::navigation_validation_config< algebra_t >::track_param_file ( ) const

Get the track parameter input file name.

Returns
The track parameter input file name.

◆ track_param_file() [2/2]

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

Set the track parameter input file name.

Parameters
fNew file name.
Returns
This configuration.

◆ verbose() [1/2]

template<concepts::algebra algebra_t>
bool detray::test::navigation_validation_config< algebra_t >::verbose ( ) const

Check whether verbose output is enabled.

Returns
Whether verbose output is enabled.

◆ verbose() [2/2]

template<concepts::algebra algebra_t>
navigation_validation_config & detray::test::navigation_validation_config< algebra_t >::verbose ( const bool v)

Set whether verbose output is enabled.

Parameters
vWhether to enable verbose output.
Returns
This configuration.

Member Data Documentation

◆ m_B

template<concepts::algebra algebra_t>
vector3_type detray::test::navigation_validation_config< algebra_t >::m_B
Initial value:
static constexpr scalar_t T
Magnetic field, native unit GeV/(e*mm).
Definition units.hpp:108

B-field vector for helix.

◆ m_p_range

template<concepts::algebra algebra_t>
darray<scalar_type, 2> detray::test::navigation_validation_config< algebra_t >::m_p_range
Initial value:
{
detray::detail::invalid_value<scalar_type>(),
detray::detail::invalid_value<scalar_type>()}

Configured momentum range of the test sample (only needed to generate correct file names).

If none was passed, it will be determined from the track data (imprecise!)

◆ m_style

template<concepts::algebra algebra_t>
detray::svgtools::styling::style detray::test::navigation_validation_config< algebra_t >::m_style
Initial value:
=
const styling::style style
Complete style configuration using the Tableau colorblind palette.
Definition styling.hpp:316

Visualization style to be applied to the SVGs.