21 const std::vector<const cluster::ClusterParamsAlg*>& clusters)
27 if (clusters.size() == 2)
return -1;
29 double wire_distance = 0;
31 double max_wire_distance = -1;
34 double max_end_w = -1;
40 for (
auto const& c : clusters) {
44 if (c->Plane() != 2) {
45 start_w = 0.5 * c->GetParams().start_point.w;
46 end_w = 0.5 * c->GetParams().end_point.w;
47 wire_distance = end_w - start_w;
50 start_w = c->GetParams().start_point.w;
51 end_w = c->GetParams().end_point.w;
52 wire_distance = c->GetParams().end_point.w - c->GetParams().start_point.w;
55 if (wire_distance < 0) wire_distance *= -1;
57 if (max_wire_distance < wire_distance) {
58 max_wire_distance = wire_distance;
68 for (
auto const& c : clusters) {
70 if (c->Plane() != 2) {
71 start_w = 0.5 * c->GetParams().start_point.w;
72 end_w = 0.5 * c->GetParams().end_point.w;
73 wire_distance = end_w - start_w;
76 start_w = c->GetParams().start_point.w;
77 end_w = c->GetParams().end_point.w;
78 wire_distance = c->GetParams().end_point.w - c->GetParams().start_point.w;
81 if (wire_distance < 0) wire_distance *= -1;
83 if (start_w <= max_end_w)
84 ratio *= wire_distance / max_wire_distance;
89 std::cout <<
"\nThe wire distance for cluster in plane " << c->Plane()
90 <<
" is: " << wire_distance << std::endl;
91 std::cout <<
"Max wire disatance is: " << max_wire_distance << std::endl;
92 std::cout <<
"Ratio is: " << ratio << std::endl;
93 std::cout <<
"Start and end points: " << start_w <<
", " << end_w << std::endl;
97 std::cout <<
" FOOOOUUUUNNNND ONE WOooooooooooooooooooooooooooooooooooooooooooooooooo: "
98 << ratio << std::endl;
Class def header for a class CFAlgoZOverlap.
BEGIN_PROLOG could also be cout