8#include <tracking/trackFindingCDC/filters/segmentRelation/FitlessSegmentRelationVarSet.h>
10#include <tracking/trackingUtilities/eventdata/segments/CDCSegment2D.h>
11#include <tracking/trackingUtilities/numerics/Angle.h>
13#include <Math/Vector2D.h>
14#include <Math/VectorUtil.h>
17using namespace TrackFindingCDC;
18using namespace TrackingUtilities;
22 if (not ptrSegmentRelation)
return false;
53 const double deltaCurvVar = fromCurvVar + toCurvVar;
54 const double avgPrecision = 1 / fromCurvVar + 1 / toCurvVar;
55 const double deltaCurvSigma = std::sqrt(deltaCurvVar);
57 finitevar<
named(
"abs_avg_curv")>() = std::fabs(toCurv / toCurvVar + fromCurv / fromCurvVar) / avgPrecision;
60 finitevar<
named(
"delta_curv_pull")>() = (toCurv - fromCurv) / deltaCurvSigma;
68 const ROOT::Math::XYVector fromHitPos = fromLastHit.
getRecoPos2D();
69 const ROOT::Math::XYVector toHitPos = toFirstHit.
getRecoPos2D();
72 const ROOT::Math::XYVector fromFitPos = fromFit.
getClosest(fromHitPos);
73 const ROOT::Math::XYVector toFitPos = toFit.
getClosest(toHitPos);
80 const double deltaPosPhi = ROOT::Math::VectorUtil::DeltaPhi(fromFitPos, toFitPos);
81 const double deltaMomPhi = ROOT::Math::VectorUtil::DeltaPhi(fromFitMom, toFitMom);
87 finitevar<
named(
"from_delta_mom_phi")>() = ROOT::Math::VectorUtil::DeltaPhi(fromFitMom, fromOtherFitMom);
88 finitevar<
named(
"to_delta_mom_phi")>() = ROOT::Math::VectorUtil::DeltaPhi(toFitMom, toOtherFitMom);
bool extract(const TrackingUtilities::Relation< const TrackingUtilities::CDCSegment2D > *ptrSegmentRelation) override
Generate and assign the contained variables.
Class representing a two dimensional reconstructed hit in the central drift chamber.
ROOT::Math::XYVector getRecoPos2D() const
Getter for the position in the reference plane.
A reconstructed sequence of two dimensional hits in one super layer.
CDCTrajectory2D & getTrajectory2D() const
Getter for the two dimensional trajectory fitted to the segment.
Particle trajectory as it is seen in xy projection represented as a circle.
double getTotalArcLength2D(const AHits &hits) const
Calculates the perpendicular travel distance from the first position of the hits to the last position...
ROOT::Math::XYVector getClosest(const ROOT::Math::XYVector &point) const
Calculates the closest approach on the trajectory to the given point.
double getChi2() const
Getter for the chi2 value of the circle fit.
double getPValue() const
Getter for p-value.
bool isFitted() const
Checks if the circle is already set to a valid value.
double getLocalVariance(EPerigeeParameter i) const
Getter for an individual diagonal element of the covariance matrix of the local helix parameters.
double getArcLength2DGap(const AFromHits &fromHits, const AToHits &toHits) const
Calculates the perpendicular travel distance from the last position of the fromHits to the first posi...
double getArcLength2DBackOffset(const AFromHits &fromHits, const AToHits &toHits) const
Calculates the perpendicular travel distance from the last position of the fromHits to the last posit...
double getArcLength2DFrontOffset(const AFromHits &fromHits, const AToHits &toHits) const
Calculates the perpendicular travel distance from the first position of the fromHits to the first pos...
size_t getNDF() const
Getter for the number of degrees of freedom of the circle fit.
ROOT::Math::XYVector getFlightDirection2D(const ROOT::Math::XYVector &point) const
Get the unit direction of flight at the given point, where arcLength2D = 0.
double getCurvature() const
Getter for the curvature as seen from the xy projection.
Type for two related objects.
From * getFrom() const
Getter for the pointer to the from side object.
To * getTo() const
Getter for the pointer to the to side object.
AssignFinite< Float_t > finitevar()
static constexpr int named(const char *name)
Namespace to hide the contained enum constants.
Abstract base class for different kinds of events.
static double normalised(const double angle)
Normalise an angle to lie in the range from [-pi, pi].