Belle II Software development
AxialHitQuadTreeProcessor.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#pragma once
9
10#include <tracking/trackFindingCDC/legendre/quadtree/QuadTreeProcessor.h>
11#include <tracking/trackFindingCDC/legendre/precisionFunctions/PrecisionUtil.h>
12
13#include <tracking/trackFindingCDC/numerics/LookupTable.h>
14#include <tracking/trackFindingCDC/geometry/Vector2D.h>
15
16#include <vector>
17
18namespace Belle2 {
23 namespace TrackFindingCDC {
24
26 class AxialHitQuadTreeProcessor : public QuadTreeProcessor<long, float, const CDCWireHit> {
27
28 public:
38 static std::vector<float> createCurvBound(YSpan curvSpan, int lastLevel);
39
40 public:
42 AxialHitQuadTreeProcessor(int lastLevel,
43 int seedLevel,
44 const XYSpans& ranges,
45 PrecisionUtil::PrecisionFunction precisionFunction);
46
52 AxialHitQuadTreeProcessor(const Vector2D& localOrigin,
53 const YSpan& curvSpan,
54 const LookupTable<Vector2D>* cosSinLookupTable);
55
56 protected: // Section of specialized functions
60 bool isLeaf(QuadTree* node) const final;
61
69 XYSpans createChild(QuadTree* node, int i, int j) const final;
70
77 bool isInNode(QuadTree* node, const CDCWireHit* wireHit) const final;
78
79 protected: // Implementation details
90 bool checkDerivative(QuadTree* node, const CDCWireHit* wireHit) const;
91
98 bool checkExtremum(QuadTree* node, const CDCWireHit* wireHit) const;
99
100 public: // debug stuff
102 void drawHits(std::vector<const CDCWireHit*> hits, unsigned int color = 46) const;
104 void drawNode(QuadTree* node) const;
105
106 private:
109
112
118
120 const double c_curlCurv = 0.02;
121
124 };
125 }
127}
XYSpans createChild(QuadTree *node, int i, int j) const final
Return the new ranges.
const double c_curlCurv
The curvature above which the trajectory is considered a curler.
bool checkDerivative(QuadTree *node, const CDCWireHit *wireHit) const
Check derivative of the sinogram.
void drawHits(std::vector< const CDCWireHit * > hits, unsigned int color=46) const
Draw QuadTree node.
bool m_twoSidedPhaseSpace
Indicator whether the two sided phases space insertion check should be used This option should automa...
Vector2D m_localOrigin
Local origin on which the phase space coordinates are centered.
const LookupTable< Vector2D > * m_cosSinLookupTable
Pinned lookup table for precompute cosine and sine values.
bool isLeaf(QuadTree *node) const final
lastLevel depends on curvature of the track candidate
bool checkExtremum(QuadTree *node, const CDCWireHit *wireHit) const
Checks whether extremum point is located whithin QuadTree node's ranges.
PrecisionUtil::PrecisionFunction m_precisionFunction
Lambda which holds resolution function for the quadtree.
bool isInNode(QuadTree *node, const CDCWireHit *wireHit) const final
Check whether hit belongs to the quadtree node:
static const LookupTable< Vector2D > & getCosSinLookupTable()
Get the standard lookup table containing equally spaces unit vectors (cos, sin)
void drawNode(QuadTree *node) const
Draw QuadTree node.
static std::vector< float > createCurvBound(YSpan curvSpan, int lastLevel)
Constructs an array with the curvature bounds as generated by the default bin divisions.
Class representing a hit wire in the central drift chamber.
Definition: CDCWireHit.h:55
Class which holds precomputed values of a function.
Definition: LookupTable.h:50
std::function< double(double)> PrecisionFunction
Function type which is used for resolution calculations (resolution=f(curvature)) Takes a curvature v...
Definition: PrecisionUtil.h:43
Class which holds quadtree structure.
Definition: QuadTreeNode.h:29
This abstract class serves as a base class for all implementations of track processors.
std::pair< XSpan, YSpan > XYSpans
This pair of spans describes the span of a node.
typename QuadTree::YSpan YSpan
This pair describes the span in Y for a node.
A two dimensional vector which is equipped with functions for correct handeling of orientation relat...
Definition: Vector2D.h:32
Abstract base class for different kinds of events.