ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
stepping_config.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/definitions/detail/qualifiers.hpp"
13#include "detray/definitions/units.hpp"
14
15// System include(s).
16#include <limits>
17#include <ostream>
18
19namespace detray::stepping {
20
21enum class id {
22 // False for non-charged tracks
23 e_linear = 0,
24 // True for charged tracks
25 e_rk = 1,
26};
27
29struct config {
35 float step_constraint{std::numeric_limits<float>::max()};
39 std::size_t max_rk_updates{10000u};
42 bool use_mean_loss{true};
44 bool use_eloss_gradient{false};
46 bool use_field_gradient{false};
49
51 DETRAY_HOST
52 friend std::ostream& operator<<(std::ostream& out, const config& cfg) {
53 out << " Min. Stepsize : "
54 << cfg.min_stepsize / detray::unit<float>::mm << " [mm]\n"
55 << " Runge-Kutta tolerance : "
56 << cfg.rk_error_tol / detray::unit<float>::mm << " [mm]\n"
57 << " Max. step updates : " << cfg.max_rk_updates << "\n"
58 << " Stepsize constraint : "
59 << cfg.step_constraint / detray::unit<float>::mm << " [mm]\n"
60 << " Path limit : "
61 << cfg.path_limit / detray::unit<float>::m << " [m]\n"
62 << std::boolalpha << " Use Bethe energy loss : " << cfg.use_mean_loss
63 << "\n"
64 << " Do cov. transport : " << cfg.do_covariance_transport << "\n";
65
67 out << std::boolalpha
68 << " Use eloss gradient : " << cfg.use_eloss_gradient << "\n"
69 << " Use B-field gradient : " << cfg.use_field_gradient << "\n";
70 }
71 // Reset state
72 out << std::noboolalpha;
73
74 return out;
75 }
76};
77
78} // namespace detray::stepping
Configuration flags and limits consumed by a stepper.
Definition stepping_config.hpp:29
float path_limit
Maximal path length of track.
Definition stepping_config.hpp:37
float step_constraint
Step size constraint.
Definition stepping_config.hpp:35
bool use_field_gradient
Use b field gradient in error propagation.
Definition stepping_config.hpp:46
bool use_mean_loss
Use mean energy loss (Bethe) if false, most probable energy loss (Landau) will be used.
Definition stepping_config.hpp:42
float rk_error_tol
Runge-Kutta numeric error tolerance.
Definition stepping_config.hpp:33
float min_stepsize
Minimum step size.
Definition stepping_config.hpp:31
std::size_t max_rk_updates
Maximum number of Runge-Kutta step trials.
Definition stepping_config.hpp:39
bool do_covariance_transport
Do covariance transport.
Definition stepping_config.hpp:48
bool use_eloss_gradient
Use eloss gradient in error propagation.
Definition stepping_config.hpp:44
friend std::ostream & operator<<(std::ostream &out, const config &cfg)
Print the stepping configuration.
Definition stepping_config.hpp:52
static constexpr scalar_t mm
Native length unit, the millimetre.
Definition units.hpp:27
static constexpr scalar_t m
Metre expressed in millimetres.
Definition units.hpp:31