Belle II Software  release-05-02-19
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 correspondes.
 

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.
 
ESign getDistanceSign (const HoughBox &houghBox, float x, float y, float l, float=0, float=0, ILayer=-1) const
 Function that gives the sign of the distance from an observed drift circle to the familiy of curves. More...
 

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 36 of file InPhi0CurvBox.h.

Member Function Documentation

◆ getDistanceSign()

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

Function that gives the sign of the distance from an observed drift circle to the familiy 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 dirft circle lies on any of the curves
  • ESign::c_Invalid if the drift cirlce is on the the wrong arm of the curve.

Definition at line 58 of file InPhi0CurvBox.h.

67  {
68  // Reject hit if it is on the inward going branch but the curvature suggest it is no curler
69  if (xRot[0] < 0 and xRot[1] < 0) return ESign::c_Invalid;
70  }
71 
72  std::array<float, 2> yRotPlusL;
73  yRotPlusL[0] = -x * phi0Vec[0]->y() + y * phi0Vec[0]->x() + l;
74  yRotPlusL[1] = -x * phi0Vec[1]->y() + y * phi0Vec[1]->x() + l;
75 
76  const float r2 = x * x + y * y - l * l;
77  std::array<float, 2> r2TimesHalfCurv;
78  r2TimesHalfCurv[0] = r2 * (static_cast<float>(curv[0]) / 2.0);
79  r2TimesHalfCurv[1] = r2 * (static_cast<float>(curv[1]) / 2.0);
80 
81  // Using binary notation encoding lower and upper box bounds to fill the flat array.
82  std::array<float, 4> dist;
83 
84  dist[0b00] = r2TimesHalfCurv[0] - yRotPlusL[0];
85  dist[0b10] = r2TimesHalfCurv[0] - yRotPlusL[1];
86 
87  dist[0b01] = r2TimesHalfCurv[1] - yRotPlusL[0];
88  dist[0b11] = r2TimesHalfCurv[1] - yRotPlusL[1];
89 
90  return ESignUtil::common(dist);
91  }
92 
93  private:
95  float m_curlCurv;
96  };
97  }
99 }

The documentation for this class was generated from the following file:
Belle2::TrackFindingCDC::ESignUtil::common
static ESign common(ESign n1, ESign n2)
Check if two values have a common sign.
Definition: ESign.h:67
Belle2::TrackFindingCDC::InPhi0CurvBox::m_curlCurv
float m_curlCurv
Curler curvature - set to value greater zero to activate on arm exclusive finding.
Definition: InPhi0CurvBox.h:103