Skip to content

Commit

Permalink
small improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
AJPfleger authored Nov 10, 2024
1 parent 752b1fa commit 4b0daa0
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Core/include/Acts/TrackFitting/GlobalChiSquareFitter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1453,8 +1453,7 @@ class Gx2Fitter {
// be empty and the following operations would be invalid. Usually, this
// only happens during the first iteration, due to bad initial parameters.
if (tipIndex == Acts::MultiTrajectoryTraits::kInvalid) {
ACTS_INFO("Did not find any measurements in nUpdate "
<< nUpdate + 1 << "/" << gx2fOptions.nUpdateMax);
ACTS_INFO("Did not find any measurements in material fit.");
return Experimental::GlobalChiSquareFitterError::NotEnoughMeasurements;
}

Expand Down Expand Up @@ -1541,6 +1540,11 @@ class Gx2Fitter {
<< "oldChi2sum = " << oldChi2sum << "\n"
<< "chi2sum = " << extendedSystem.chi2());

chi2sum = extendedSystem.chi2();

// update params
params.parameters() += deltaParams;

// update the scattering angles
for (std::size_t matSurface = 0; matSurface < nMaterialSurfaces;
matSurface++) {
Expand All @@ -1553,11 +1557,6 @@ class Gx2Fitter {
deltaParamsExtended.block<2, 1>(deltaPosition, 0).eval();
}

chi2sum = extendedSystem.chi2();

// update params
params.parameters() += deltaParams;

updateGx2fCovarianceParams(fullCovariancePredicted, extendedSystem);
}
ACTS_DEBUG("Finished to evaluate material");
Expand Down

0 comments on commit 4b0daa0

Please sign in to comment.