96 const auto module_id = hit.module_id;
101 auto fill_data_ref = [
this, &hit, module_id](
auto module_id_ref,
auto& hist,
auto& hist_c)
103 if (module_id == module_id_ref)
108 if (
auto res = ranges::find_if(
109 hit_data_.get(), [&module_id_ref](
const auto& ele) { return ele.module_id == module_id_ref; });
112 const auto& hit_ref = *(res);
113 const auto time_mean = (hit.tdc_left + hit.tdc_right) / 2;
114 const auto time_mean_ref = (hit_ref.tdc_left + hit_ref.tdc_right) / 2;
115 const auto time_diff = time_mean - time_mean_ref;
117 const auto distance = hit.position - hit_ref.position;
118 const auto time_c = std::copysign(distance.Mag() /
CLight, distance.Y());
120 hist->Fill(module_id, time_diff);
121 hist_c->Fill(module_id, time_diff + time_c);