Skip to content

Commit

Permalink
Merge branch 'main' into feat-mm5.1-proto-grid-to-binned-material
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Apr 18, 2024
2 parents 61a2e40 + 7542eb8 commit 47e64d6
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions Core/include/Acts/TrackFitting/GlobalChiSquareFitter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,16 @@ class Gx2Fitter {
return;
}

// Add the measurement surface as external surface to the navigator.
// We will try to hit those surface by ignoring boundary checks.
if (state.navigation.externalSurfaces.size() == 0) {
for (auto measurementIt = inputMeasurements->begin();
measurementIt != inputMeasurements->end(); measurementIt++) {
navigator.insertExternalSurface(state.navigation,
measurementIt->first);
}
}

// Update:
// - Waiting for a current surface
auto surface = navigator.currentSurface(state.navigation);
Expand Down Expand Up @@ -664,16 +674,19 @@ class Gx2Fitter {

// This check takes into account the evaluated dimensions of the
// measurements. To fit, we need at least NDF+1 measurements. However,
// we n-dimensional measurements count for n measurements, reducing the
// we count n-dimensional measurements for n measurements, reducing the
// effective number of needed measurements.
// We might encounter the case, where we cannot use some (parts of a)
// measurements, maybe if we do not support that kind of measurement. This
// is also taken into account here.
// `ndf = 4` is chosen, since this a minimum that makes sense for us, but
// a more general approach is desired.
// We skip the check during the first iteration, since we cannot
// guarantee to hit all/enough measurement surfaces with the initial
// parameter guess.
// TODO genernalize for n-dimensional fit
constexpr std::size_t ndf = 4;
if (ndf + 1 > gx2fResult.collectorResiduals.size()) {
if ((nUpdate > 0) && (ndf + 1 > gx2fResult.collectorResiduals.size())) {
ACTS_INFO("Not enough measurements. Require "
<< ndf + 1 << ", but only "
<< gx2fResult.collectorResiduals.size() << " could be used.");
Expand Down

0 comments on commit 47e64d6

Please sign in to comment.