Generate and assign the contained variables.
25{
26 if (not ptrAxialSegmentPair) return false;
27
28 const CDCAxialSegmentPair& axialSegmentPair = *ptrAxialSegmentPair;
29
30 const CDCSegment2D* ptrFromSegment = axialSegmentPair.
getStartSegment();
31 const CDCSegment2D* ptrToSegment = axialSegmentPair.
getEndSegment();
32
33 const CDCSegment2D& fromSegment = *ptrFromSegment;
34 const CDCSegment2D& toSegment = *ptrToSegment;
35
36
39
42
45
48
49
50 using namespace NPerigeeParameterIndices;
53
56
57 const double deltaCurvVar = fromCurvVar + toCurvVar;
58 const double avgPrecision = 1 / fromCurvVar + 1 / toCurvVar;
59 const double deltaCurvSigma = std::sqrt(deltaCurvVar);
60
61 finitevar<
named(
"abs_avg_curv")>() = std::fabs(toCurv / toCurvVar + fromCurv / fromCurvVar) / avgPrecision;
64 finitevar<
named(
"delta_curv_pull")>() = (toCurv - fromCurv) / deltaCurvSigma;
65
66
67
68 const CDCRecoHit2D& fromLastHit = fromSegment.back();
69 const CDCRecoHit2D& toFirstHit = toSegment.front();
70
71
72 const ROOT::Math::XYVector fromHitPos = fromLastHit.
getRecoPos2D();
73 const ROOT::Math::XYVector toHitPos = toFirstHit.
getRecoPos2D();
74
75
76 const ROOT::Math::XYVector fromFitPos = fromFit.
getClosest(fromHitPos);
77 const ROOT::Math::XYVector toFitPos = toFit.
getClosest(toHitPos);
80
83
84 const double deltaPosPhi = ROOT::Math::VectorUtil::DeltaPhi(fromFitPos, toFitPos);
85 const double deltaMomPhi = ROOT::Math::VectorUtil::DeltaPhi(fromFitMom, toFitMom);
87
90
91 finitevar<
named(
"from_delta_mom_phi")>() = ROOT::Math::VectorUtil::DeltaPhi(fromFitMom, fromOtherFitMom);
92 finitevar<
named(
"to_delta_mom_phi")>() = ROOT::Math::VectorUtil::DeltaPhi(toFitMom, toOtherFitMom);
94
98
102
105
109
110 return true;
111}
const CDCAxialSegment2D * getEndSegment() const
Getter for the end segment.
const CDCAxialSegment2D * getStartSegment() const
Getter for the start segment.
ROOT::Math::XYVector getRecoPos2D() const
Getter for the position in the reference plane.
CDCTrajectory2D & getTrajectory2D() const
Getter for the two dimensional trajectory fitted to the segment.
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.
AssignFinite< Float_t > finitevar()
static constexpr int named(const char *name)
static double normalised(const double angle)
Normalise an angle to lie in the range from [-pi, pi].