#include <CBAlgoPolyShortestDist.h>
|
TFile * | _fout |
| TFile pointer to an output file. More...
|
|
bool | _verbose |
| Boolean to choose verbose mode. Turned on if CMergeManager/CMatchManager's verbosity level is >= kPerMerging. More...
|
|
User implementation for CBoolAlgoBase class doxygen documentation!
Definition at line 28 of file CBAlgoPolyShortestDist.h.
cmtool::CBAlgoPolyShortestDist::CBAlgoPolyShortestDist |
( |
| ) |
|
virtual cmtool::CBAlgoPolyShortestDist::~CBAlgoPolyShortestDist |
( |
| ) |
|
|
inlinevirtual |
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.
Reimplemented from cmtool::CBoolAlgoBase.
Definition at line 54 of file CBAlgoPolyShortestDist.cxx.
58 if( (cluster1.GetHitVector().size() <
_min_hits) ||
59 (cluster2.GetHitVector().size() <
_min_hits) )
62 if( (cluster1.GetHitVector().size() >
_max_hits) ||
63 (cluster2.GetHitVector().size() >
_max_hits) )
67 if ( (cluster1.GetParams().PolyObject.Size() < 2) or
68 (cluster2.GetParams().PolyObject.Size() < 2) ){
77 unsigned int npoints1 = cluster1.GetParams().PolyObject.Size();
78 unsigned int npoints2 = cluster2.GetParams().PolyObject.Size();
80 for(
unsigned int i = 0; i < npoints1; ++i){
81 float pt1w = cluster1.GetParams().PolyObject.Point(i).first;
82 float pt1t = cluster1.GetParams().PolyObject.Point(i).second;
84 for(
unsigned int j = 0; j < npoints2; ++j){
85 float pt2w = cluster2.GetParams().PolyObject.Point(j).first;
86 float pt2t = cluster2.GetParams().PolyObject.Point(j).second;
87 double distsqrd =
pow(pt2w-pt1w,2)+
pow(pt2t-pt1t,2);
92 std::cout<<
"two polygon points dist2 is "<<distsqrd<<
std::endl;
QTextStream & endl(QTextStream &s)
void cmtool::CBAlgoPolyShortestDist::Report |
( |
| ) |
|
|
virtual |
void cmtool::CBAlgoPolyShortestDist::Reset |
( |
void |
| ) |
|
|
virtual |
void cmtool::CBAlgoPolyShortestDist::SetDebug |
( |
bool |
flag | ) |
|
|
inline |
void cmtool::CBAlgoPolyShortestDist::SetMaxNumHits |
( |
int |
nhits | ) |
|
|
inline |
void cmtool::CBAlgoPolyShortestDist::SetMinDistSquared |
( |
double |
dist | ) |
|
|
inline |
Definition at line 81 of file CBAlgoPolyShortestDist.h.
constexpr double dist(const TReal *x, const TReal *y, const unsigned int dimension)
void cmtool::CBAlgoPolyShortestDist::SetMinNumHits |
( |
size_t |
nhits | ) |
|
|
inline |
bool cmtool::CBAlgoPolyShortestDist::_debug |
|
private |
double cmtool::CBAlgoPolyShortestDist::_dist_sqrd_cut |
|
private |
size_t cmtool::CBAlgoPolyShortestDist::_max_hits |
|
private |
size_t cmtool::CBAlgoPolyShortestDist::_min_hits |
|
private |
double cmtool::CBAlgoPolyShortestDist::tmp_min_dist |
|
private |
The documentation for this class was generated from the following files: