20 float tdcmin = FLT_MAX;
21 double timeoffset = 0.;
22 int stepf{0}, stepl{0}, stepr{0}, dtt{0}, dttbuono{0};
23 std::array<int, 13> stepff{};
24 double chi2r{0.}, chi2l{0.};
25 double chi2min = FLT_MAX;
26 double bestchi2 = FLT_MAX;
43 if (mdt_hit->tdcCount() < tdcmin) tdcmin = mdt_hit->tdcCount();
49 for (
int jj = 0; jj < 11; jj++) {
50 bool outofrange{
false};
52 double newtime = (mdt_hit->tdcCount() - tdcmin + stepl) * tdc_bc_conv;
54 if (newtime < 0. || newtime > max_drift_time_30mm) { outofrange =
true; }
55 mdt_hit->setDriftTime(newtime);
58 mdt_hit->setDriftRadius(
r, dr);
68 double newtime = (mdt_hit->tdcCount() - tdcmin + stepr) * tdc_bc_conv;
70 if (newtime < 0. || newtime > max_drift_time_30mm) { outofrange =
true; }
71 mdt_hit->setDriftTime(newtime);
74 mdt_hit->setDriftRadius(
r, dr);
90 if (chi2min < bestchi2) {
93 stepl = stepf - stepff[jj];
94 stepr = stepff[jj] + stepf;
95 if (stepl < 0) stepl = 0;
96 if (stepr < 0) stepr = 0;
98 stepl = stepf - stepff[jj];
99 stepr = stepff[jj] + stepf;
100 if (stepl < 0) stepl = 0;
101 if (stepr < 0) stepr = 0;
103 timeoffset = dttbuono;
107 double newtime = (mdt_hit->tdcCount() - tdcmin + timeoffset) * tdc_bc_conv;
108 mdt_hit->setDriftTime(newtime);
109 double r =
m_rtRel->radius(newtime);
111 mdt_hit->setDriftRadius(
r, dr);
115 timeShift = -(timeoffset - tdcmin) * tdc_bc_conv;
143 0.25, 0.294403, 0.311703, 0.485873, 0.804235, 1.19624, 1.5562, 1.91466, 2.3147, 2.66996, 3.05436, 3.40371, 3.80574,
144 4.13506, 4.45473, 4.77338, 5.05294, 5.33755, 5.58459, 5.8718, 6.09389, 6.37129, 6.56824, 6.73359, 6.96923, 7.16944,
145 7.38872, 7.55627, 7.73885, 7.86403, 8.07223, 8.26818, 8.39531, 8.54069, 8.69377, 8.86487, 9.01724, 9.16516, 9.24791,
146 9.45596, 9.56237, 9.69553, 9.80647, 9.9432, 10.039, 10.207, 10.2884, 10.3977, 10.6045, 10.6181, 10.7883, 10.9057,
147 10.9908, 11.1615, 11.2359, 11.3409, 11.4451, 11.5412, 11.6896, 11.7487, 11.8853, 11.9571, 12.0381, 12.1739, 12.2601,
148 12.3892, 12.4406, 12.5809, 12.6297, 12.7495, 12.8314, 12.9463, 13.0487, 13.1337, 13.2417, 13.2706, 13.3917, 13.5107,
149 13.60, 13.69, 13.71, 13.8088, 13.8577, 14.0212, 14.0671, 14.1225, 14.2112, 14.3113, 14.3747, 14.3531, 14.4799,
150 14.458, 14.516, 14.8312, 14.85, 14.86, 14.87
153 return std::make_unique<RtRelationLookUp>(rtPars);