 |
Belle II Software
release-05-02-19
|
11 #include <tracking/trackFindingCDC/hough/trees/BoxDivisionHoughTree.h>
18 namespace TrackFindingCDC {
21 template<
class AHitPtr,
class AInBoxAlgorithm,
size_t divisionX,
size_t divisionY>
22 class SimpleBoxDivisionHoughTree :
public BoxDivisionHoughTree<AHitPtr, typename AInBoxAlgorithm::HoughBox, divisionX, divisionY> {
26 using Super = BoxDivisionHoughTree<AHitPtr, typename AInBoxAlgorithm::HoughBox, divisionX, divisionY>;
29 using HoughBox =
typename AInBoxAlgorithm::HoughBox;
59 std::vector<std::pair<HoughBox, std::vector<AHitPtr>>>
62 AInBoxAlgorithm inBoxAlgorithm;
63 auto skipLowWeightNode = [minWeight](
const typename Super::Node * node) {
64 return not(node->getWeight() >= minWeight);
68 std::vector<std::pair<HoughBox, std::vector<AHitPtr>>> result;
71 result.push_back(std::move(*found));
Width< 0 > m_overlapX
The overlap in X direction.
SimpleBoxDivisionHoughTree(float maximumX, float maximumY, Width< 0 > overlapX=0, Width< 1 > overlapY=0)
Constructor using the given maximal level.
typename HoughBox::template Width< I > Width
Type of the width in coordinate I.
typename HoughBox::template Width< I > Width
Type of the width in coordinate I.
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.
HoughTree * getTree() const
Getter for the tree used in the search in the hough plane.
float m_maximumX
The maximum value in X direction.
A fast hough algorithm with rectangular boxes, which are split linearly by a fixed number of division...
typename HoughTree::Node Node
Type of the nodes used in the tree for the search.
float getMaximumY() const
Return the maximum value in y direction.
Width< 0 > getOverlapX() const
Return the overlap in x direction.
Abstract base class for different kinds of events.
void initialize()
Initialise the algorithm by constructing the hough tree from the parameters.
int getMaxLevel() const
Getter for the currently set maximal level.
std::vector< std::pair< HoughBox, std::vector< AHitPtr > > > findSingleBest(const Weight &minWeight)
Find only the leave with the highest weight = number of items.
Width< 1 > getOverlapY() const
Return the overlap in y direction.
void initialize()
Initialize the tree with the given values.
BoxDivisionHoughTree< AHitPtr, typename AInBoxAlgorithm::HoughBox, divisionX, divisionY > Super
The Super class.
typename AInBoxAlgorithm::HoughBox HoughBox
The HoughBox we use.
float getMaximumX() const
Return the maximum value in x direction.
float m_maximumY
The maximum value in y direction.
Width< 1 > m_overlapY
The overlap in Y direction.