Belle II Software development
StandardAxes.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/hough/axes/DiscreteValue.h>
11#include <tracking/trackFindingCDC/hough/axes/ContinuousValue.h>
12
13#include <cdc/topology/ILayer.h>
14
15#include <Math/Vector2D.h>
16
17namespace Belle2 {
22 namespace TrackFindingCDC {
24 class ImpactTag;
25
27 using DiscreteImpact = DiscreteValue<float, ImpactTag>;
28
30 using ContinuousImpact = ContinuousValue<double, ImpactTag>;
31
33 class CurvTag;
34
36 using DiscreteCurv = DiscreteValue<float, CurvTag>;
37
39 using ContinuousCurv = ContinuousValue<double, CurvTag>;
40
46 public:
48 explicit CurvWithArcLength2DCache(float curv);
49
51 explicit operator float() const
52 {
53 return m_curv;
54 }
55
57 float getArcLength2D(CDC::ILayer iCLayer, bool secondArm = false) const
58 {
59 return secondArm ? m_secondaryArcLength2DByICLayer[iCLayer] : m_arcLength2DByICLayer[iCLayer];
60 }
61
63 friend std::ostream& operator<<(std::ostream& output, const CurvWithArcLength2DCache& value)
64 {
65 return output << value.m_curv;
66 }
67
68 private:
70 std::array<float, 56> m_arcLength2DByICLayer;
71
73 std::array<float, 56> m_secondaryArcLength2DByICLayer;
74
76 float m_curv;
77 };
78
80 using DiscreteCurvWithArcLength2DCache = DiscreteValue<CurvWithArcLength2DCache, CurvTag>;
81
83 class TanLTag;
84
86 using DiscreteTanL = DiscreteValue<float, TanLTag>;
87
89 using ContinuousTanL = ContinuousValue<double, TanLTag>;
90
92 class Z0Tag;
93
95 using DiscreteZ0 = DiscreteValue<float, Z0Tag>;
96
98 class Phi0Tag;
99
102
103 // NOTE The following is for quadratic and hyperbolic tracks
105 class PTag;
106
108 using DiscreteP = DiscreteValue<float, PTag>;
109
111 using ContinuousP = ContinuousValue<double, PTag>;
112
114 class QTag;
115
117 using DiscreteQ = DiscreteValue<float, QTag>;
118
120 using ContinuousQ = ContinuousValue<double, QTag>;
121 }
123}
Type to have values not based on discrete positions from an array.
CurvWithArcLength2DCache(float curv)
Make cache for one curvature value.
float getArcLength2D(CDC::ILayer iCLayer, bool secondArm=false) const
Return the two dimensional arc length to the given layer id.
std::array< float, 56 > m_secondaryArcLength2DByICLayer
Memory for two dimensional arc length at each layer on the second arm.
std::array< float, 56 > m_arcLength2DByICLayer
Memory for two dimensional arc length at each layer.
friend std::ostream & operator<<(std::ostream &output, const CurvWithArcLength2DCache &value)
Output operator for debugging.
Representation for a discrete position in an array of discrete positions.
signed short ILayer
The type of the layer ids enumerating layers within a superlayer.
Definition ILayer.h:18
Abstract base class for different kinds of events.