10#include <tracking/trackingUtilities/findlets/base/Findlet.h>
14#include <unordered_map>
23 namespace vxdHoughTracking {
46 void apply(std::vector<VXDHoughState>& hits, std::vector<std::vector<VXDHoughState*>>& rawTrackCandidates)
override;
52 static inline unsigned short layerFilter(
const std::bitset<8>& layer)
54 ushort layercount =
static_cast<ushort
>(layer.count());
55 return (layercount >= 3 ? layercount : 0);
66 void fastInterceptFinder2d(
const std::vector<VXDHoughState*>& hits,
const ushort xmin,
const ushort xmax,
67 const ushort ymin,
const ushort ymax,
const ushort currentRecursion);
The Module parameter list class.
Interface for a minimal algorithm part that wants to expose some parameters to a module.
std::unordered_map< uint, std::vector< VXDHoughState * > > m_activeSectorsMap
Map containing only active HS sectors, i.e.
ushort m_maxRecursionLevel
maximum number of recursive calls of FastInterceptFinder2d
float m_unitX
HS unit size in x.
void FindHoughSpaceCluster()
Find Hough Space clusters.
static unsigned short layerFilter(const std::bitset< 8 > &layer)
layer filter, checks if at least hits from 3 layers are in a set of hits
std::array< float, c_maxLUTSize > m_HSSinValuesLUT
Look-Up-Tables for values as cache to speed up calculation sine values of the Hough Space sector boar...
std::vector< uint > m_activeSectorsIndices
Cache the global indices of the active sectors for sorted access.
void initialize() override
Create the store arrays.
SingleHoughSpaceFastInterceptFinder()
Find intercepts in the 2D Hough space.
std::vector< std::vector< VXDHoughState * > > m_trackCandidates
vector containing track candidates, consisting of the found intersection values in the Hough Space
ushort m_nVerticalSectors
number of sectors of the Hough Space on the vertical axis
float m_minimumX
minimum x value of the Hough Space, defaults to the value for u-side
std::pair< ushort, ushort > m_clusterInitialPosition
start cell of the recursive cluster finding in the Hough Space
std::array< float, c_maxHSSectorNumber > m_HSCenterSinValuesLUT
sine values of the Hough Space sector center coordinates
TrackingUtilities::Findlet< VXDHoughState, std::vector< VXDHoughState * > > Super
Parent class.
void fastInterceptFinder2d(const std::vector< VXDHoughState * > &hits, const ushort xmin, const ushort xmax, const ushort ymin, const ushort ymax, const ushort currentRecursion)
find intercepts in the 2D Hough Space by recursively calling itself until no hits are assigned to a g...
ushort m_MaximumHSClusterSizeX
maximum cluster size in x of sectors belonging to intercepts in the Hough Space
ushort m_MaximumHSClusterSize
maximum cluster size of sectors belonging to intercepts in the Hough Space
static const ushort c_maxAllowedRecusionLevel
Define some magic numbers Maximum allowed recursion level.
static constexpr ushort c_maxLUTSize
Look-Up-Table size including the right-most value.
ushort m_nAngleSectors
number of sectors of the Hough Space on the horizontal axis
static constexpr ushort c_maxHSSectorNumber
Maximum number of HS sectors in x and y, also the size of some of the the Look-Up-Tables (LUTs) below...
std::array< float, c_maxLUTSize > m_HSCosValuesLUT
cosine values of the Hough Space sector boarder coordinates
ushort m_clusterCount
count the clusters
ushort m_clusterSize
size of the current cluster
std::array< float, c_maxHSSectorNumber > m_HSCenterCosValuesLUT
cosine values of the Hough Space sector center coordinates
std::vector< VXDHoughState * > m_currentTrackCandidate
the current track candidate
ushort m_MinimumHSClusterSize
minimum cluster size of sectors belonging to intercepts in the Hough Space
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the sub findlets.
void apply(std::vector< VXDHoughState > &hits, std::vector< std::vector< VXDHoughState * > > &rawTrackCandidates) override
Load in the prepared hits and create track candidates for further processing like hit filtering and f...
float m_verticalHoughSpaceSize
vertical size of the Hough Space, defaults to the value for u-side
static constexpr ushort c_xIndexBitMask
Bit mask for coordinate transformation, creates all-ones for the coordinate system conversion.
float m_maximumX
maximum x value of the Hough Space, defaults to the value for u-side
float m_unitY
HS unit size in y.
void DepthFirstSearch(const uint lastGlobalSectorIndex)
Perform depth first search recursive algorithm to find clusters in the Hough Space.
ushort m_MaximumHSClusterSizeY
maximum cluster size in y of sectors belonging to intercepts in the Hough Space
Simple container for hit information to be used during intercept finding.
Abstract base class for different kinds of events.