9 #include <tracking/trackFindingCDC/hough/trees/BoxDivisionHoughTree.h>
16 namespace TrackFindingCDC {
19 template<
class AHitPtr,
class AInBoxAlgorithm,
size_t divisionX,
size_t divisionY>
27 using HoughBox =
typename AInBoxAlgorithm::HoughBox;
57 std::vector<std::pair<HoughBox, std::vector<AHitPtr>>>
60 AInBoxAlgorithm inBoxAlgorithm;
61 auto skipLowWeightNode = [minWeight](
const typename Super::Node * node) {
62 return not(node->getWeight() >= minWeight);
66 std::vector<std::pair<HoughBox, std::vector<AHitPtr>>> result;
69 result.push_back(std::move(*found));
A fast hough algorithm with rectangular boxes, which are split linearly by a fixed number of division...
void initialize()
Initialise the algorithm by constructing the hough tree from the parameters.
typename HoughTree::Node Node
Type of the nodes used in the tree for the search.
HoughTree * getTree() const
Getter for the tree used in the search in the hough plane.
int getMaxLevel() const
Getter for the currently set maximal level.
Convenience class for the typical usage-case: A box divisioned hough tree with maximum and minimum va...
std::vector< std::pair< HoughBox, std::vector< AHitPtr > > > findSingleBest(const Weight &minWeight)
Find only the leave with the highest weight = number of items.
void initialize()
Initialize the tree with the given values.
float getMaximumY() const
Return the maximum value in y direction.
SimpleBoxDivisionHoughTree(float maximumX, float maximumY, Width< 0 > overlapX=0, Width< 1 > overlapY=0)
Constructor using the given maximal level.
Width< 0 > getOverlapX() const
Return the overlap in x direction.
Width< 1 > m_overlapY
The overlap in Y direction.
float m_maximumY
The maximum value in y direction.
float getMaximumX() const
Return the maximum value in x direction.
Width< 0 > m_overlapX
The overlap in X direction.
typename AInBoxAlgorithm::HoughBox HoughBox
The HoughBox we use.
typename HoughBox::template Width< I > Width
Type of the width in coordinate I.
Width< 1 > getOverlapY() const
Return the overlap in y direction.
float m_maximumX
The maximum value in X direction.
std::unique_ptr< std::pair< ADomain, std::vector< T > > > findHeaviestLeafSingle(AItemInDomainMeasure &weightItemInDomain, int maxLevel, ASkipNodePredicate &skipNode)
Go through all children until the maxLevel is reached and find the leaf with the highest weight.
Abstract base class for different kinds of events.