Belle II Software development
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 <cdc/topology/CDCWireTopology.h>
12#include <cdc/topology/CDCWireLayer.h>
13#include <tracking/trackingUtilities/geometry/GeneralizedCircle.h>
14
15using namespace Belle2;
16using namespace CDC;
17using namespace TrackFindingCDC;
18using namespace TrackingUtilities;
19
22, m_curv(curv)
23{
25
26 for (const CDCWireLayer& wireLayer : wireTopology.getWireLayers()) {
27 ILayer iCLayer = wireLayer.getICLayer();
28 double cylindricalR = (wireLayer.getOuterCylindricalR() + wireLayer.getInnerCylindricalR()) / 2;
29 double factor = GeneralizedCircle::arcLengthFactor(cylindricalR, curv);
30
31 // Fall back when the closest approach to the layer is the apogee
32 double arcLength2D = cylindricalR * std::fmin(factor, M_PI);
33 double r = 1.0 / fabs(m_curv);
34
35 m_arcLength2DByICLayer[iCLayer] = arcLength2D;
36 m_secondaryArcLength2DByICLayer[iCLayer] = 2 * M_PI * r - arcLength2D;
37 }
38}
Class representing a sense wire layer in the central drift chamber.
Class representing the sense wire arrangement in the whole of the central drift chamber.
const std::vector< CDCWireLayer > & getWireLayers() const
Getter for the underlying storing layer vector.
static CDCWireTopology & getInstance()
Getter for the singleton instance of the wire topology.
CurvWithArcLength2DCache(float curv)
Make cache for one curvature value.
std::array< float, 56 > m_arcLength2DByICLayer
Memory for two dimensional arc length at each layer.
double arcLengthFactor(const double directDistance) const
Helper function the calculate the factor between the length of a secant line and the length on the ar...
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.