![]() |
Belle II Software development
|
A QuadTreeProcessor for TrackHits. More...
#include <AxialHitQuadTreeProcessor.h>
Public Types | |
| using | Item |
| The QuadTree will only see items of this type. | |
| using | QuadTree |
| The used QuadTree. | |
| using | XSpan |
| This pair describes the span in X for a node. | |
| using | YSpan |
| This pair describes the span in Y for a node. | |
| using | XYSpans |
| This pair of spans describes the span of a node. | |
| using | QuadTreeChildren |
| Alias for the QuadTree Children. | |
| using | CandidateReceiver |
| This lambda function can be used for postprocessing. | |
Public Member Functions | |
| AxialHitQuadTreeProcessor (int lastLevel, int seedLevel, const XYSpans &ranges, PrecisionUtil::PrecisionFunction precisionFunction) | |
| Constructor. | |
| AxialHitQuadTreeProcessor (const TrackingUtilities::Vector2D &localOrigin, const YSpan &curvSpan, const TrackingUtilities::LookupTable< TrackingUtilities::Vector2D > *cosSinLookupTable) | |
| Constructor for the quad tree processor used in the off-origin extension. | |
| void | drawHits (std::vector< const TrackingUtilities::CDCWireHit * > hits, unsigned int color=46) const |
| Draw QuadTree node. | |
| void | drawNode (QuadTree *node) const |
| Draw QuadTree node. | |
| void | clear () |
| Delete all the QuadTreeItems in the tree and clear the tree. | |
| void | seed (const std::vector< const TrackingUtilities::CDCWireHit * > &datas) |
| Fill in the items in the given vector. | |
| std::vector< const TrackingUtilities::CDCWireHit * > | getAssignedItems () |
| Get items that have been assigned to the seed level The returned elements are unique even if items are assigned multiple times. | |
| void | fill (const CandidateReceiver &candidateReceiver, int nHitsThreshold) |
| Start filling the already created tree. | |
| void | fill (const CandidateReceiver &candidateReceiver, int nHitsThreshold, float yLimit) |
| Fill vector of QuadTree instances with hits. | |
| virtual void | afterFillDebugHook (QuadTreeChildren &children) |
| Override that function if you want to receive debug output whenever the children of a node are filled the first time Maybe you want to make some nice plots or statistics. | |
| const std::map< std::pair< long, float >, std::vector< Item * > > & | getDebugInformation () const |
| Return the debug information if collected. | |
Static Public Member Functions | |
| static const TrackingUtilities::LookupTable< TrackingUtilities::Vector2D > & | getCosSinLookupTable () |
| Get the standard lookup table containing equally spaces unit vectors (cos, sin) | |
| static std::vector< float > | createCurvBound (YSpan curvSpan, int lastLevel) |
| Constructs an array with the curvature bounds as generated by the default bin divisions. | |
Protected Member Functions | |
| bool | isLeaf (QuadTree *node) const final |
| lastLevel depends on curvature of the track candidate | |
| XYSpans | createChild (QuadTree *node, int i, int j) const final |
| Return the new ranges. | |
| bool | isInNode (QuadTree *node, const TrackingUtilities::CDCWireHit *wireHit) const final |
| Check whether hit belongs to the quadtree node: | |
| bool | checkDerivative (QuadTree *node, const TrackingUtilities::CDCWireHit *wireHit) const |
| Check derivative of the sinogram. | |
| bool | checkExtremum (QuadTree *node, const TrackingUtilities::CDCWireHit *wireHit) const |
| Checks whether extreme point is located within QuadTree node's ranges. | |
| virtual XYSpans | createChild (QuadTree *node, int iX, int iY) const |
| Implement that function if you want to provide a new processor. | |
| virtual bool | isInNode (QuadTree *node, const TrackingUtilities::CDCWireHit *item) const=0 |
| Implement that function if you want to provide a new processor. | |
| virtual bool | isLeaf (QuadTree *node) const |
| Function which checks if given node is leaf Implemented as virtual to keep possibility of changing lastLevel values depending on region is phase-space (i.e. | |
| int | getLastLevel () const |
| Return the parameter last level. | |
Protected Attributes | |
| std::unique_ptr< QuadTree > | m_quadTree |
| The quad tree we work with. | |
| std::deque< Item > | m_items |
| Storage space for the items that are referenced by the quad tree nodes. | |
| std::vector< QuadTree * > | m_seededTrees |
| Vector of QuadTrees QuadTree instances (which are filled in the vector) cover the whole Legendre phase-space; each instance is processes independently. | |
Private Member Functions | |
| void | fillGivenTree (QuadTree *node, const CandidateReceiver &candidateReceiver, int nItemsThreshold, float yLimit) |
| Internal function to do the real quad tree search: fill the nodes, check which of the n*m bins we need to process further and go one level deeper. | |
| void | createChildren (QuadTree *node, QuadTreeChildren &m_children) const |
| Creates the sub node of a given node. | |
| void | fillChildren (QuadTree *node, const std::vector< Item * > &items) |
| This function is called by fillGivenTree and fills the items into the corresponding children. | |
| void | callResultFunction (QuadTree *node, const CandidateReceiver &candidateReceiver) const |
| When a node is accepted as a result, we extract a vector with the items (back transformed to AData*) and pass it together with the result node to the candidate receiver function. | |
Private Attributes | |
| PrecisionUtil::PrecisionFunction | m_precisionFunction |
| Lambda which holds resolution function for the quadtree. | |
| TrackingUtilities::Vector2D | m_localOrigin |
| Local origin on which the phase space coordinates are centered. | |
| const TrackingUtilities::LookupTable< TrackingUtilities::Vector2D > * | m_cosSinLookupTable |
| Pinned lookup table for precomputed cosine and sine values. | |
| const double | c_curlCurv = 0.02 |
| The curvature above which the trajectory is considered a curler. | |
| bool | m_twoSidedPhaseSpace |
| Indicator whether the two sided phases space insertion check should be used This option should automatically split back to back tracks in the low curvature regions. | |
| int | m_lastLevel |
| The last level to be filled. | |
| int | m_seedLevel |
| The first level to be filled, effectively skip forward to this higher granularity level. | |
| bool | m_debugOutput |
| A flag to control the creation of the debug output. | |
| std::map< std::pair< long, float >, std::vector< Item * > > | m_debugOutputMap |
| The calculated debug map. | |
A QuadTreeProcessor for TrackHits.
Definition at line 31 of file AxialHitQuadTreeProcessor.h.
|
inherited |
This lambda function can be used for postprocessing.
Definition at line 62 of file QuadTreeProcessor.h.
|
inherited |
The QuadTree will only see items of this type.
Definition at line 44 of file QuadTreeProcessor.h.
|
inherited |
The used QuadTree.
Definition at line 47 of file QuadTreeProcessor.h.
|
inherited |
Alias for the QuadTree Children.
Definition at line 59 of file QuadTreeProcessor.h.
|
inherited |
This pair describes the span in X for a node.
Definition at line 50 of file QuadTreeProcessor.h.
|
inherited |
This pair of spans describes the span of a node.
Definition at line 56 of file QuadTreeProcessor.h.
|
inherited |
This pair describes the span in Y for a node.
Definition at line 53 of file QuadTreeProcessor.h.
| AxialHitQuadTreeProcessor | ( | int | lastLevel, |
| int | seedLevel, | ||
| const XYSpans & | ranges, | ||
| PrecisionUtil::PrecisionFunction | precisionFunction ) |
Constructor.
Definition at line 97 of file AxialHitQuadTreeProcessor.cc.
| AxialHitQuadTreeProcessor | ( | const TrackingUtilities::Vector2D & | localOrigin, |
| const YSpan & | curvSpan, | ||
| const TrackingUtilities::LookupTable< TrackingUtilities::Vector2D > * | cosSinLookupTable ) |
Constructor for the quad tree processor used in the off-origin extension.
Currently only used in zero level mode to collect hits that are in a phase space part with respect to the given point.
Definition at line 109 of file AxialHitQuadTreeProcessor.cc.
|
inlinevirtualinherited |
Override that function if you want to receive debug output whenever the children of a node are filled the first time Maybe you want to make some nice plots or statistics.
Definition at line 359 of file QuadTreeProcessor.h.
|
inlineprivateinherited |
When a node is accepted as a result, we extract a vector with the items (back transformed to AData*) and pass it together with the result node to the candidate receiver function.
Definition at line 291 of file QuadTreeProcessor.h.
|
protected |
Check derivative of the sinogram.
| node | QuadTree node |
| wireHit | pointer to the hit to check |
Definition at line 262 of file AxialHitQuadTreeProcessor.cc.
|
protected |
Checks whether extreme point is located within QuadTree node's ranges.
| node | QuadTree node |
| wireHit | hit to check |
Definition at line 281 of file AxialHitQuadTreeProcessor.cc.
|
inlineinherited |
Delete all the QuadTreeItems in the tree and clear the tree.
Definition at line 95 of file QuadTreeProcessor.h.
|
finalprotected |
Return the new ranges.
We do not use the standard ranges for the lower levels.
| node | quadtree node |
| i | theta index of the child |
| j | rho index of the child |
Definition at line 136 of file AxialHitQuadTreeProcessor.cc.
|
inlineprotectedvirtualinherited |
Implement that function if you want to provide a new processor.
It decides which node-spans the n * m children of the node should have. It is called when creating the nodes. The two indices iX and iY tell you where the new node will be created (as node.children[iX][iY]). You can check some information on the level or the x- or y-values by using the methods implemented for node.
Definition at line 314 of file QuadTreeProcessor.h.
|
inlineprivateinherited |
Creates the sub node of a given node.
This function is called by fillGivenTree. To calculate the spans of the children nodes the user-defined function createChiildWithParent is used.
Definition at line 252 of file QuadTreeProcessor.h.
|
static |
Constructs an array with the curvature bounds as generated by the default bin divisions.
Definition at line 65 of file AxialHitQuadTreeProcessor.cc.
| void drawHits | ( | std::vector< const TrackingUtilities::CDCWireHit * > | hits, |
| unsigned int | color = 46 ) const |
Draw QuadTree node.
Definition at line 310 of file AxialHitQuadTreeProcessor.cc.
| void drawNode | ( | QuadTree * | node | ) | const |
Draw QuadTree node.
Definition at line 352 of file AxialHitQuadTreeProcessor.cc.
|
inlineinherited |
Start filling the already created tree.
| candidateReceiver | the lambda function to call after a node was selected |
| nHitsThreshold | the threshold on the number of items |
Definition at line 171 of file QuadTreeProcessor.h.
|
inlineinherited |
Fill vector of QuadTree instances with hits.
| candidateReceiver | the lambda function to call after a node was selected |
| nHitsThreshold | the threshold on the number of items |
| yLimit | the threshold in the rho (curvature) variable |
Definition at line 182 of file QuadTreeProcessor.h.
This function is called by fillGivenTree and fills the items into the corresponding children.
For this the user-defined method isInNode is called.
Definition at line 268 of file QuadTreeProcessor.h.
|
inlineprivateinherited |
Internal function to do the real quad tree search: fill the nodes, check which of the n*m bins we need to process further and go one level deeper.
Definition at line 200 of file QuadTreeProcessor.h.
|
inlineinherited |
Get items that have been assigned to the seed level The returned elements are unique even if items are assigned multiple times.
Definition at line 152 of file QuadTreeProcessor.h.
|
static |
Get the standard lookup table containing equally spaces unit vectors (cos, sin)
It contains 2**16 + 1 sampling points between -pi and pi.
Definition at line 89 of file AxialHitQuadTreeProcessor.cc.
|
inlineinherited |
Return the debug information if collected.
Definition at line 371 of file QuadTreeProcessor.h.
|
inlineprotectedinherited |
Return the parameter last level.
Definition at line 349 of file QuadTreeProcessor.h.
|
finalprotected |
Check whether hit belongs to the quadtree node:
| node | quadtree node |
| wireHit | hit being checked |
Definition at line 194 of file AxialHitQuadTreeProcessor.cc.
|
protectedpure virtualinherited |
Implement that function if you want to provide a new processor.
It is called when filling the quad tree after creation. For every item in a node and every child node this function gets called and should decide, if the item should go into this child node or not.
| node | child node |
| item | item to be filled into the child node or not |
|
finalprotected |
lastLevel depends on curvature of the track candidate
Definition at line 121 of file AxialHitQuadTreeProcessor.cc.
|
inlineprotectedvirtualinherited |
Function which checks if given node is leaf Implemented as virtual to keep possibility of changing lastLevel values depending on region is phase-space (i.e.
setting lastLevel as a function of Y-variable)
Definition at line 337 of file QuadTreeProcessor.h.
|
inlineinherited |
Fill in the items in the given vector.
They are transformed to QuadTreeItems internally.
Definition at line 106 of file QuadTreeProcessor.h.
|
private |
The curvature above which the trajectory is considered a curler.
Definition at line 122 of file AxialHitQuadTreeProcessor.h.
|
private |
Pinned lookup table for precomputed cosine and sine values.
Definition at line 119 of file AxialHitQuadTreeProcessor.h.
|
privateinherited |
A flag to control the creation of the debug output.
Definition at line 398 of file QuadTreeProcessor.h.
|
privateinherited |
The calculated debug map.
Definition at line 401 of file QuadTreeProcessor.h.
|
protectedinherited |
Storage space for the items that are referenced by the quad tree nodes.
Definition at line 381 of file QuadTreeProcessor.h.
|
privateinherited |
The last level to be filled.
Definition at line 392 of file QuadTreeProcessor.h.
|
private |
Local origin on which the phase space coordinates are centered.
Definition at line 116 of file AxialHitQuadTreeProcessor.h.
|
private |
Lambda which holds resolution function for the quadtree.
Definition at line 113 of file AxialHitQuadTreeProcessor.h.
|
protectedinherited |
The quad tree we work with.
Definition at line 378 of file QuadTreeProcessor.h.
|
protectedinherited |
Vector of QuadTrees QuadTree instances (which are filled in the vector) cover the whole Legendre phase-space; each instance is processes independently.
Definition at line 388 of file QuadTreeProcessor.h.
|
privateinherited |
The first level to be filled, effectively skip forward to this higher granularity level.
Definition at line 395 of file QuadTreeProcessor.h.
|
private |
Indicator whether the two sided phases space insertion check should be used This option should automatically split back to back tracks in the low curvature regions.
Definition at line 128 of file AxialHitQuadTreeProcessor.h.