Belle II Software  release-05-01-25
StandardAxes.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2016 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Oliver Frost, Nils Braun, Dmitrii Neverov *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #pragma once
11 
12 #include <tracking/trackFindingCDC/hough/axes/DiscreteValue.h>
13 #include <tracking/trackFindingCDC/hough/axes/ContinuousValue.h>
14 
15 #include <tracking/trackFindingCDC/topology/ILayer.h>
16 #include <tracking/trackFindingCDC/geometry/Vector2D.h>
17 
18 namespace Belle2 {
23  namespace TrackFindingCDC {
25  class ImpactTag;
26 
28  using DiscreteImpact = DiscreteValue<float, ImpactTag>;
29 
31  using ContinuousImpact = ContinuousValue<double, ImpactTag>;
32 
34  class CurvTag;
35 
37  using DiscreteCurv = DiscreteValue<float, CurvTag>;
38 
40  using ContinuousCurv = ContinuousValue<double, CurvTag>;
41 
46  class CurvWithArcLength2DCache {
47  public:
49  explicit CurvWithArcLength2DCache(float curv);
50 
52  explicit operator float() const
53  {
54  return m_curv;
55  }
56 
58  float getArcLength2D(ILayer iCLayer, bool secondArm = false) const
59  {
60  return secondArm ? m_secondaryArcLength2DByICLayer[iCLayer] : m_arcLength2DByICLayer[iCLayer];
61  }
62 
64  friend std::ostream& operator<<(std::ostream& output, const CurvWithArcLength2DCache& value)
65  {
66  return output << value.m_curv;
67  }
68 
69  private:
71  float m_curv;
72 
74  std::array<float, 56> m_arcLength2DByICLayer;
75 
77  std::array<float, 56> m_secondaryArcLength2DByICLayer;
78  };
79 
82 
84  class TanLTag;
85 
88 
91 
93  class Z0Tag;
94 
97 
99  class Phi0Tag;
100 
103 
104  // NOTE The following is for quadratic and hyperbolic tracks
106  class PTag;
107 
110 
113 
115  class QTag;
116 
119 
122  }
124 }
Belle2::TrackFindingCDC::CurvWithArcLength2DCache::m_secondaryArcLength2DByICLayer
std::array< float, 56 > m_secondaryArcLength2DByICLayer
Memory for two dimensional arc length at each layer on the second arm.
Definition: StandardAxes.h:85
Belle2::TrackFindingCDC::CurvWithArcLength2DCache::m_curv
float m_curv
Memory for the curvature.
Definition: StandardAxes.h:79
Belle2::TrackFindingCDC::DiscreteValue
Representation for a discrete position in an array of discrete positions.
Definition: DiscreteValue.h:33
Belle2::TrackFindingCDC::CurvWithArcLength2DCache::m_arcLength2DByICLayer
std::array< float, 56 > m_arcLength2DByICLayer
Memory for two dimensional arc length at each layer.
Definition: StandardAxes.h:82
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::CurvWithArcLength2DCache
Class representing a curvature value that also caches two dimensional arc length to each layer in the...
Definition: StandardAxes.h:54
Belle2::TrackFindingCDC::CurvWithArcLength2DCache::operator<<
friend std::ostream & operator<<(std::ostream &output, const CurvWithArcLength2DCache &value)
Output operator for debugging.
Definition: StandardAxes.h:72
Belle2::TrackFindingCDC::CurvWithArcLength2DCache::CurvWithArcLength2DCache
CurvWithArcLength2DCache(float curv)
Make cache for one curvature value.
Definition: StandardAxes.cc:20
Belle2::TrackFindingCDC::CurvWithArcLength2DCache::getArcLength2D
float getArcLength2D(ILayer iCLayer, bool secondArm=false) const
Return the two dimensional arc length to the given layer id.
Definition: StandardAxes.h:66
Belle2::TrackFindingCDC::ContinuousValue
Type to have values not based on discrete positions from an array.
Definition: ContinuousValue.h:31