1 #ifndef RECOTOOL_CFALGOZOVERLAP_CXX 2 #define RECOTOOL_CFALGOZOVERLAP_CXX 30 if(clusters.size()==2)
return -1;
34 double wire_distance = 0;
36 double max_wire_distance = -1;
40 double max_end_w = -1;
49 for(
auto const& c : clusters){
54 start_w = 0.5* c->GetParams().start_point.w ;
55 end_w = 0.5* c->GetParams().end_point.w ;
56 wire_distance = end_w - start_w ;
59 start_w = c->GetParams().start_point.w ;
60 end_w = c->GetParams().end_point.w ;
61 wire_distance = c->GetParams().end_point.w - c->GetParams().start_point.w ;
67 if(max_wire_distance < wire_distance){
68 max_wire_distance = wire_distance;
79 for(
auto const& c : clusters){
82 start_w = 0.5* c->GetParams().start_point.w ;
83 end_w = 0.5* c->GetParams().end_point.w ;
84 wire_distance = end_w - start_w ;
87 start_w = c->GetParams().start_point.w ;
88 end_w = c->GetParams().end_point.w ;
89 wire_distance = c->GetParams().end_point.w - c->GetParams().start_point.w ;
95 if(start_w <= max_end_w)
96 ratio *= wire_distance / max_wire_distance ;
101 std::cout<<
"\nThe wire distance for cluster in plane "<<c->Plane()<<
" is: "<<wire_distance <<std::endl;
102 std::cout<<
"Max wire disatance is: "<<max_wire_distance<<std::endl ;
103 std::cout<<
"Ratio is: "<<ratio<<std::endl;
104 std::cout<<
"Start and end points: "<<start_w<<
", "<<end_w<<std::endl;
110 std::cout<<
" FOOOOUUUUNNNND ONE WOooooooooooooooooooooooooooooooooooooooooooooooooo: "<<ratio<<std::endl;
Class def header for a class CFAlgoZOverlap.