27 const ::cluster::ClusterParamsAlg& cluster2)
32 std::cout <<
"MergeTinyWithBig. One cluster has " << cluster1.GetNHits()
33 <<
" hits, the other has " << cluster2.GetNHits() <<
" hits." << std::endl;
35 bool is_1_small =
false;
36 bool is_2_small =
false;
37 bool is_1_big =
false;
38 bool is_2_big =
false;
50 std::cout <<
"is_1_small, is_1_big, is_2_small, is_2_big are: " << is_1_small <<
", " 51 << is_1_big <<
", " << is_2_small <<
", " << is_2_big << std::endl;
54 if (!is_1_small && !is_2_small)
return false;
56 if (!is_1_big && !is_2_big)
return false;
58 if (is_1_small && is_2_small)
return false;
60 if (is_1_big && is_2_big)
return false;
62 if (
_debug) std::cout <<
"Looks like one of them is big, and one is small." << std::endl;
72 unsigned int npoints1 = cluster1.GetParams().PolyObject.Size();
73 unsigned int npoints2 = cluster2.GetParams().PolyObject.Size();
75 for (
unsigned int i = 0; i < npoints1; ++i) {
76 float pt1w = cluster1.GetParams().PolyObject.Point(i).first;
77 float pt1t = cluster1.GetParams().PolyObject.Point(i).second;
79 for (
unsigned int j = 0; j < npoints2; ++j) {
80 float pt2w = cluster2.GetParams().PolyObject.Point(j).first;
81 float pt2t = cluster2.GetParams().PolyObject.Point(j).second;
82 double distsqrd = pow(pt2w - pt1w, 2) + pow(pt2t - pt1t, 2);
84 if (
_debug) { std::cout <<
"two polygon points dist2 is " << distsqrd << std::endl; }
Class def header for a class CBAlgoMergeTinyWithBig.