9#include <tracking/trackFindingCDC/eventdata/hits/CDCRecoHit3D.h>
10#include <tracking/trackFindingCDC/hough/boxes/PQBox.h>
11#include <tracking/trackFindingCDC/hough/baseelements/SameSignChecker.h>
18 namespace TrackFindingCDC {
48 float reconstructedZ = recoHit.
getRecoZ();
50 float distLowerPLowerQ = (lowerP + 4 * lowerQ) * perpS - lowerQ / 25 * perpS * perpS - reconstructedZ;
51 float distUpperPLowerQ = (upperP + 4 * lowerQ) * perpS - lowerQ / 25 * perpS * perpS - reconstructedZ;
52 float distLowerPUpperQ = (lowerP + 4 * upperQ) * perpS - upperQ / 25 * perpS * perpS - reconstructedZ;
53 float distUpperPUpperQ = (upperP + 4 * upperQ) * perpS - upperQ / 25 * perpS * perpS - reconstructedZ;
56 distLowerPUpperQ, distUpperPUpperQ);
73 const double lhsZ = lhsRecoHit.
getRecoZ();
74 const double rhsZ = rhsRecoHit.
getRecoZ();
79 const double lhsZDistance = (pMean + 4 * qMean) * lhsS - qMean / 25 * lhsS * lhsS - lhsZ;
80 const double rhsZDistance = (pMean + 4 * qMean) * rhsS - qMean / 25 * rhsS * rhsS - rhsZ;
82 return lhsZDistance < rhsZDistance;
86 static const char*
debugLine() {
return "([0] + 4*[1])*x - [1] / 25 * x * x";}
Class representing a three dimensional reconstructed hit.
double getRecoZ() const
Getter for the z coordinate of the reconstructed position.
double getArcLength2D() const
Getter for the travel distance in the xy projection.
Predicate class to check for the containment of hits in a p q hough space part.
static const char * debugLine()
ROOT-compatible formula for z(s) = (p + 4q)*s - q/25 * s^2.
static bool compareDistances(const HoughBox &pqBox, const CDCRecoHit3D &lhsRecoHit, const CDCRecoHit3D &rhsRecoHit)
Compares distances from two hits to the track represented by the given box.
Weight operator()(const CDCRecoHit3D &recoHit, const HoughBox *pqBox)
Checks if the wire hit is contained in a p q hough space.
A rectangular domain for the hough space over p and q.
float getUpperP() const
Concise getter for the upper p bound.
float getLowerQ() const
Concise getter for the lower q bound.
float getUpperQ() const
Concise getter for the upper q bound.
float getLowerP() const
Concise getter for the lower p bound.
static bool sameSign(double n1, double n2)
Check if two values have the same sign.
Abstract base class for different kinds of events.