Belle II Software development
|
Findlet for finging intersections of sinosoidal curves in the 2D Hough space by iteratively calling fastInterceptFinder2d. More...
#include <FastInterceptFinder2DFPGA.h>
Public Types | |
using | IOTypes = std::tuple< AIOTypes... > |
Types that should be served to apply on invocation. | |
using | IOVectors = std::tuple< std::vector< AIOTypes >... > |
Vector types that should be served to apply on invocation. | |
Public Member Functions | |
FastInterceptFinder2DFPGA () | |
Find intercepts in the 2D Hough space. | |
void | exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) override |
Expose the parameters of the sub findlets. | |
void | initialize () override |
Create the store arrays. | |
void | apply (const std::vector< std::pair< VxdID, std::pair< long, long > > > &hits, std::vector< std::pair< double, double > > &tracks) override |
Load in the prepared hits and create tracks for extrapolation to PXD. | |
virtual std::string | getDescription () |
Brief description of the purpose of the concrete findlet. | |
virtual void | apply (ToVector< AIOTypes > &... ioVectors)=0 |
Main function executing the algorithm. | |
void | beginRun () override |
Receive and dispatch signal for the beginning of a new run. | |
void | beginEvent () override |
Receive and dispatch signal for the start of a new event. | |
void | endRun () override |
Receive and dispatch signal for the end of the run. | |
void | terminate () override |
Receive and dispatch Signal for termination of the event processing. | |
Protected Types | |
using | ToVector = typename ToVectorImpl< T >::Type |
Short hand for ToRangeImpl. | |
Protected Member Functions | |
void | addProcessingSignalListener (ProcessingSignalListener *psl) |
Register a processing signal listener to be notified. | |
int | getNProcessingSignalListener () |
Get the number of currently registered listeners. | |
Private Types | |
using | Super = TrackFindingCDC::Findlet< const std::pair< VxdID, std::pair< long, long > >, std::pair< double, double > > |
Parent class. | |
Private Member Functions | |
unsigned short | layerFilter (std::vector< bool > layer) |
Layer filter, checks if at least hits from 3 layers are in a set of hits. | |
void | fastInterceptFinder2d (const std::vector< std::pair< VxdID, std::pair< long, long > > > &hits, uint xmin, uint xmax, uint ymin, uint ymax, uint currentRecursion) |
find intercepts in the 2D Hough Space by recursively calling itself until no hits are assigned to a given Hough Space cell, or until the maximum number of recursions (m_maxRecursionLevel) is reached | |
void | FindHoughSpaceCluster () |
Find Hough Space clusters. | |
void | DepthFirstSearch (uint lastIndexX, uint lastIndexY) |
Perform depth first search recursive algorithm to find clusters in the Hough Space. | |
void | gnuplotoutput (const std::vector< std::pair< VxdID, std::pair< long, long > > > &hits) |
gnuplot output for debugging | |
Private Attributes | |
bool | m_param_isUFinder = true |
Is this the intercept finder for the u-side hits (r-phi) or v-side (r-z)? | |
uint | m_param_maxRecursionLevel = 6 |
maximum number of recursive calls of fastInterceptFinder2d | |
uint | m_param_nAngleSectors = 256 |
number of sectors of the Hough Space on the horizontal axis | |
uint | m_param_nVerticalSectors = 256 |
number of sectors of the Hough Space on the vertical axis | |
long | m_param_verticalHoughSpaceSize = convertFloatToInt(64, 6) |
vertical size of the Hough Space, defaults to the value for u-side | |
double | m_param_minimumX = -3.168 |
minimum x value of the Hough Space, defaults to the value for u-side | |
double | m_param_maximumX = 3.168 |
maximum x value of the Hough Space, defaults to the value for u-side | |
double | m_unitX = 0 |
HS unit size in x. | |
double | m_unitY = 0 |
HS unit size in y. | |
uint | m_param_MinimumHSClusterSize = 3 |
minimum cluster size of sectors belonging to intercepts in the Hough Space | |
uint | m_param_MaximumHSClusterSize = 1000 |
maximum cluster size of sectors belonging to intercepts in the Hough Space | |
uint | m_param_MaximumHSClusterSizeX = 1000 |
maximum cluster size in x of sectors belonging to intercepts in the Hough Space | |
uint | m_param_MaximumHSClusterSizeY = 1000 |
maximum cluster size in y of sectors belonging to intercepts in the Hough Space | |
std::array< long, 16385 > | m_HSSinValuesLUT = {0} |
Look-Up-Tables for values as cache to speed up calculation sine values of the Hough Space sector boarder coordinates. | |
std::array< long, 16385 > | m_HSCosValuesLUT = {0} |
cosine values of the Hough Space sector boarder coordinates | |
std::array< long, 16384 > | m_HSCenterSinValuesLUT = {0} |
sine values of the Hough Space sector center coordinates | |
std::array< long, 16384 > | m_HSCenterCosValuesLUT = {0} |
cosine values of the Hough Space sector center coordinates | |
std::array< long, 16385 > | m_HSYLUT = {0} |
y values of the Hough Space sector boarders | |
std::array< long, 16384 > | m_HSYCenterLUT = {0} |
y values of the Hough Space sector centers | |
std::array< double, 16385 > | m_HSXLUT = {0} |
x values of the Hough Space sector boarders | |
std::array< double, 16384 > | m_HSXCenterLUT = {0} |
x values of the Hough Space sector centers | |
std::vector< int > | m_SectorArray |
vector containing only the 1D representation of active cells to speed up processing | |
std::vector< std::pair< uint, uint > > | m_activeSectorArray |
vector containing information for each cell whether it contained enough hits after m_maxRecursionLevel to be "active". | |
uint | m_clusterCount = 0 |
count the clusters | |
uint | m_clusterSize = 0 |
size of the current cluster | |
bool | m_param_writeGnuplotOutput = false |
use gnuplot output? | |
std::string | m_param_gnuplotHSOutputFileName = "HSFPGA.plt" |
gnuplot HS output filename | |
std::string | m_param_gnuplotHSRectOutputFileName = "HSFPGARect.plt" |
gnuplot HS sector output filename | |
std::string | m_param_gnuplotHSCoGOutputFileName = "HSFPGACoG.plt" |
gnuplot HS sector output filename | |
std::ofstream | m_rectoutstream |
HS sector debug file. | |
std::ofstream | m_cogoutstream |
HS CoG debug file. | |
const std::string | m_const_rectColor [8] = {"blue", "cyan", "green", "yellow", "orange", "violet", "skyblue", "pink"} |
color definition for the sector debug output | |
uint | m_rectcounter = 1 |
count HS debug rectangles | |
std::pair< int, int > | m_clusterInitialPosition = std::make_pair(0, 0) |
start cell of the recursive cluster finding in the Hough Space | |
std::pair< int, int > | m_clusterCoG = std::make_pair(0, 0) |
center of gravity containing describing the current best track parameters in the Hough Space | |
std::vector< std::pair< double, double > > | m_trackCandidates |
vector containing track candidates, consisting of the found intersection values in the Hough Space | |
std::vector< ProcessingSignalListener * > | m_subordinaryProcessingSignalListeners |
References to subordinary signal processing listener contained in this findlet. | |
bool | m_initialized = false |
Flag to keep track whether initialization happened before. | |
bool | m_terminated = false |
Flag to keep track whether termination happened before. | |
std::string | m_initializedAs |
Name of the type during initialisation. | |
Findlet for finging intersections of sinosoidal curves in the 2D Hough space by iteratively calling fastInterceptFinder2d.
Definition at line 33 of file FastInterceptFinder2DFPGA.h.
|
inherited |
|
inherited |
|
private |
Parent class.
Definition at line 36 of file FastInterceptFinder2DFPGA.h.
|
protectedinherited |
Find intercepts in the 2D Hough space.
Definition at line 17 of file FastInterceptFinder2DFPGA.cc.
|
protectedinherited |
Register a processing signal listener to be notified.
Definition at line 55 of file CompositeProcessingSignalListener.cc.
|
override |
Load in the prepared hits and create tracks for extrapolation to PXD.
Definition at line 113 of file FastInterceptFinder2DFPGA.cc.
|
overridevirtualinherited |
Receive and dispatch signal for the start of a new event.
Reimplemented from ProcessingSignalListener.
Reimplemented in SpacePointTagger< Belle2::CKFToPXDResult, Belle2::PXDCluster >, SpacePointTagger< Belle2::CKFToSVDResult, Belle2::SVDCluster >, BaseEventTimeExtractor< RecoTrack * >, BaseEventTimeExtractor< TrackFindingCDC::CDCWireHit & >, SharingHitsMatcher< Belle2::TrackFindingCDC::CDCTrack, Belle2::TrackFindingCDC::CDCSegment2D >, MCSymmetric< BaseAxialSegmentPairFilter >, MCSymmetric< BaseFacetFilter >, MCSymmetric< BaseFacetRelationFilter >, MCSymmetric< BaseSegmentPairFilter >, MCSymmetric< BaseSegmentPairRelationFilter >, MCSymmetric< BaseSegmentRelationFilter >, MCSymmetric< BaseSegmentTripleFilter >, MCSymmetric< BaseSegmentTripleRelationFilter >, MCSymmetric< BaseTrackRelationFilter >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCFacet >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCWireHit, true >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCSegment2D >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCTrack >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCSegmentPair >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCSegmentTriple >, RecoTrackStorer, ROIFinder, and SVDHoughTracking.
Definition at line 31 of file CompositeProcessingSignalListener.cc.
|
overridevirtualinherited |
Receive and dispatch signal for the beginning of a new run.
Reimplemented from ProcessingSignalListener.
Reimplemented in LayerRelationFilter< AFilter >, FourHitFilter, QualityIndicatorFilter, ThreeHitFilter, TwoHitVirtualIPFilter, TwoHitVirtualIPQIFilter, RecoTrackStorer, ROIFinder, SpacePointLoaderAndPreparer, and TrackCandidateResultRefiner.
Definition at line 23 of file CompositeProcessingSignalListener.cc.
|
private |
Perform depth first search recursive algorithm to find clusters in the Hough Space.
lastIndexX | x-index of the last cell checked |
lastIndexY | y-index of the last cell checked |
Definition at line 316 of file FastInterceptFinder2DFPGA.cc.
|
overridevirtualinherited |
Receive and dispatch signal for the end of the run.
Reimplemented from ProcessingSignalListener.
Definition at line 39 of file CompositeProcessingSignalListener.cc.
|
overridevirtual |
Expose the parameters of the sub findlets.
Reimplemented from Findlet< const std::pair< VxdID, std::pair< long, long > >, std::pair< double, double > >.
Definition at line 21 of file FastInterceptFinder2DFPGA.cc.
|
private |
find intercepts in the 2D Hough Space by recursively calling itself until no hits are assigned to a given Hough Space cell, or until the maximum number of recursions (m_maxRecursionLevel) is reached
hits | vector containing the hits that are used for track finding |
xmin | minimum x-index of the sub-Hough Space in the current recursion step |
xmax | maximum x-index of the sub-Hough Space in the current recursion step |
ymin | minimum y-index of the sub-Hough Space in the current recursion step |
ymax | maximum y-index of the sub-Hough Space in the current recursion step |
currentRecursion | current recursion step, has to be < m_maxRecursionLevel |
Definition at line 145 of file FastInterceptFinder2DFPGA.cc.
|
private |
Find Hough Space clusters.
Loop over all found sectors in m_SectorArray and then calls the DepthFirstSearch function to recursively find the clusters
Definition at line 246 of file FastInterceptFinder2DFPGA.cc.
|
inlinevirtualinherited |
|
protectedinherited |
Get the number of currently registered listeners.
Definition at line 60 of file CompositeProcessingSignalListener.cc.
|
private |
gnuplot output for debugging
Definition at line 348 of file FastInterceptFinder2DFPGA.cc.
|
overridevirtual |
Create the store arrays.
Reimplemented from ProcessingSignalListener.
Definition at line 72 of file FastInterceptFinder2DFPGA.cc.
|
inlineprivate |
Layer filter, checks if at least hits from 3 layers are in a set of hits.
layer | bool-vector containing information whether there is a hit in a layer |
Definition at line 56 of file FastInterceptFinder2DFPGA.h.
|
overridevirtualinherited |
Receive and dispatch Signal for termination of the event processing.
Reimplemented from ProcessingSignalListener.
Reimplemented in StereoHitTrackQuadTreeMatcher< Belle2::TrackFindingCDC::HyperHough >, StereoHitTrackQuadTreeMatcher< Belle2::TrackFindingCDC::QuadraticLegendre >, and StereoHitTrackQuadTreeMatcher< Belle2::TrackFindingCDC::Z0TanLambdaLegendre >.
Definition at line 47 of file CompositeProcessingSignalListener.cc.
|
private |
vector containing information for each cell whether it contained enough hits after m_maxRecursionLevel to be "active".
The value will be (- number of hits) for an active cell after fastInterceptFinder2d or 0 for an inactive cell, The value will be positive with the cluster number assigned to it after cluster finding
Definition at line 144 of file FastInterceptFinder2DFPGA.h.
|
private |
center of gravity containing describing the current best track parameters in the Hough Space
Definition at line 171 of file FastInterceptFinder2DFPGA.h.
|
private |
count the clusters
Definition at line 147 of file FastInterceptFinder2DFPGA.h.
|
private |
start cell of the recursive cluster finding in the Hough Space
Definition at line 169 of file FastInterceptFinder2DFPGA.h.
|
private |
size of the current cluster
Definition at line 149 of file FastInterceptFinder2DFPGA.h.
|
private |
HS CoG debug file.
Definition at line 162 of file FastInterceptFinder2DFPGA.h.
|
private |
color definition for the sector debug output
Definition at line 164 of file FastInterceptFinder2DFPGA.h.
|
private |
cosine values of the Hough Space sector center coordinates
Definition at line 128 of file FastInterceptFinder2DFPGA.h.
|
private |
sine values of the Hough Space sector center coordinates
Definition at line 126 of file FastInterceptFinder2DFPGA.h.
|
private |
cosine values of the Hough Space sector boarder coordinates
Definition at line 124 of file FastInterceptFinder2DFPGA.h.
|
private |
Look-Up-Tables for values as cache to speed up calculation sine values of the Hough Space sector boarder coordinates.
Definition at line 122 of file FastInterceptFinder2DFPGA.h.
|
private |
x values of the Hough Space sector centers
Definition at line 136 of file FastInterceptFinder2DFPGA.h.
|
private |
x values of the Hough Space sector boarders
Definition at line 134 of file FastInterceptFinder2DFPGA.h.
|
private |
y values of the Hough Space sector centers
Definition at line 132 of file FastInterceptFinder2DFPGA.h.
|
private |
y values of the Hough Space sector boarders
Definition at line 130 of file FastInterceptFinder2DFPGA.h.
|
privateinherited |
Flag to keep track whether initialization happened before.
Definition at line 52 of file ProcessingSignalListener.h.
|
privateinherited |
Name of the type during initialisation.
Definition at line 58 of file ProcessingSignalListener.h.
|
private |
gnuplot HS sector output filename
Definition at line 158 of file FastInterceptFinder2DFPGA.h.
|
private |
gnuplot HS output filename
Definition at line 154 of file FastInterceptFinder2DFPGA.h.
|
private |
gnuplot HS sector output filename
Definition at line 156 of file FastInterceptFinder2DFPGA.h.
|
private |
Is this the intercept finder for the u-side hits (r-phi) or v-side (r-z)?
Definition at line 87 of file FastInterceptFinder2DFPGA.h.
|
private |
maximum cluster size of sectors belonging to intercepts in the Hough Space
Definition at line 114 of file FastInterceptFinder2DFPGA.h.
|
private |
maximum cluster size in x of sectors belonging to intercepts in the Hough Space
Definition at line 116 of file FastInterceptFinder2DFPGA.h.
|
private |
maximum cluster size in y of sectors belonging to intercepts in the Hough Space
Definition at line 118 of file FastInterceptFinder2DFPGA.h.
|
private |
maximum x value of the Hough Space, defaults to the value for u-side
Definition at line 104 of file FastInterceptFinder2DFPGA.h.
|
private |
maximum number of recursive calls of fastInterceptFinder2d
Definition at line 90 of file FastInterceptFinder2DFPGA.h.
|
private |
minimum cluster size of sectors belonging to intercepts in the Hough Space
Definition at line 112 of file FastInterceptFinder2DFPGA.h.
|
private |
minimum x value of the Hough Space, defaults to the value for u-side
Definition at line 102 of file FastInterceptFinder2DFPGA.h.
|
private |
number of sectors of the Hough Space on the horizontal axis
Definition at line 93 of file FastInterceptFinder2DFPGA.h.
|
private |
number of sectors of the Hough Space on the vertical axis
Definition at line 96 of file FastInterceptFinder2DFPGA.h.
|
private |
vertical size of the Hough Space, defaults to the value for u-side
Definition at line 99 of file FastInterceptFinder2DFPGA.h.
|
private |
use gnuplot output?
Definition at line 152 of file FastInterceptFinder2DFPGA.h.
|
private |
count HS debug rectangles
Definition at line 166 of file FastInterceptFinder2DFPGA.h.
|
private |
HS sector debug file.
Definition at line 160 of file FastInterceptFinder2DFPGA.h.
|
private |
vector containing only the 1D representation of active cells to speed up processing
Definition at line 139 of file FastInterceptFinder2DFPGA.h.
|
privateinherited |
References to subordinary signal processing listener contained in this findlet.
Definition at line 52 of file CompositeProcessingSignalListener.h.
|
privateinherited |
Flag to keep track whether termination happened before.
Definition at line 55 of file ProcessingSignalListener.h.
|
private |
vector containing track candidates, consisting of the found intersection values in the Hough Space
Definition at line 174 of file FastInterceptFinder2DFPGA.h.
|
private |
HS unit size in x.
Definition at line 107 of file FastInterceptFinder2DFPGA.h.
|
private |
HS unit size in y.
Definition at line 109 of file FastInterceptFinder2DFPGA.h.