File indexing completed on 2026-05-27 07:24:03
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011
0012 #include "detray/definitions/detail/qualifiers.hpp"
0013 #include "detray/definitions/units.hpp"
0014
0015
0016 #include <limits>
0017 #include <ostream>
0018
0019 namespace detray::stepping {
0020
0021 enum class id {
0022
0023 e_linear = 0,
0024
0025 e_rk = 1,
0026 };
0027
0028 struct config {
0029
0030 float min_stepsize{1e-4f * unit<float>::mm};
0031
0032 float rk_error_tol{1e-4f * unit<float>::mm};
0033
0034 float step_constraint{std::numeric_limits<float>::max()};
0035
0036 float path_limit{5.f * unit<float>::m};
0037
0038 std::size_t max_rk_updates{10000u};
0039
0040
0041 bool use_mean_loss{true};
0042
0043 bool use_eloss_gradient{false};
0044
0045 bool use_field_gradient{false};
0046
0047 bool do_covariance_transport{true};
0048
0049
0050 DETRAY_HOST
0051 friend std::ostream& operator<<(std::ostream& out, const config& cfg) {
0052 out << " Min. Stepsize : "
0053 << cfg.min_stepsize / detray::unit<float>::mm << " [mm]\n"
0054 << " Runge-Kutta tolerance : "
0055 << cfg.rk_error_tol / detray::unit<float>::mm << " [mm]\n"
0056 << " Max. step updates : " << cfg.max_rk_updates << "\n"
0057 << " Stepsize constraint : "
0058 << cfg.step_constraint / detray::unit<float>::mm << " [mm]\n"
0059 << " Path limit : "
0060 << cfg.path_limit / detray::unit<float>::m << " [m]\n"
0061 << std::boolalpha << " Use Bethe energy loss : " << cfg.use_mean_loss
0062 << "\n"
0063 << " Do cov. transport : " << cfg.do_covariance_transport << "\n";
0064
0065 if (cfg.do_covariance_transport) {
0066 out << std::boolalpha
0067 << " Use eloss gradient : " << cfg.use_eloss_gradient << "\n"
0068 << " Use B-field gradient : " << cfg.use_field_gradient << "\n";
0069 }
0070
0071 out << std::noboolalpha;
0072
0073 return out;
0074 }
0075 };
0076
0077 }