25 const double r_max)
const {
30 double t_min(
t_from_r(r_min, in_rt));
31 double t_max(
t_from_r(r_max, in_rt));
32 std::vector<SamplePoint> t_r(10);
35 std::vector<double> rt_param(102);
42 double step_size((t_max - t_min) /
static_cast<double>(t_r.size() - 1));
43 for (
unsigned int k = 0; k < t_r.size(); k++) {
44 t_r[k].set_x1(t_min + k * step_size);
45 t_r[k].set_x2(in_rt.
radius(t_min + k * step_size));
46 t_r[k].set_error(1.0);
48 fitter.fit_parameters(t_r, 1, t_r.size(), pol);
50 rt_param[0] = in_rt.
tLower();
52 for (
unsigned int k = 0; k < 100; k++) {
53 t = rt_param[0] + rt_param[1] * k;
58 rt_param[k + 2] = 0.0;
59 for (
unsigned int l = 0; l < 3; l++) { rt_param[k + 2] = rt_param[k + 2] + fitter.coefficients()[l] * pol.
value(l, t); }
73 const double r_max,
const double r_ext,
74 const std::vector<SamplePoint>& add_fit_points)
const {
81 double t_max(
t_from_r(r_max, in_rt));
82 std::vector<SamplePoint> t_r(10);
85 std::vector<double> rt_param(102);
92 double step_size((t_max - t_min) /
static_cast<double>(t_r.size() - 1));
95 for (
unsigned int k = 0; k < t_r.size(); k++) {
96 t_r[k].set_x1(t_min + k * step_size);
97 t_r[k].set_x2(in_rt.
radius(t_min + k * step_size));
98 t_r[k].set_error(1.0);
102 for (
const auto & add_fit_point : add_fit_points) { t_r.push_back(add_fit_point); }
105 fitter.fit_parameters(t_r, 1, t_r.size(), pol);
109 rt_param[0] = in_rt.
tLower();
111 for (
unsigned int k = 0; k < 100; k++) {
112 t = rt_param[0] + rt_param[1] * k;
117 if (
r > r_min && t > t_min) {
120 rt_param[k + 2] = 0.0;
121 for (
unsigned int l = 0; l < 3; l++) {
122 rt_param[k + 2] = rt_param[k + 2] + fitter.coefficients()[l] * pol.
value(l, t);
124 if (rt_param[k + 2] < 0.0) { rt_param[k + 2] = 0.0; }
126 }
else if (r_ext > r_max) {
130 rt_param[k + 2] = 0.0;
131 for (
unsigned int l = 0; l < 3; l++) {
132 rt_param[k + 2] = rt_param[k + 2] + fitter.coefficients()[l] * pol.
value(l, t);
138 else if (r_ext <= r_max && r_ext >= r_min) {
141 log << MSG::WARNING <<
"getRtWithParabolicExtrapolation() - Extrapolated radius withing fit region - Nothing to be done."