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 <tracking/trackFindingCDC/topology/ILayer.h>
14#include <tracking/trackFindingCDC/geometry/Vector2D.h>
15
16namespace Belle2 {
21 namespace TrackFindingCDC {
23 class ImpactTag;
24
26 using DiscreteImpact = DiscreteValue<float, ImpactTag>;
27
29 using ContinuousImpact = ContinuousValue<double, ImpactTag>;
30
32 class CurvTag;
33
35 using DiscreteCurv = DiscreteValue<float, CurvTag>;
36
38 using ContinuousCurv = ContinuousValue<double, CurvTag>;
39
45 public:
47 explicit CurvWithArcLength2DCache(float curv);
48
50 explicit operator float() const
51 {
52 return m_curv;
53 }
54
56 float getArcLength2D(ILayer iCLayer, bool secondArm = false) const
57 {
58 return secondArm ? m_secondaryArcLength2DByICLayer[iCLayer] : m_arcLength2DByICLayer[iCLayer];
59 }
60
62 friend std::ostream& operator<<(std::ostream& output, const CurvWithArcLength2DCache& value)
63 {
64 return output << value.m_curv;
65 }
66
67 private:
69 float m_curv;
70
72 std::array<float, 56> m_arcLength2DByICLayer;
73
75 std::array<float, 56> m_secondaryArcLength2DByICLayer;
76 };
77
80
82 class TanLTag;
83
86
89
91 class Z0Tag;
92
95
97 class Phi0Tag;
98
101
102 // NOTE The following is for quadratic and hyperbolic tracks
104 class PTag;
105
108
111
113 class QTag;
114
117
120 }
122}
Type to have values not based on discrete positions from an array.
Class representing a curvature value that also caches two dimensional arc length to each layer in the...
Definition: StandardAxes.h:44
float getArcLength2D(ILayer iCLayer, bool secondArm=false) const
Return the two dimensional arc length to the given layer id.
Definition: StandardAxes.h:56
std::array< float, 56 > m_secondaryArcLength2DByICLayer
Memory for two dimensional arc length at each layer on the second arm.
Definition: StandardAxes.h:75
std::array< float, 56 > m_arcLength2DByICLayer
Memory for two dimensional arc length at each layer.
Definition: StandardAxes.h:72
friend std::ostream & operator<<(std::ostream &output, const CurvWithArcLength2DCache &value)
Output operator for debugging.
Definition: StandardAxes.h:62
Representation for a discrete position in an array of discrete positions.
Definition: DiscreteValue.h:23
Abstract base class for different kinds of events.