27 const auto n_plane =
GetBasePar()->get_num_of_planes();
30 "Number of hits for each module",
44 .try_emplace(planes_num,
46 fmt::format(
"module_hit_{}_planes", planes_num),
47 fmt::format(
"Number of hits for each module if {} planes hit", planes_num),
57 hist->GetXaxis()->SetTitle(
"Plane ID");
58 hist->GetYaxis()->SetTitle(
"Bar ID");
60 static constexpr auto MAX_MODULE_NUM = 200;
62 "Number of hit modules vs n hit planes",
68 0.5 + MAX_MODULE_NUM);
73 histograms.
add_hist<TH2D>(
"module_hit_n_half_planes",
74 "Number of hits for each module if first 13 planes hit",
82 histograms.
add_hist<TH1D>(
"plane_hit_num",
"Number of hit planes", n_plane + 1, -0.5, 0.5 + n_plane);
86 constexpr static auto MAX_HIT_SIZE = 10;
88 "hit_sizes_of_bar",
"Hit sizes of each bar", MAX_HIT_SIZE + 1, -0.5, 0.5 + MAX_HIT_SIZE);
95 const auto n_plane =
GetBasePar()->get_num_of_planes();
101 if (bar_data.left.size() != bar_data.right.size())
106 if (bar_data.left.size() != 1)
110 const auto module_num = bar_data.module_num;
117 const auto n_hit_plane = std::ranges::count_if(
plane_counter_, [](
auto val) ->
bool {
return val != 0; });
118 const auto n_hit_plane_half = std::ranges::count_if(
plane_counter_ | std::views::take(n_plane / 2),
119 [](
auto val) ->
bool {
return val != 0; });
120 const auto n_hit_modules = std::ranges::fold_left(
plane_counter_, 0, std::plus{});
128 if (bar_data.left.size() != bar_data.right.size())
133 if (bar_data.left.size() != 1)
137 const auto module_num = bar_data.module_num;
144 if (n_hit_plane_half == n_plane / 2)