Skip to content

Commit

Permalink
fix: GX2F: write correct chi2 to root (acts-project#1725)
Browse files Browse the repository at this point in the history
Prior, no chi2-values were written with the states/summary-writers.
  • Loading branch information
AJPfleger authored and Carlo Varni committed Dec 22, 2022
1 parent 6975fc4 commit 7786b80
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Core/include/Acts/TrackFitting/Chi2Fitter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,10 @@ class Chi2Fitter {
result.collectorDerive1Chi2Sum += derive1Chi2;
result.collectorDerive2Chi2Sum += derive2Chi2;

double localChi2 =
(residuals.transpose() * covInv * residuals).eval()(0);
trackStateProxy.chi2() = localChi2;

for (int i = 0; i < localMeasurements.rows(); ++i) {
result.collectorMeasurements.push_back(localMeasurements(i));
result.collectorResiduals.push_back(residuals(i));
Expand Down

0 comments on commit 7786b80

Please sign in to comment.