ACTS TF: compute shared hits (2nd attempt)
Retry of !77366 (merged) (reverted by !77490 (merged) as discussed in ATLASRECTS-8161), continuing ATLIDTRKCP-633.
This MR adds shared hit flags to the TrackFindingAlg
output tracks. This can be disabled by setting TrackFindingAlg
flag, countSharedHits = False
.
- New class
ActsTrk::detail::MeasurementIndex
, separating outmeasurementContainerOffsets()
code fromActsTrk::detail::TrackFindingMeasurements
.- Provides new method
MeasurementIndex::index(hit)
, which is a unique hit index that can be used to index into astd::vector
, and can be printed byTrackStatePrinter
. - This class needs the hits provided with its own
addMeasurements()
call (likeTrackFindingMeasurements
) - Caches last container pointer for faster lookup (new feature since !77366 (merged))
- Provides new method
- New class
ActsTrk::detail::SharedHitCounter
, providing a methodcomputeSharedHits()
to record shared hits in a newly created track.- Uses
MeasurementIndex::index()
internally. Internal object available for other uses (currently justTrackStatePrinter
) bymeasurementIndexer()
accessor. - This object is only created if needed (
countSharedHits = true
orTrackStatePrinter
enabled). -
!77366 (merged) crashed because we previously passed to
computeSharedHits()
the track proxy for the temporary container, soSharedHitFlag
was set in the wrong place.- Fixed by passing the track proxy referring to the track in the output container.
- Protect against crashing in that case by checking the track state indices are not out of range.
- This protection has been tested with the !77366 (merged) code and identifies and skips some out-of-bounds accesses that were probably causing the crash.
- I could not reproduce the !77366 (merged) CI crash, so could not fully confirm that this fixes it, but there seem to be no more CI crashes so it looks to be resolved.
- Uses
- Call
TrackStatePrinter
on the output track, after setting shared hits.- This changes the printed track state index numbers, which now refer to the output container.
- This will show hits shared with previously-processed tracks (and their counts), but can't print out the updated hits and counts for tracks we have already printed.
- Remove
TrackExtensionAlg::collectMeasurements()
and createTrackFindingMeasurements
and (optionally, ifTrackStatePrinter
is enabled)MeasurementIndex
inline.- This change was needed because
TrackStatePrinter
now requiresMeasurementIndex
and it's more complicated to return that from a separate method. - Note, that
TrackExtensionAlg
(and elsewhere) doesn't (yet) useSharedHitCounter
, which is only used byTrackFindingAlg
.
- This change was needed because
Edited by Tim Adye
Merge request reports
Activity
Filter activity
added ACTS label
mentioned in merge request !77366 (merged)
added 54 commits
-
563cdb5e...c5daec95 - 33 commits from branch
atlas:main
- c5daec95...c57f521a - 11 earlier commits
- 1143e042 - rename variable, and improve comments
- 7a95efa2 - fix unit test
- f5b01c23 - fix ATLAS coding standards warning
- 073669d6 - new MeasurementIndex class to do SharedHitCounter::measurementIndex()....
- ca904c6f - cache last container pointer
- 6e2c9f18 - update thread safety comment
- 106a5d10 - MeasurementIndex::index() non-const to avoid need for mutable cached values....
- 21b3adcd - remove TrackExtensionAlg::collectMeasurements()
- cca06606 - new countSharedHits flag (default=false)
- 1540c22c - update refs
Toggle commit list-
563cdb5e...c5daec95 - 33 commits from branch
CI Result SUCCESS (hash 1540c22c)Athena externals cmake make tests Full details available on this CI monitor view. Check the JIRA CI status board for known problems
Athena: number of compilation errors 0, warnings 0
For experts only: Jenkins output (remote access info)added 1 commit
- eba3dff2 - countSharedHits=true by default. Fix setting SharedHitFlag. Check for track...
Please register or sign in to reply