Optional function: called at the beginning of 1st iteration. This is called per event. Optional function: called at the end of event ... after the last merging iteration is over. Optional function: called at the beggining of each iteration over all pairs of clusters. This provides all clusters' information in case the algorithm need them. Note this is called per iteration which may be more than once per event. Optional function: called at the end of each iteration over all pairs of clusters. Core function: given the CPAN input, return whether a cluster should be merged or not.
59 if(cluster1.GetHitVector().size() <
_min_hits ||
60 cluster2.GetHitVector().size() <
_min_hits )
63 bool FirstTrackSecondBlob =
false;
64 bool SecondTrackFirstBlob =
false;
67 FirstTrackSecondBlob =
true;
69 SecondTrackFirstBlob =
true;
72 if(FirstTrackSecondBlob){
73 std::cout<<
"*********************************************"<<
std::endl;
74 std::cout<<
"First track second blob! First has params:"<<
std::endl;
75 std::cout<<
"Angle 2D = "<<cluster1.GetParams().angle_2d<<
std::endl;
76 std::cout<<
"Opening Angle = "<<cluster1.GetParams().opening_angle<<
std::endl;
77 std::cout<<
"Sum charge = "<<cluster1.GetParams().sum_charge<<
std::endl;
78 std::cout<<
"Length = "<<cluster1.GetParams().length<<
std::endl;
80 std::cout<<
"N_Hits = "<<cluster1.GetHitVector().size()<<
std::endl;
81 std::cout<<
"eigenvalue_principal = "<<cluster1.GetParams().eigenvalue_principal<<
std::endl;
82 std::cout<<
"Second has params:"<<
std::endl;
83 std::cout<<
"Angle 2D = "<<cluster2.GetParams().angle_2d<<
std::endl;
84 std::cout<<
"Opening Angle = "<<cluster2.GetParams().opening_angle<<
std::endl;
85 std::cout<<
"Sum charge = "<<cluster2.GetParams().sum_charge<<
std::endl;
86 std::cout<<
"Length = "<<cluster2.GetParams().length<<
std::endl;
88 std::cout<<
"N_Hits = "<<cluster2.GetHitVector().size()<<
std::endl;
89 std::cout<<
"eigenvalue_principal = "<<cluster2.GetParams().eigenvalue_principal<<
std::endl;
97 if (FirstTrackSecondBlob)
99 std::pair<float,float> trackEndPoint =
100 std::pair<float,float>( cluster1.GetParams().end_point.w, cluster1.GetParams().end_point.t );
103 if(cluster2.GetParams().PolyObject.PointInside(trackEndPoint))
110 else if (SecondTrackFirstBlob)
112 std::pair<float,float> trackEndPoint =
113 std::pair<float,float>( cluster2.GetParams().end_point.w, cluster2.GetParams().end_point.t );
116 if(cluster1.GetParams().PolyObject.PointInside(trackEndPoint))
QTextStream & endl(QTextStream &s)