1 #ifndef RECOTOOL_CBALGOSTARTINCONE_CXX 2 #define RECOTOOL_CBALGOSTARTINCONE_CXX 34 const ::cluster::ClusterParamsAlg &cluster2)
38 if ( ( (cluster1.GetParams().length <
_lenMin) and (cluster1.GetHitVector().size() <
_NhitsMin) )
39 and ( (cluster2.GetParams().length <
_lenMin) and (cluster2.GetHitVector().size() <
_NhitsMin) ) )
49 double w_start1 = cluster1.GetParams().start_point.w;
50 double t_start1 = cluster1.GetParams().start_point.t;
51 double angle1 = cluster1.GetParams().angle_2d;
52 double opening1 = cluster1.GetParams().opening_angle * (180./3.14);
53 double len1 = cluster1.GetParams().length;
55 double w_start2 = cluster2.GetParams().start_point.w;
56 double t_start2 = cluster2.GetParams().start_point.t;
57 double angle2 = cluster2.GetParams().angle_2d;
58 double opening2 = cluster2.GetParams().opening_angle * (180./3.14);
59 double len2 = cluster2.GetParams().length;
64 if (
_debug) { std::cout <<
"Directions too different....do not merge" << std::endl; }
69 std::cout <<
"Cluster 1:" << std::endl;
70 std::cout <<
"\tStart: ( " << w_start1 <<
", " << t_start1 <<
" )" << std::endl;
71 std::cout <<
"\tAngle: " << angle1 << std::endl;
72 std::cout <<
"\tOpening Angle: " << opening1 << std::endl;
73 std::cout <<
"\tLength: " << len1 << std::endl;
74 std::cout <<
"Cluster 2:" << std::endl;
75 std::cout <<
"\tStart: ( " << w_start2 <<
", " << t_start2 <<
" )" << std::endl;
76 std::cout <<
"\tAngle: " << angle2 << std::endl;
77 std::cout <<
"\tOpening Angle: " << opening2 << std::endl;
78 std::cout <<
"\tLength: " << len2 << std::endl;
79 std::cout << std::endl;
86 double w_start1_transl = w_start1 - w_start2;
87 double t_start1_transl = t_start1 - t_start2;
88 double w_start2_transl = w_start2 - w_start1;
89 double t_start2_transl = t_start2 - t_start1;
91 double w_start1_rot = w_start1_transl*cos(angle2*3.14/180.) + t_start1_transl*sin(angle2*3.14/180.);
92 double t_start1_rot = - w_start1_transl*sin(angle2*3.14/180.) + t_start1_transl*cos(angle2*3.14/180.);
93 double w_start2_rot = w_start2_transl*cos(angle1*3.14/180.) + t_start2_transl*sin(angle1*3.14/180.);
94 double t_start2_rot = - w_start2_transl*sin(angle1*3.14/180.) + t_start2_transl*cos(angle1*3.14/180.);
97 std::cout <<
"\tStart Rot 1: ( " << w_start1_rot <<
", " << t_start1_rot <<
" )" << std::endl;
98 std::cout <<
"\tStart Rot 2: ( " << w_start2_rot <<
", " << t_start2_rot <<
" )" << std::endl;
101 if ( (w_start1_rot < len2*
_lengthReach ) and (w_start1_rot > 0) and
102 ( abs(t_start1_rot) < (abs(w_start1_rot*sin(opening2*3.14/180.))) ) and
104 (cluster2.GetHitVector().size() >
_NhitsMin) ){
105 if (
_verbose) { std::cout <<
"Start point of Cluster 1 in cone of Cluster 2!" << std::endl; }
108 if ( (w_start2_rot < len1*_lengthReach ) and (w_start2_rot > 0) and
109 ( abs(t_start2_rot) < (abs(w_start2_rot*sin(opening1*3.14/180.))) ) and
111 (cluster1.GetHitVector().size() >
_NhitsMin) ){
112 if (
_verbose) { std::cout <<
"Start point of Cluster 2 in cone of Cluster 1!" << std::endl; }
Double_t TimeToCm() const
Double_t WireToCm() const
Class def header for a class CBAlgoStartInCone.