50 double tref[2] = { NAN, NAN };
51 double eref[2] = { NAN, NAN };
54 for (
const auto& data : calData)
56 const auto side = data->GetSide() - 1;
57 const auto bar = data->GetBarId();
62 tref[side] = data->GetTime();
63 eref[side] = data->GetQdc();
71 if (tref[0] - tref[1] < -0.5 * 5. * 2048)
72 tref[1] = tref[1] - 5. * 2048;
73 if (tref[0] - tref[1] > 0.5 * 5. * 2048)
74 tref[0] = tref[0] - 5. * 2048;
76 pstart = 0.5 * (tref[0] + tref[1]);