3 #include "RtypesCore.h" 106 << Form(
" Merging iteration %zu: processing %zu clusters...",
_iter_ctr, nclusters)
126 std::cout << Form(
" Input / Output cluster length: %zu/%zu",
133 std::cout <<
" Did not find any newly merged clusters..." <<
std::endl;
137 std::cout <<
" Output cluster length is 1 (= no more merging needed)" <<
std::endl;
159 _book_keeper_v.clear();
201 if (indexes_v.size() == 1) {
206 size_t tmp_hit_counts = 0;
207 for (
auto const&
index : indexes_v)
210 std::vector<util::PxHit> tmp_hits;
211 tmp_hits.reserve(tmp_hit_counts);
213 for (
auto const&
index : indexes_v) {
215 tmp_hits.push_back(
hit);
221 if ((*
_out_clusters.rbegin()).SetHits(tmp_hits) < 1)
continue;
222 (*
_out_clusters.rbegin()).FillParams(gser,
true,
true,
true,
true,
true,
false);
240 RunMerge(in_clusters, std::vector<bool>(in_clusters.size(),
true), book_keeper);
245 const std::vector<bool>& merge_flag,
248 if (merge_flag.size() != in_clusters.size())
250 Form(
"in_clusters (%zu) and merge_flag (%zu) vectors must be of same length!",
255 std::cout << Form(
" Calling %s with %zu clusters...", __FUNCTION__, in_clusters.size())
266 auto citer2 = citer1;
268 UChar_t plane1 = in_clusters.at((*citer1).second).Plane();
275 UChar_t plane2 = in_clusters.at((*citer2).second).Plane();
276 if (plane1 != plane2)
continue;
279 if (!(merge_flag.at((*citer2).second)) && !(merge_flag.at((*citer1).second)))
continue;
282 if (!(book_keeper.
MergeAllowed((*citer1).second, (*citer2).second)))
continue;
286 std::cout << Form(
" \033[93mInspecting a pair (%zu, %zu) for merging... \033[00m",
293 _merge_algo->
Bool(in_clusters.at((*citer1).second), in_clusters.at((*citer2).second));
301 std::cout <<
" \033[93mfound NOT to be merged...\033[00m" << std::endl <<
std::endl;
305 if (merge) book_keeper.
Merge((*citer1).second, (*citer2).second);
313 std::cout <<
" Found following clusters to be merged..." <<
std::endl;
314 for (
auto const& indexes_v : book_keeper.
GetResult()) {
316 if (indexes_v.size() == 1)
continue;
318 for (
auto index : indexes_v)
320 std::cout <<
index <<
" ";
321 std::cout <<
" ... indexes to be merged!" <<
std::endl;
340 std::cout << Form(
" Calling %s with %zu clusters...", __FUNCTION__, in_clusters.size())
349 for (
size_t cindex1 = 0; cindex1 < in_clusters.size(); ++cindex1) {
351 UChar_t plane1 = in_clusters.at(cindex1).Plane();
353 for (
size_t cindex2 = cindex1 + 1; cindex2 < in_clusters.size(); ++cindex2) {
356 UChar_t plane2 = in_clusters.at(cindex2).Plane();
357 if (plane1 != plane2)
continue;
364 std::cout << Form(
" \033[93mInspecting a pair (%zu, %zu) for separation... \033[00m",
370 bool separate =
_separate_algo->
Bool(in_clusters.at(cindex1), in_clusters.at(cindex2));
378 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.
QTextStream & endl(QTextStream &s)