1 #ifndef RECOTOOL_CBALGOMERGETINYWITHBIG_CXX 2 #define RECOTOOL_CBALGOMERGETINYWITHBIG_CXX 30 const ::cluster::ClusterParamsAlg &cluster2)
35 std::cout<<
"MergeTinyWithBig. One cluster has " 36 <<cluster1.GetNHits()<<
" hits, the other has " 37 <<cluster2.GetNHits()<<
" hits."<<std::endl;
40 bool is_1_small =
false;
41 bool is_2_small =
false;
42 bool is_1_big =
false;
43 bool is_2_big =
false;
61 std::cout<<
"is_1_small, is_1_big, is_2_small, is_2_big are: " 62 <<is_1_small<<
", "<<is_1_big<<
", " 63 <<is_2_small<<
", "<<is_2_big<<std::endl;
66 if(!is_1_small && !is_2_small)
69 if(!is_1_big && !is_2_big)
72 if(is_1_small && is_2_small)
75 if(is_1_big && is_2_big)
79 std::cout<<
"Looks like one of them is big, and one is small."<<std::endl;
89 unsigned int npoints1 = cluster1.GetParams().PolyObject.Size();
90 unsigned int npoints2 = cluster2.GetParams().PolyObject.Size();
92 for(
unsigned int i = 0; i < npoints1; ++i){
93 float pt1w = cluster1.GetParams().PolyObject.Point(i).first;
94 float pt1t = cluster1.GetParams().PolyObject.Point(i).second;
96 for(
unsigned int j = 0; j < npoints2; ++j){
97 float pt2w = cluster2.GetParams().PolyObject.Point(j).first;
98 float pt2t = cluster2.GetParams().PolyObject.Point(j).second;
99 double distsqrd = pow(pt2w-pt1w,2)+pow(pt2t-pt1t,2);
102 std::cout<<
"two polygon points dist2 is "<<distsqrd<<std::endl;
Class def header for a class CBAlgoMergeTinyWithBig.