29 const ::cluster::ClusterParamsAlg& cluster2)
34 (cluster2.GetHitVector().size() <
_minHits))) {
40 double angle1 = cluster1.GetParams().angle_2d;
41 double angle2 = cluster2.GetParams().angle_2d;
43 double w_start1 = cluster1.GetParams().start_point.w;
44 double t_start1 = cluster1.GetParams().start_point.t;
45 double w_start2 = cluster2.GetParams().start_point.w;
46 double t_start2 = cluster2.GetParams().start_point.t;
50 std::cout <<
"Cluster 1:" << std::endl;
51 std::cout <<
"\tAngle: " << angle1 << std::endl;
52 std::cout <<
"\tStart: ( " << w_start1 <<
", " << t_start1 <<
" )" << std::endl;
53 std::cout <<
"Cluster 2:" << std::endl;
54 std::cout <<
"\tAngle: " << angle2 << std::endl;
55 std::cout <<
"\tStart: ( " << w_start2 <<
", " << t_start2 <<
" )" << std::endl;
61 if (angle1 < -998 || angle2 < -998)
return false;
69 bool compatible =
false;
75 std::min(cluster1.GetParams().opening_angle, cluster2.GetParams().opening_angle);
80 (
abs(angle1 - angle2) < my_cut_value ||
abs(angle1 - angle2 - 180) < my_cut_value ||
81 abs(angle1 - angle2 + 180) < my_cut_value);
83 compatible = (
abs(angle1 - angle2) < my_cut_value);
87 std::cout <<
"These two clusters are compatible in angle." << std::endl;
89 std::cout <<
"These two clusters are NOT compatible in angle." << std::endl;
constexpr auto abs(T v)
Returns the absolute value of the argument.
Class def header for a class CBAlgoAngleCompat.