29 const ::cluster::ClusterParamsAlg &cluster2)
34 std::cout<<
"MergeTinyWithBig. One cluster has "
35 <<cluster1.GetNHits()<<
" hits, the other has "
36 <<cluster2.GetNHits()<<
" hits."<<std::endl;
39 bool is_1_small =
false;
40 bool is_2_small =
false;
41 bool is_1_big =
false;
42 bool is_2_big =
false;
60 std::cout<<
"is_1_small, is_1_big, is_2_small, is_2_big are: "
61 <<is_1_small<<
", "<<is_1_big<<
", "
62 <<is_2_small<<
", "<<is_2_big<<std::endl;
65 if(!is_1_small && !is_2_small)
68 if(!is_1_big && !is_2_big)
71 if(is_1_small && is_2_small)
74 if(is_1_big && is_2_big)
78 std::cout<<
"Looks like one of them is big, and one is small."<<std::endl;
88 unsigned int npoints1 = cluster1.GetParams().PolyObject.Size();
89 unsigned int npoints2 = cluster2.GetParams().PolyObject.Size();
91 for(
unsigned int i = 0; i < npoints1; ++i){
92 float pt1w = cluster1.GetParams().PolyObject.Point(i).first;
93 float pt1t = cluster1.GetParams().PolyObject.Point(i).second;
95 for(
unsigned int j = 0; j < npoints2; ++j){
96 float pt2w = cluster2.GetParams().PolyObject.Point(j).first;
97 float pt2t = cluster2.GetParams().PolyObject.Point(j).second;
98 double distsqrd = pow(pt2w-pt1w,2)+pow(pt2t-pt1t,2);
101 std::cout<<
"two polygon points dist2 is "<<distsqrd<<std::endl;
BEGIN_PROLOG could also be cout
Class def header for a class CBAlgoMergeTinyWithBig.