19 const std::vector<const cluster::ClusterParamsAlg*>& clusters)
25 if (clusters.size() == 2)
return -1;
27 double wire_distance = 0;
29 double max_wire_distance = -1;
32 double max_end_w = -1;
38 for (
auto const& c : clusters) {
42 if (c->Plane() != 2) {
43 start_w = 0.5 * c->GetParams().start_point.w;
44 end_w = 0.5 * c->GetParams().end_point.w;
45 wire_distance = end_w - start_w;
48 start_w = c->GetParams().start_point.w;
49 end_w = c->GetParams().end_point.w;
50 wire_distance = c->GetParams().end_point.w - c->GetParams().start_point.w;
53 if (wire_distance < 0) wire_distance *= -1;
55 if (max_wire_distance < wire_distance) {
56 max_wire_distance = wire_distance;
66 for (
auto const& c : clusters) {
68 if (c->Plane() != 2) {
69 start_w = 0.5 * c->GetParams().start_point.w;
70 end_w = 0.5 * c->GetParams().end_point.w;
71 wire_distance = end_w - start_w;
74 start_w = c->GetParams().start_point.w;
75 end_w = c->GetParams().end_point.w;
76 wire_distance = c->GetParams().end_point.w - c->GetParams().start_point.w;
79 if (wire_distance < 0) wire_distance *= -1;
81 if (start_w <= max_end_w)
82 ratio *= wire_distance / max_wire_distance;
87 std::cout <<
"\nThe wire distance for cluster in plane " << c->Plane()
88 <<
" is: " << wire_distance << std::endl;
89 std::cout <<
"Max wire disatance is: " << max_wire_distance << std::endl;
90 std::cout <<
"Ratio is: " << ratio << std::endl;
91 std::cout <<
"Start and end points: " << start_w <<
", " << end_w << std::endl;
95 std::cout <<
" FOOOOUUUUNNNND ONE WOooooooooooooooooooooooooooooooooooooooooooooooooo: " 96 << ratio << std::endl;
Class def header for a class CFAlgoZOverlap.