#include <RtResolutionFromPoints.h>
Definition at line 30 of file RtResolutionFromPoints.h.
◆ RtResolutionFromPoints()
MuonCalib::RtResolutionFromPoints::RtResolutionFromPoints |
( |
void |
| ) |
|
|
inline |
◆ get_min_max()
void RtResolutionFromPoints::get_min_max |
( |
const std::vector< SamplePoint > & |
sample_points, |
|
|
double & |
x_min, |
|
|
double & |
x_max |
|
) |
| |
|
staticprivate |
Definition at line 20 of file RtResolutionFromPoints.cxx.
21 for (
unsigned int k = 0;
k < sample_points.size();
k++) {
23 x_min = sample_points[
k].x1();
26 if (x_min > sample_points[
k].
x1()) { x_min = sample_points[
k].x1(); }
27 if (x_max < sample_points[
k].
x1()) { x_max = sample_points[
k].x1(); }
◆ getRtResolutionChebyshev()
< get an RtResolutionChebyshev resembling the sigma(t) function as described by the sample points in the vector "sample_points"; use Chebyshev polynomials up to order "order"; x1 coordinate of the sample points contains the drift time, x2 the corresponding radius; the method takes the minimum and maximum x1 values in the set of sample points a lower and upper limits in RtResolutionChebyshev
get an RtResolutionLookUp resembling the sigma(t) function as described by the sample points in the vector "sample_points"; x1 coordinate of the sample points contains the drift time, x2 the corresponding radius; the method takes the minimum and maximum x1 values in the set of sample points a lower and upper limits in RtResolutionLookUp
Definition at line 38 of file RtResolutionFromPoints.cxx.
45 std::vector<double> res_param(
order + 3);
48 std::vector<SamplePoint> my_points(sample_points);
53 get_min_max(sample_points, res_param[0], res_param[1]);
55 double mean(0.5 * (res_param[1] + res_param[0]));
56 double length(res_param[1] - res_param[0]);
57 for (
unsigned int k = 0;
k < my_points.size();
k++) { my_points[
k].set_x1(2 * (sample_points[
k].
x1() -
mean) /
length); }
62 if (
fitter.fit_parameters(my_points, 1, sample_points.size(), &chebyshev)) {
63 log << MSG::WARNING <<
"Could not determine Chebyshev coefficients." <<
endmsg;
65 for (
unsigned int k = 0;
k <
order + 1;
k++) { res_param[
k + 2] =
fitter.coefficients()[
k]; }
72 return rt_res_chebyshev;
◆ getRtResolutionLookUp()
Definition at line 80 of file RtResolutionFromPoints.cxx.
85 unsigned int nb_points(100);
86 double bin_width((
res.tUpper() -
res.tLower()) /
static_cast<double>(nb_points));
87 std::vector<double> res_param(nb_points + 2);
92 res_param[0] =
res.tLower();
94 for (
unsigned int k = 0;
k < nb_points;
k++) { res_param[
k + 2] =
res.resolution(
res.tLower() +
k *
bin_width); }
97 return rt_res_relation_look_up;
The documentation for this class was generated from the following files:
void mean(std::vector< double > &bins, std::vector< double > &values, const std::vector< std::string > &files, const std::string &histname, const std::string &tplotname, const std::string &label="")