Belle II Software development
MultiHoughSpaceFastInterceptFinder::paircompare Struct Reference

this sorting makes sure the clusters can be searched from bottom left of the HS to top right normally, a C++ array looks like a matrix: (0, 0 ) ... (maxX, 0 ) ... ... (0, maxY) ... (maxX, maxY) but for sorting we want it to be like regular coordinates (0, maxY) ... (maxX, maxY) ... ... (0, 0 ) ... (maxX, 0 ) By setting the offset to the maximum allowed number of cells (2^14) and simplifying (16384 - lhs.second) * 16384 + lhs.first < (16384 - rhs.second) * 16384 + rhs.first to (rhs.second - lhs.second) * 16384 < rhs.first - lhs.first we get the formula below More...

Public Member Functions

bool operator() (const std::pair< uint, uint > &lhs, const std::pair< uint, uint > &rhs) const
 comparison operator for the active HS sector map
 

Detailed Description

this sorting makes sure the clusters can be searched from bottom left of the HS to top right normally, a C++ array looks like a matrix: (0, 0 ) ... (maxX, 0 ) ... ... (0, maxY) ... (maxX, maxY) but for sorting we want it to be like regular coordinates (0, maxY) ... (maxX, maxY) ... ... (0, 0 ) ... (maxX, 0 ) By setting the offset to the maximum allowed number of cells (2^14) and simplifying (16384 - lhs.second) * 16384 + lhs.first < (16384 - rhs.second) * 16384 + rhs.first to (rhs.second - lhs.second) * 16384 < rhs.first - lhs.first we get the formula below

Definition at line 163 of file MultiHoughSpaceFastInterceptFinder.h.

Member Function Documentation

◆ operator()()

bool operator() ( const std::pair< uint, uint > &  lhs,
const std::pair< uint, uint > &  rhs 
) const
inline

comparison operator for the active HS sector map

Definition at line 165 of file MultiHoughSpaceFastInterceptFinder.h.

166 {return ((int)rhs.second - (int)lhs.second) * 16384 < (int)rhs.first - (int)lhs.first;}

The documentation for this struct was generated from the following file: