#include <CBAlgoOutOfConeSeparate.h>
Definition at line 26 of file CBAlgoOutOfConeSeparate.h.
cmtool::CBAlgoOutOfConeSeparate::CBAlgoOutOfConeSeparate |
( |
| ) |
|
virtual cmtool::CBAlgoOutOfConeSeparate::~CBAlgoOutOfConeSeparate |
( |
| ) |
|
|
inlinevirtual |
Core function: given the ClusterParamsAlg input, return whether a cluster should be merged or not.
Reimplemented from cmtool::CBoolAlgoBase.
Definition at line 21 of file CBAlgoOutOfConeSeparate.cxx.
26 double angle1 = cluster1.GetParams().angle_2d;
27 double angle2 = cluster2.GetParams().angle_2d;
29 double w_start1 = cluster1.GetParams().start_point.w;
30 double t_start1 = cluster1.GetParams().start_point.t;
31 double w_start2 = cluster2.GetParams().start_point.w;
32 double t_start2 = cluster2.GetParams().start_point.t;
34 double len1 = cluster1.GetParams().length;
35 double len2 = cluster2.GetParams().length;
37 size_t hits1 = cluster1.GetHitVector().size();
38 size_t hits2 = cluster2.GetHitVector().size();
40 double startseparation = (w_start2-w_start1)*(w_start2-w_start1) + (t_start2-t_start1)*(t_start2-t_start1);
48 or (angle1 < -360) or (angle2 < -360) )
53 std::cout <<
"\tStart: ( " << w_start1 <<
", " << t_start1 <<
" )" <<
std::endl;
54 std::cout <<
"\tAngle: " << angle1 <<
std::endl;
55 std::cout <<
"\tLength: " << len1 <<
std::endl;
56 std::cout <<
"\tN Hits: " << hits1 <<
std::endl;
59 std::cout <<
"\tStart: ( " << w_start2 <<
", " << t_start2 <<
" )" <<
std::endl;
60 std::cout <<
"\tAngle: " << angle2 <<
std::endl;
61 std::cout <<
"\tLength: " << len2 <<
std::endl;
62 std::cout <<
"\tN Hits: " << hits2 <<
std::endl;
64 std::cout <<
"Start Point Separation: " << startseparation <<
std::endl;
71 if ( startseparation == 0 )
75 if ( (t_start2-t_start1) == 0 )
78 double slope = (t_start2-t_start1)/(w_start2-w_start1);
79 angle = atan(slope)*180./3.14;
82 separation =
abs(angle-angle1);
85 std::cout <<
"Angle S1--S2: " << angle <<
std::endl;
86 std::cout <<
"Angle1--S2: " << separation <<
std::endl;
100 angle = (
int)(angle) % 360;
102 separation =
abs(angle-angle2);
105 std::cout <<
"Angle S2--S1: " << angle <<
std::endl;
106 std::cout <<
"Angle2--S1: " << separation <<
std::endl;
QTextStream & endl(QTextStream &s)
virtual void cmtool::CBAlgoOutOfConeSeparate::Report |
( |
| ) |
|
|
inlinevirtual |
virtual void cmtool::CBAlgoOutOfConeSeparate::Reset |
( |
void |
| ) |
|
|
inlinevirtual |
void cmtool::CBAlgoOutOfConeSeparate::SetDebug |
( |
bool |
on | ) |
|
|
inline |
void cmtool::CBAlgoOutOfConeSeparate::SetMaxAngleFar |
( |
float |
angle | ) |
|
|
inline |
void cmtool::CBAlgoOutOfConeSeparate::SetMaxAngleSep |
( |
float |
angle | ) |
|
|
inline |
void cmtool::CBAlgoOutOfConeSeparate::SetMinHits |
( |
size_t |
n | ) |
|
|
inline |
void cmtool::CBAlgoOutOfConeSeparate::SetMinLength |
( |
float |
len | ) |
|
|
inline |
void cmtool::CBAlgoOutOfConeSeparate::SetStartAngleFalloff |
( |
float |
d | ) |
|
|
inline |
Set Distance at which cone-acceptance angle starts falling off as 1/distance. Value should be distance^2 in cm^2.
Definition at line 53 of file CBAlgoOutOfConeSeparate.h.
bool cmtool::CBAlgoOutOfConeSeparate::_debug |
|
protected |
float cmtool::CBAlgoOutOfConeSeparate::_FallOff |
|
protected |
float cmtool::CBAlgoOutOfConeSeparate::_MaxAngle |
|
protected |
float cmtool::CBAlgoOutOfConeSeparate::_MaxAngleFar |
|
protected |
size_t cmtool::CBAlgoOutOfConeSeparate::_minHits |
|
protected |
float cmtool::CBAlgoOutOfConeSeparate::_MinLen |
|
protected |
The documentation for this class was generated from the following files: