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/trackingUtilities/numerics/LookupTable.h>
14#include <tracking/trackingUtilities/geometry/Vector2D.h>
15
16#include <vector>
17
18namespace Belle2 {
23
24 namespace TrackingUtilities {
25 class CDCWireHit;
26 }
27
28 namespace TrackFindingCDC {
29
31 class AxialHitQuadTreeProcessor : public QuadTreeProcessor<long, float, const TrackingUtilities::CDCWireHit> {
32
33 public:
43 static std::vector<float> createCurvBound(YSpan curvSpan, int lastLevel);
44
45 public:
47 AxialHitQuadTreeProcessor(int lastLevel,
48 int seedLevel,
49 const XYSpans& ranges,
50 PrecisionUtil::PrecisionFunction precisionFunction);
51
58 const YSpan& curvSpan,
60
61 protected: // Section of specialized functions
65 bool isLeaf(QuadTree* node) const final;
66
74 XYSpans createChild(QuadTree* node, int i, int j) const final;
75
82 bool isInNode(QuadTree* node, const TrackingUtilities::CDCWireHit* wireHit) const final;
83
84 protected: // Implementation details
95 bool checkDerivative(QuadTree* node, const TrackingUtilities::CDCWireHit* wireHit) const;
96
103 bool checkExtremum(QuadTree* node, const TrackingUtilities::CDCWireHit* wireHit) const;
104
105 public: // debug stuff
107 void drawHits(std::vector<const TrackingUtilities::CDCWireHit*> hits, unsigned int color = 46) const;
109 void drawNode(QuadTree* node) const;
110
111 private:
114
117
120
122 const double c_curlCurv = 0.02;
123
129 };
130 }
132}
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 m_twoSidedPhaseSpace
Indicator whether the two sided phases space insertion check should be used This option should automa...
void drawHits(std::vector< const TrackingUtilities::CDCWireHit * > hits, unsigned int color=46) const
Draw QuadTree node.
TrackingUtilities::Vector2D m_localOrigin
Local origin on which the phase space coordinates are centered.
bool checkDerivative(QuadTree *node, const TrackingUtilities::CDCWireHit *wireHit) const
Check derivative of the sinogram.
bool isLeaf(QuadTree *node) const final
lastLevel depends on curvature of the track candidate
bool isInNode(QuadTree *node, const TrackingUtilities::CDCWireHit *wireHit) const final
Check whether hit belongs to the quadtree node:
bool checkExtremum(QuadTree *node, const TrackingUtilities::CDCWireHit *wireHit) const
Checks whether extreme point is located within QuadTree node's ranges.
AxialHitQuadTreeProcessor(int lastLevel, int seedLevel, const XYSpans &ranges, PrecisionUtil::PrecisionFunction precisionFunction)
Constructor.
PrecisionUtil::PrecisionFunction m_precisionFunction
Lambda which holds resolution function for the quadtree.
static const TrackingUtilities::LookupTable< TrackingUtilities::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.
const TrackingUtilities::LookupTable< TrackingUtilities::Vector2D > * m_cosSinLookupTable
Pinned lookup table for precomputed cosine and sine values.
std::function< double(double)> PrecisionFunction
Function type which is used for resolution calculations (resolution=f(curvature)) Takes a curvature v...
QuadTreeProcessor(int lastLevel, int seedLevel, const XYSpans &xySpans, bool debugOutput=false)
Class representing a hit wire in the central drift chamber.
Definition CDCWireHit.h:58
Class which holds precomputed values of a function.
Definition LookupTable.h:50
A two dimensional vector which is equipped with functions for correct handling of orientation relate...
Definition Vector2D.h:36
Abstract base class for different kinds of events.