3 #include "RtypesCore.h" 102 std::cout << std::endl
103 << Form(
" Merging iteration %zu: processing %zu clusters...",
_iter_ctr, nclusters)
122 std::cout << Form(
" Input / Output cluster length: %zu/%zu",
129 std::cout <<
" Did not find any newly merged clusters..." << std::endl;
133 std::cout <<
" Output cluster length is 1 (= no more merging needed)" << std::endl;
154 _book_keeper_v.clear();
195 if (indexes_v.size() == 1) {
200 size_t tmp_hit_counts = 0;
201 for (
auto const& index : indexes_v)
204 std::vector<util::PxHit> tmp_hits;
205 tmp_hits.reserve(tmp_hit_counts);
207 for (
auto const& index : indexes_v) {
209 tmp_hits.push_back(
hit);
215 if ((*
_out_clusters.rbegin()).SetHits(tmp_hits) < 1)
continue;
216 (*
_out_clusters.rbegin()).FillParams(gser,
true,
true,
true,
true,
true,
false);
233 RunMerge(in_clusters, std::vector<bool>(in_clusters.size(),
true), book_keeper);
237 const std::vector<bool>& merge_flag,
240 if (merge_flag.size() != in_clusters.size())
242 Form(
"in_clusters (%zu) and merge_flag (%zu) vectors must be of same length!",
247 std::cout << Form(
" Calling %s with %zu clusters...", __FUNCTION__, in_clusters.size())
258 auto citer2 = citer1;
260 UChar_t plane1 = in_clusters.at((*citer1).second).Plane();
267 UChar_t plane2 = in_clusters.at((*citer2).second).Plane();
268 if (plane1 != plane2)
continue;
271 if (!(merge_flag.at((*citer2).second)) && !(merge_flag.at((*citer1).second)))
continue;
274 if (!(book_keeper.
MergeAllowed((*citer1).second, (*citer2).second)))
continue;
278 std::cout << Form(
" \033[93mInspecting a pair (%zu, %zu) for merging... \033[00m",
285 _merge_algo->
Bool(in_clusters.at((*citer1).second), in_clusters.at((*citer2).second));
290 std::cout <<
" \033[93mfound to be merged!\033[00m " << std::endl << std::endl;
293 std::cout <<
" \033[93mfound NOT to be merged...\033[00m" << std::endl << std::endl;
297 if (merge) book_keeper.
Merge((*citer1).second, (*citer2).second);
305 std::cout <<
" Found following clusters to be merged..." << std::endl;
306 for (
auto const& indexes_v : book_keeper.
GetResult()) {
308 if (indexes_v.size() == 1)
continue;
310 for (
auto index : indexes_v)
312 std::cout << index <<
" ";
313 std::cout <<
" ... indexes to be merged!" << std::endl;
331 std::cout << Form(
" Calling %s with %zu clusters...", __FUNCTION__, in_clusters.size())
340 for (
size_t cindex1 = 0; cindex1 < in_clusters.size(); ++cindex1) {
342 UChar_t plane1 = in_clusters.at(cindex1).Plane();
344 for (
size_t cindex2 = cindex1 + 1; cindex2 < in_clusters.size(); ++cindex2) {
347 UChar_t plane2 = in_clusters.at(cindex2).Plane();
348 if (plane1 != plane2)
continue;
355 std::cout << Form(
" \033[93mInspecting a pair (%zu, %zu) for separation... \033[00m",
361 bool separate =
_separate_algo->
Bool(in_clusters.at(cindex1), in_clusters.at(cindex2));
366 std::cout <<
" \033[93mfound to be separated!\033[00m " << std::endl << std::endl;
369 std::cout <<
" \033[93mfound NOT to be separated...\033[00m" << std::endl
Class def header for algorithm classes for CMergeManager.
Class def header for a class CMergeBookKeeper.
Class def header for a class CPriorityAlgoBase.
Class def header for exception classes in CMTException.
Detector simulation of raw signals on wires.
Class def header for a class CMManagerBase.
Class def header for a class CMergeManager.