ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
test_configuration.hpp
1// This file is part of the ACTS project.
2//
3// Copyright (C) 2016 CERN for the benefit of the ACTS project
4//
5// This Source Code Form is subject to the terms of the Mozilla Public
6// License, v. 2.0. If a copy of the MPL was not distributed with this
7// file, You can obtain one at https://mozilla.org/MPL/2.0/.
8
9#pragma once
10
11// Project include(s)
12#include "detray/propagator/propagation_config.hpp"
13
14// System include(s)
15#include <limits>
16#include <ostream>
17
18namespace detray::test {
19
21template <concepts::scalar scalar_t>
26 scalar_t m_tolerance{1e-5f};
28 scalar_t inf{std::numeric_limits<scalar_t>::infinity()};
30 scalar_t epsilon{std::numeric_limits<scalar_t>::epsilon()};
32
37
43 configuration& tol(scalar_t t) {
44 m_tolerance = t;
45 return *this;
46 }
47
48
53 scalar_t tol() const { return m_tolerance; }
59 const propagation::config& propagation() const { return m_prop_cfg; }
61
62 private:
64 friend std::ostream& operator<<(std::ostream& out, const configuration& cfg) {
65 out << "Test Configuration\n"
66 << "----------------------------\n"
67 << " test tolerance : " << cfg.tol() << "\n\n";
68 out << cfg.propagation();
69
70 return out;
71 }
72};
73
74} // namespace detray::test
Configuration of the propagation.
Definition propagation_config.hpp:23
Test configuration type.
Definition test_configuration.hpp:22
friend std::ostream & operator<<(std::ostream &out, const configuration &cfg)
Print configuration.
Definition test_configuration.hpp:64
configuration & tol(scalar_t t)
SettersSet the tolerance for floating point comparisons.
Definition test_configuration.hpp:43
propagation::config & propagation()
Get the propagation configuration.
Definition test_configuration.hpp:56
const propagation::config & propagation() const
Get the propagation configuration.
Definition test_configuration.hpp:59
scalar_t inf
Definition test_configuration.hpp:28
propagation::config m_prop_cfg
Definition test_configuration.hpp:35
scalar_t tol() const
GettersGet the tolerance for floating point comparisons.
Definition test_configuration.hpp:53
scalar_t epsilon
Definition test_configuration.hpp:30
scalar_t m_tolerance
Definition test_configuration.hpp:26