Belle II Software  release-08-01-10
StandardAxes.cc
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 
9 #include <tracking/trackFindingCDC/hough/axes/StandardAxes.h>
10 
11 #include <tracking/trackFindingCDC/topology/CDCWireTopology.h>
12 #include <tracking/trackFindingCDC/topology/CDCWireLayer.h>
13 #include <tracking/trackFindingCDC/geometry/GeneralizedCircle.h>
14 
15 using namespace Belle2;
16 using namespace TrackFindingCDC;
17 
19  : m_curv(curv)
20  , m_arcLength2DByICLayer{{0}}
21 {
22  CDCWireTopology& wireTopology = CDCWireTopology::getInstance();
23 
24  for (const CDCWireLayer& wireLayer : wireTopology.getWireLayers()) {
25  ILayer iCLayer = wireLayer.getICLayer();
26  double cylindricalR = (wireLayer.getOuterCylindricalR() + wireLayer.getInnerCylindricalR()) / 2;
27  double factor = GeneralizedCircle::arcLengthFactor(cylindricalR, curv);
28 
29  // Fall back when the closest approach to the layer is the apogee
30  double arcLength2D = cylindricalR * std::fmin(factor, M_PI);
31  double r = 1.0 / fabs(m_curv);
32 
33  m_arcLength2DByICLayer[iCLayer] = arcLength2D;
34  m_secondaryArcLength2DByICLayer[iCLayer] = 2 * M_PI * r - arcLength2D;
35  }
36 }
Class representating a sense wire layer in the central drift chamber.
Definition: CDCWireLayer.h:42
Class representating the sense wire arrangement in the whole of the central drift chamber.
const std::vector< Belle2::TrackFindingCDC::CDCWireLayer > & getWireLayers() const
Getter for the underlying storing layer vector.
CurvWithArcLength2DCache(float curv)
Make cache for one curvature value.
Definition: StandardAxes.cc:18
Abstract base class for different kinds of events.