Belle II Software  release-05-02-19
InPhi0ImpactBox Class Reference

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

#include <InPhi0ImpactBox.h>

Public Types

using HoughBox = Box< DiscretePhi0, ContinuousImpact >
 The box to which this object correspondes.
 

Public Member Functions

 InPhi0ImpactBox (float curlCurv=NAN)
 Constructor taking the curler curvature - give a zero greater 0 to activate one arm exclusive finding.
 
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 one arm exclusive finding.
 

Detailed Description

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

Definition at line 34 of file InPhi0ImpactBox.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 55 of file InPhi0ImpactBox.h.

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

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::InPhi0ImpactBox::m_curlCurv
float m_curlCurv
Curler curvature - set to value greater zero to activate one arm exclusive finding.
Definition: InPhi0ImpactBox.h:92