Belle II Software development
InPhi0Box Class Reference

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

#include <InPhi0Box.h>

Public Types

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

Public Member Functions

 InPhi0Box (float curlCurv=NAN)
 Constructor taking the curler curvature - pass a value 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 family of curves.
 

Private Attributes

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

Detailed Description

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

Definition at line 24 of file InPhi0Box.h.

Member Typedef Documentation

◆ HoughBox

The box to which this object corresponds.

Definition at line 32 of file InPhi0Box.h.

Constructor & Destructor Documentation

◆ InPhi0Box()

InPhi0Box ( float  curlCurv = NAN)
inline

Constructor taking the curler curvature - pass a value greater 0 to activate one arm exclusive finding.

Definition at line 28 of file InPhi0Box.h.

28: m_curlCurv(std::fabs(curlCurv)) {}
float m_curlCurv
Curler curvature - set a value greater zero to activate one arm exclusive finding.
Definition: InPhi0Box.h:79

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 family of curves.

Parameters
houghBox
xx coordinate of the center of the drift circle
yy coordinate of the center of the drift circle
lthe signed drift length of the drift circle - sign is the right left passage hypotheses
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 46 of file InPhi0Box.h.

53 {
54 const std::array<DiscretePhi0, 2>& phi0Vec = houghBox.getBounds<DiscretePhi0>();
55
56 std::array<float, 2> xRot;
57 xRot[0] = x * phi0Vec[0]->x() + y * phi0Vec[0]->y();
58 xRot[1] = x * phi0Vec[1]->x() + y * phi0Vec[1]->y();
59
60 const bool onlyPositiveArm = 0 < m_curlCurv;
61 if (onlyPositiveArm) {
62 // Reject hit if it is on the inward going branch but the curvature suggest it is no curler
63 if (xRot[0] < 0 and xRot[1] < 0) return ESign::c_Invalid;
64 }
65
66 std::array<float, 2> yRotPlusL;
67 yRotPlusL[0] = -x * phi0Vec[0]->y() + y * phi0Vec[0]->x() - l;
68 yRotPlusL[1] = -x * phi0Vec[1]->y() + y * phi0Vec[1]->x() - l;
69
70 std::array<float, 2> dist;
71 dist[0] = - yRotPlusL[0];
72 dist[1] = - yRotPlusL[1];
73
74 return ESignUtil::common(dist[0], dist[1]);
75 }
static ESign common(ESign n1, ESign n2)
Check if two values have a common sign.
Definition: ESign.h:57

Member Data Documentation

◆ m_curlCurv

float m_curlCurv
private

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

Definition at line 79 of file InPhi0Box.h.


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