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
15#include <Math/Vector2D.h>
16
17#include <vector>
18
19namespace Belle2 {
24
25 namespace TrackingUtilities {
26 class CDCWireHit;
27 }
28
29 namespace TrackFindingCDC {
30
32 class AxialHitQuadTreeProcessor : public QuadTreeProcessor<long, float, const TrackingUtilities::CDCWireHit> {
33
34 public:
44 static std::vector<float> createCurvBound(YSpan curvSpan, int lastLevel);
45
46 public:
48 AxialHitQuadTreeProcessor(int lastLevel,
49 int seedLevel,
50 const XYSpans& ranges,
51 PrecisionUtil::PrecisionFunction precisionFunction);
52
58 AxialHitQuadTreeProcessor(const ROOT::Math::XYVector& localOrigin,
59 const YSpan& curvSpan,
61
62 protected: // Section of specialized functions
66 bool isLeaf(QuadTree* node) const final;
67
75 XYSpans createChild(QuadTree* node, int i, int j) const final;
76
83 bool isInNode(QuadTree* node, const TrackingUtilities::CDCWireHit* wireHit) const final;
84
85 protected: // Implementation details
96 bool checkDerivative(QuadTree* node, const TrackingUtilities::CDCWireHit* wireHit) const;
97
104 bool checkExtremum(QuadTree* node, const TrackingUtilities::CDCWireHit* wireHit) const;
105
106 public: // debug stuff
108 void drawHits(std::vector<const TrackingUtilities::CDCWireHit*> hits, unsigned int color = 46) const;
110 void drawNode(QuadTree* node) const;
111
112 private:
115
117 ROOT::Math::XYVector m_localOrigin;
118
121
123 const double c_curlCurv = 0.02;
124
130 };
131 }
133}
XYSpans createChild(QuadTree *node, int i, int j) const final
Return the new ranges.
ROOT::Math::XYVector m_localOrigin
Local origin on which the phase space coordinates are centered.
const double c_curlCurv
The curvature above which the trajectory is considered a curler.
const TrackingUtilities::LookupTable< ROOT::Math::XYVector > * m_cosSinLookupTable
Pinned lookup table for precomputed cosine and sine values.
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.
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.
void drawNode(QuadTree *node) const
Draw QuadTree node.
static const TrackingUtilities::LookupTable< ROOT::Math::XYVector > & 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.
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:56
Class which holds precomputed values of a function.
Definition LookupTable.h:50
Abstract base class for different kinds of events.