10#include <tracking/trackFindingCDC/hough/perigee/Phi0Rep.h>
11#include <tracking/trackFindingCDC/hough/perigee/CurvRep.h>
12#include <tracking/trackFindingCDC/hough/boxes/SweepBox.h>
13#include <tracking/trackFindingCDC/hough/baseelements/SameSignChecker.h>
14#include <tracking/trackFindingCDC/topology/ILayer.h>
21 namespace TrackFindingCDC {
25 template<
class T,
class APhi0 = DiscretePhi0>
34 using HoughBox = SweepBox<APhi0, typename T::HoughBox>;
48 float signedDriftLength,
51 ILayer iCLayer = -1)
const
53 const Vector2D& lowerPhi0Vec(houghBox.template getLowerBound<APhi0>());
54 const Vector2D& upperPhi0Vec(houghBox.template getUpperBound<APhi0>());
57 const float lowerX = x * lowerPhi0Vec.
x() + y * lowerPhi0Vec.
y();
58 const float upperX = x * upperPhi0Vec.
x() + y * upperPhi0Vec.
y();
60 float lowerCurv(getLowerCurv(houghBox));
61 float upperCurv(getUpperCurv(houghBox));
63 const bool lowerIsNonCurler = fabs(lowerCurv) <
m_curlCurv;
64 const bool upperIsNonCurler = fabs(upperCurv) <
m_curlCurv;
66 if (lowerIsNonCurler and upperIsNonCurler) {
67 if (not(lowerX >= 0) and not(upperX >= 0))
return ESign::c_Invalid;
70 const float lowerY = -x * lowerPhi0Vec.
y() + y * lowerPhi0Vec.
x();
71 const float upperY = -x * upperPhi0Vec.
y() + y * upperPhi0Vec.
x();
73 const float upperDXDZ = dxdz * upperPhi0Vec.
x() + dydz * upperPhi0Vec.
y();
74 const float lowerDXDZ = dxdz * lowerPhi0Vec.
x() + dydz * lowerPhi0Vec.
y();
77 const float lowerDYDZ = -dxdz * lowerPhi0Vec.
y() + dydz * lowerPhi0Vec.
x();
78 const float upperDYDZ = -dxdz * upperPhi0Vec.
y() + dydz * upperPhi0Vec.
x();
80 const ESign lowerDistSign = T::getDistanceSign(subordinaryHoughBox,
86 const ESign upperDistSign = T::getDistanceSign(subordinaryHoughBox,
Takes a basic object and sweeps it by some angle phi0 range a around the origin.
ESign getDistanceSign(const HoughBox &houghBox, float x, float y, float signedDriftLength, float dxdz=0, float dydz=0, ILayer iCLayer=-1) const
Function that gives the sign of the distance from an observed drift circle to the sweeped object.
SweepBox< APhi0, typename T::HoughBox > HoughBox
The box to which this object corresponds.
typename T::HoughBox SubordinaryHoughBox
The hough box without the sweep in phi0.
float m_curlCurv
The curvature above which the trajectory is considered a curler.
APhi0Sweeped(float curlCurv)
Constructor taking the curling curvature.
A two dimensional vector which is equipped with functions for correct handling of orientation relate...
double x() const
Getter for the x coordinate.
double y() const
Getter for the y coordinate.
ESign
Enumeration for the distinct sign values of floating point variables.
static ESign common(ESign n1, ESign n2)
Check if two values have a common sign.
Abstract base class for different kinds of events.