1 #ifndef RECOTOOL_CBALGOOUTOFCONESEPARATE_CXX 2 #define RECOTOOL_CBALGOOUTOFCONESEPARATE_CXX 23 const ::cluster::ClusterParamsAlg &cluster2)
27 double angle1 = cluster1.GetParams().angle_2d;
28 double angle2 = cluster2.GetParams().angle_2d;
30 double w_start1 = cluster1.GetParams().start_point.w;
31 double t_start1 = cluster1.GetParams().start_point.t;
32 double w_start2 = cluster2.GetParams().start_point.w;
33 double t_start2 = cluster2.GetParams().start_point.t;
35 double len1 = cluster1.GetParams().length;
36 double len2 = cluster2.GetParams().length;
38 size_t hits1 = cluster1.GetHitVector().size();
39 size_t hits2 = cluster2.GetHitVector().size();
41 double startseparation = (w_start2-w_start1)*(w_start2-w_start1) + (t_start2-t_start1)*(t_start2-t_start1);
49 or (angle1 < -360) or (angle2 < -360) )
53 std::cout <<
"Cluster 1:" << std::endl;
54 std::cout <<
"\tStart: ( " << w_start1 <<
", " << t_start1 <<
" )" << std::endl;
55 std::cout <<
"\tAngle: " << angle1 << std::endl;
56 std::cout <<
"\tLength: " << len1 << std::endl;
57 std::cout <<
"\tN Hits: " << hits1 << std::endl;
59 std::cout <<
"Cluster 2:" << std::endl;
60 std::cout <<
"\tStart: ( " << w_start2 <<
", " << t_start2 <<
" )" << std::endl;
61 std::cout <<
"\tAngle: " << angle2 << std::endl;
62 std::cout <<
"\tLength: " << len2 << std::endl;
63 std::cout <<
"\tN Hits: " << hits2 << std::endl;
65 std::cout <<
"Start Point Separation: " << startseparation << std::endl;
72 if ( startseparation == 0 )
76 if ( (t_start2-t_start1) == 0 )
79 double slope = (t_start2-t_start1)/(w_start2-w_start1);
80 angle = atan(slope)*180./3.14;
83 separation = abs(angle-angle1);
86 std::cout <<
"Angle S1--S2: " << angle << std::endl;
87 std::cout <<
"Angle1--S2: " << separation << std::endl;
95 if (
_verbose) { std::cout <<
"Separate! cluster 1 BIG" << std::endl << std::endl; }
101 angle = (int)(angle) % 360;
103 separation = abs(angle-angle2);
106 std::cout <<
"Angle S2--S1: " << angle << std::endl;
107 std::cout <<
"Angle2--S1: " << separation << std::endl;
115 if (
_verbose) { std::cout <<
"Separate! cluster 2 BIG" << std::endl << std::endl; }