10#include <tracking/trackingUtilities/eventdata/segments/CDCSegment2D.h>
11#include <tracking/trackingUtilities/eventdata/trajectories/CDCTrajectory2D.h>
12#include <tracking/trackFindingCDC/hough/phi0_curv/Phi0CurvBox.h>
13#include <tracking/trackingUtilities/geometry/VectorUtil.h>
15#include <Math/Vector2D.h>
22 namespace TrackFindingCDC {
38 const Phi0CurvBox* phi0CurvBox)
40 if (segment->empty())
return NAN;
42 TrackingUtilities::Weight weight =
operator()(&trajectory2D, phi0CurvBox);
43 return weight * segment->size();
51 const Phi0CurvBox* phi0CurvBox)
54 const ROOT::Math::XYVector& phi0Vec = trajectory2D->getStartUnitMom2D();
66 const Phi0CurvBox* phi0CurvBox)
71 const ROOT::Math::XYVector phiVec = VectorUtil::unit(line.tangential());
75 double curvature = 2 * VectorUtil::Cross(pos2D, phiVec) / pos2D.Mag2();
76 ROOT::Math::XYVector phi0Vec = VectorUtil::flippedOver(phiVec, pos2D);
88 const double curvature,
89 const Phi0CurvBox* phi0CurvBox)
92 const ROOT::Math::XYVector& lowerPhi0Vec = phi0CurvBox->getLowerPhi0Vec();
93 const ROOT::Math::XYVector& upperPhi0Vec = phi0CurvBox->getUpperPhi0Vec();
96 if (phi0CurvBox->isIn<1>(curvature)) {
97 return VectorUtil::isBetween(phi0Vec, lowerPhi0Vec, upperPhi0Vec);
99 }
else if (phi0CurvBox->isIn<1>(-curvature)) {
100 return VectorUtil::isBetween(-phi0Vec, lowerPhi0Vec, upperPhi0Vec);
Predicate class to check for the containment of segments in a phi0 curv hough space part.
bool isPhi0CurvPointIn(const ROOT::Math::XYVector &phi0Vec, const double curvature, const Phi0CurvBox *phi0CurvBox)
Predicate checking if the phi0 vector and curvature are contained in the given box.
TrackingUtilities::Weight operator()(const TrackingUtilities::CDCFacet *facet, const Phi0CurvBox *phi0CurvBox)
Checks if the given hit triplet is considered part of the hough box in phi0, curvature space.
TrackingUtilities::Weight operator()(const TrackingUtilities::CDCTrajectory2D *trajectory2D, const Phi0CurvBox *phi0CurvBox)
Checks if the given trajectory is considered part of the hough box in phi0, curvature space.
TrackingUtilities::Weight operator()(const TrackingUtilities::CDCSegment2D *segment, const Phi0CurvBox *phi0CurvBox)
Checks if the segment is contained in a phi0 curv hough space.
Class representing a triple of neighboring oriented wire with additional trajectory information.
ROOT::Math::XYVector getMiddleRecoPos2D() const
Getter for the reconstructed position at the second hit on the fit line.
ParameterLine2D getStartToEndLine() const
Getter for the tangential line from the first to the third hit.
A reconstructed sequence of two dimensional hits in one super layer.
Particle trajectory as it is seen in xy projection represented as a circle.
double getCurvature() const
Getter for the curvature as seen from the xy projection.
Abstract base class for different kinds of events.