Belle II Software development
InPhi0CurvBox Class Reference

Checker if a position is contained in a family of curves over phi0 and curvature. More...

#include <InPhi0CurvBox.h>

Public Types

using HoughBox = Box<DiscretePhi0, DiscreteCurv>
 The box to which this object corresponds.
 

Public Member Functions

 InPhi0CurvBox (float curlCurv=NAN)
 Constructor taking the curler curvature Curlers with high curvature than the curler curvature may obtain hits from both arms.
 
TrackingUtilities::ESign getDistanceSign (const HoughBox &houghBox, float x, float y, float l, float=0, float=0, CDC::ILayer=-1) const
 Function that gives the sign of the distance from an observed drift circle to the family of curves.
 

Private Attributes

float m_curlCurv
 Curler curvature - set to value greater zero to activate on arm exclusive finding.
 

Detailed Description

Checker if a position is contained in a family of curves over phi0 and curvature.

Definition at line 27 of file InPhi0CurvBox.h.

Member Typedef Documentation

◆ HoughBox

The box to which this object corresponds.

Definition at line 38 of file InPhi0CurvBox.h.

Constructor & Destructor Documentation

◆ InPhi0CurvBox()

InPhi0CurvBox ( float curlCurv = NAN)
inlineexplicit

Constructor taking the curler curvature Curlers with high curvature than the curler curvature may obtain hits from both arms.

Definition at line 34 of file InPhi0CurvBox.h.

34: m_curlCurv(curlCurv) {}

Member Function Documentation

◆ getDistanceSign()

TrackingUtilities::ESign getDistanceSign ( const HoughBox & houghBox,
float x,
float y,
float l,
float = 0,
float = 0,
CDC::ILayer = -1 ) const
inline

Function that gives the sign of the distance from an observed drift circle to the family of curves.

Returns
  • ESign::c_Plus if the drift circle is always on the positive / right site
  • ESign::c_Minus means the drift circle is always on the negative / left site
  • ESign::c_Zero if the drift circle lies on any of the curves
  • ESign::c_Invalid if the drift circle is on the wrong arm of the curve.

Definition at line 49 of file InPhi0CurvBox.h.

56 {
57 const std::array<DiscretePhi0, 2>& phi0Vec = houghBox.getBounds<DiscretePhi0>();
58 const std::array<DiscreteCurv, 2>& curv = houghBox.getBounds<DiscreteCurv>();
59
60 std::array<float, 2> xRot;
61 xRot[0] = x * phi0Vec[0]->x() + y * phi0Vec[0]->y();
62 xRot[1] = x * phi0Vec[1]->x() + y * phi0Vec[1]->y();
63
64 const bool isNonCurler = static_cast<float>(curv[1]) <= m_curlCurv and static_cast<float>(curv[0]) >= -m_curlCurv;
65 const bool onlyPositiveArm = isNonCurler;
66 if (onlyPositiveArm) {
67 // Reject hit if it is on the inward going branch but the curvature suggest it is no curler
68 if (xRot[0] < 0 and xRot[1] < 0) return TrackingUtilities::ESign::c_Invalid;
69 }
70
71 std::array<float, 2> yRotPlusL;
72 yRotPlusL[0] = -x * phi0Vec[0]->y() + y * phi0Vec[0]->x() + l;
73 yRotPlusL[1] = -x * phi0Vec[1]->y() + y * phi0Vec[1]->x() + l;
74
75 const float r2 = x * x + y * y - l * l;
76 std::array<float, 2> r2TimesHalfCurv;
77 r2TimesHalfCurv[0] = r2 * (static_cast<float>(curv[0]) / 2.0);
78 r2TimesHalfCurv[1] = r2 * (static_cast<float>(curv[1]) / 2.0);
79
80 // Using binary notation encoding lower and upper box bounds to fill the flat array.
81 std::array<float, 4> dist;
82
83 dist[0b00] = r2TimesHalfCurv[0] - yRotPlusL[0];
84 dist[0b10] = r2TimesHalfCurv[0] - yRotPlusL[1];
85
86 dist[0b01] = r2TimesHalfCurv[1] - yRotPlusL[0];
87 dist[0b11] = r2TimesHalfCurv[1] - yRotPlusL[1];
88
89 return TrackingUtilities::ESignUtil::common(dist);
90 }

Member Data Documentation

◆ m_curlCurv

float m_curlCurv
private

Curler curvature - set to value greater zero to activate on arm exclusive finding.

Definition at line 94 of file InPhi0CurvBox.h.


The documentation for this class was generated from the following file: