1 #ifndef RECOTOOL_CBALGOANGLECOMPAT_CXX 2 #define RECOTOOL_CBALGOANGLECOMPAT_CXX 29 const ::cluster::ClusterParamsAlg &cluster2)
39 double angle1 = cluster1.GetParams().angle_2d;
40 double angle2 = cluster2.GetParams().angle_2d;
42 double w_start1 = cluster1.GetParams().start_point.w;
43 double t_start1 = cluster1.GetParams().start_point.t;
44 double w_start2 = cluster2.GetParams().start_point.w;
45 double t_start2 = cluster2.GetParams().start_point.t;
49 std::cout <<
"Cluster 1:" << std::endl;
50 std::cout <<
"\tAngle: " << angle1 << std::endl;
51 std::cout <<
"\tStart: ( " << w_start1 <<
", " << t_start1 <<
" )" << std::endl;
52 std::cout <<
"Cluster 2:" << std::endl;
53 std::cout <<
"\tAngle: " << angle2 << std::endl;
54 std::cout <<
"\tStart: ( " << w_start2 <<
", " << t_start2 <<
" )" << std::endl;
61 if(angle1 < -998 || angle2 < -998)
70 bool compatible =
false;
75 my_cut_value =
std::min(cluster1.GetParams().opening_angle, cluster2.GetParams().opening_angle);
79 compatible = ( abs(angle1-angle2) < my_cut_value ||
80 abs(angle1-angle2-180) < my_cut_value ||
81 abs(angle1-angle2+180) < my_cut_value );
83 compatible = ( abs(angle1-angle2) < my_cut_value );
87 if(compatible) std::cout<<
"These two clusters are compatible in angle."<<std::endl;
88 else std::cout<<
"These two clusters are NOT compatible in angle."<<std::endl;
Class def header for a class CBAlgoAngleCompat.