10 constexpr
double tdc_bc_conv = 25. / 32.;
11 constexpr
double max_drift_time_30mm = 750;
19 double timeoffset = 0.;
20 int stepf, stepff[13], stepl, stepr, dtt, dttbuono(0);
22 double chi2min = FLT_MAX;
23 double bestchi2 = FLT_MAX;
40 if (mdt_hit->tdcCount() <
tdcmin)
tdcmin = mdt_hit->tdcCount();
46 for (
int jj = 0; jj < 11; jj++) {
47 bool outofrange{
false};
49 double newtime = (mdt_hit->tdcCount() -
tdcmin + stepl) * tdc_bc_conv;
51 if (newtime < 0. || newtime > max_drift_time_30mm) { outofrange =
true; }
52 mdt_hit->setDriftTime(newtime);
55 mdt_hit->setDriftRadius(
r,
dr);
65 double newtime = (mdt_hit->tdcCount() -
tdcmin + stepr) * tdc_bc_conv;
67 if (newtime < 0. || newtime > max_drift_time_30mm) { outofrange =
true; }
68 mdt_hit->setDriftTime(newtime);
71 mdt_hit->setDriftRadius(
r,
dr);
87 if (chi2min < bestchi2) {
90 stepl = stepf - stepff[jj];
91 stepr = stepff[jj] + stepf;
92 if (stepl < 0) stepl = 0;
93 if (stepr < 0) stepr = 0;
95 stepl = stepf - stepff[jj];
96 stepr = stepff[jj] + stepf;
97 if (stepl < 0) stepl = 0;
98 if (stepr < 0) stepr = 0;
100 timeoffset = dttbuono;
104 double newtime = (mdt_hit->tdcCount() -
tdcmin + timeoffset) * tdc_bc_conv;
105 mdt_hit->setDriftTime(newtime);
108 mdt_hit->setDriftRadius(
r,
dr);
112 timeShift = -(timeoffset -
tdcmin) * tdc_bc_conv;
117 double timeShift = 999.;
119 mdt_hit->setDriftTime(400.);
120 double t = mdt_hit->driftTime();
122 double dr = mdt_hit->sigmaDriftRadius();
123 mdt_hit->setDriftRadius(
r,
dr);
140 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,
141 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,
142 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,
143 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,
144 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,
145 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,
146 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,
147 14.458, 14.516, 14.8312, 14.85, 14.86, 14.87