Skip to content

Commit

Permalink
refactor: remove effectiveProjector() from collector() in GX2F (#…
Browse files Browse the repository at this point in the history
…2556)

We were discussing a bit (starting from #2511 ) if we can remove `effectiveProjector` from the collector in the GlobalChiSquareFitter, since it is not very efficient. This PR now removes it.
  • Loading branch information
AJPfleger committed Oct 19, 2023
1 parent 5035479 commit 244b280
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions Core/include/Acts/TrackFitting/GlobalChiSquareFitter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,15 @@ void collector(typename traj_t::TrackStateProxy& trackStateProxy,
auto measurement = trackStateProxy.template calibrated<measDim>();
auto covarianceMeasurement =
trackStateProxy.template calibratedCovariance<measDim>();
// calculate residuals and return with covariances and jacobians
auto projJacobian =
(trackStateProxy.effectiveProjector() * result.jacobianFromStart).eval();
auto projPredicted =
(trackStateProxy.effectiveProjector() * predicted).eval();
// Project Jacobian and predicted measurements into the measurement dimensions
auto projJacobian = (trackStateProxy.projector()
.template topLeftCorner<measDim, eBoundSize>() *
result.jacobianFromStart)
.eval();
auto projPredicted = (trackStateProxy.projector()
.template topLeftCorner<measDim, eBoundSize>() *
predicted)
.eval();

ACTS_VERBOSE("Processing and collecting measurements in Actor:\n"
<< "\tMeasurement:\t" << measurement.transpose()
Expand All @@ -248,6 +252,7 @@ void collector(typename traj_t::TrackStateProxy& trackStateProxy,
<< "\n\tProjected Jacobian:\t" << projJacobian
<< "\n\tCovariance Measurements:\t" << covarianceMeasurement);

// Collect residuals, covariances, and projected jacobians
for (size_t i = 0; i < measDim; i++) {
if (covarianceMeasurement(i, i) < 1e-10) {
ACTS_WARNING("Invalid covariance of measurement: cov(" << i << "," << i
Expand Down

0 comments on commit 244b280

Please sign in to comment.