feat: Adding beam spot as an additional measurement to refitting algorithm #5342
feat: Adding beam spot as an additional measurement to refitting algorithm #5342delitez wants to merge 9 commits intoacts-project:mainfrom
Conversation
|
@andiwand could you take a look at this draft PR? |
There was a problem hiding this comment.
I believe this should be reverted
| if (state.referenceSurface().geometryId().value() == 0u) { | ||
| continue; | ||
| } |
There was a problem hiding this comment.
I think the main limitation is that the source link will not contain an IndexSourceLink. we could generalize this by extending the
if (!state.hasUncalibratedSourceLink()) {with something like
if (!state.hasUncalibratedSourceLink() || state.getUncalibratedSourceLink().template getPtr<IndexSourceLink>() == nullptr) {we could also turn the if upside down to first handle the valid source link case and else adding the nans but that is not so important
| if (state.referenceSurface().geometryId().value() == 0u) { | ||
| continue; | ||
| } |
There was a problem hiding this comment.
| if (state.referenceSurface().geometryId().value() == 0u) { | |
| continue; | |
| } | |
| if (state.getUncalibratedSourceLink().template getPtr<IndexSourceLink>() == nullptr) { | |
| continue; | |
| } |
similar like below I think this is more generic
| ACTS_VERBOSE("Initial parameters: " | ||
| << initialParams.fourPosition(ctx.geoContext).transpose() | ||
| << " -> " << initialParams.direction().transpose()); | ||
| ACTS_VERBOSE("Initial parameters: " << track.parameters().transpose()); |
There was a problem hiding this comment.
the original version seems to have more information
| ctx.geoContext, | ||
| ctx.magFieldContext, | ||
| ctx.calibContext, | ||
| &track.referenceSurface(), |
There was a problem hiding this comment.
I think it would be good to create a new central perigee surface in the refitting algorithm somewhere at the top of execute and supply it also as a reference here
similar to here
acts/Examples/Algorithms/TrackFitting/src/TrackFittingAlgorithm.cpp
Lines 88 to 90 in 46df76a
| const Acts::Vector2 beamSpotMeasValue{0., 0.}; | ||
| Acts::SquareMatrix2 inflatedCov = | ||
| Acts::SquareMatrix2::Zero(); //* 12.5 * Acts::UnitConstants::um; | ||
| inflatedCov(0, 0) = | ||
| 12.5 * | ||
| Acts::UnitConstants::um; | ||
| inflatedCov(1, 1) = | ||
| 55.5 * | ||
| Acts::UnitConstants::mm; |
There was a problem hiding this comment.
these should be configurable
| /// Add a beam spot measurement | ||
| bool addBeamSpotMeasurement = false; |
There was a problem hiding this comment.
since we also need the beam spot position and error we could go with an optional like
| /// Add a beam spot measurement | |
| bool addBeamSpotMeasurement = false; | |
| /// Add a beam spot measurement | |
| std::optional<Acts::SquareMatrix2> beamSpotConstraint; |
|



In this PR, an option to include beam-spot measurements in the KF refitting algorithm is introduced. If enabled, a measurement at (0,0,0) with beam-spot covariance will be added to source links, using the surface of the current track state.