GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ITSMFT: fix MC labels for single pixel clusters in the labels by mpuccio · Pull Request #16098 · AliceO2Group/AliceO2

Conversation

@mpuccio

@mpuccio mpuccio commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mpuccio
ITSMFT: fix MC labels for single pixel clusters in the labels
714cf05
@mpuccio
mpuccio requested review from f3sch, fprino, mconcas, mcoquet642 and shahor02 as code owners November 10, 2026 14:16
@sawenzel

sawenzel commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

This is a PR comment generated by Claude Opus:

This PR changes Clusterer::ClustererThread::finishChipSingleHitFast in ITSMFT so that, under squashing, the MC label of a single-pixel cluster is looked up through getOrderedPixId(hit) instead of getStartID() + hit.

The fix looks correct for the ITSMFT DPL workflow, because hit indexes the sorted pixel vector and mPixelsOrder is sorted with the same comparator. It is incomplete, though, because the ITS3 copy keeps the old lookup and the new branch can read empty vectors. Nothing was built or run; the review is from reading the PR head 714cf05.

I suggest fixing ITS3 in the same PR and moving the index choice into ChipPixelData, for example a getDigitID(pos) that returns mStartID + pos when mPixIds is empty and mPixIds[mPixelsOrder[pos]] otherwise. That one change would cover the first three findings below.

  1. ITS3 not fixed. Detectors/Upgrades/ITS3/reconstruction/src/Clusterer.cxx:319 still calls fetchMCLabels(curChipData->getStartID() + hit, ...), while its finishChip already uses getOrderedPixId. ITS3 MC clusterization with squashing keeps producing wrong labels for single-pixel clusters.

  2. Out-of-bounds read without MC truth in the reader. In Detectors/ITSMFT/common/reconstruction/src/Clusterer.cxx:320 the new path is gated on labelsClusPtr and Clusterer::mSquashingDepth only. DigitPixelReader fills mPixIds/mPixelsOrder only when its mDigitsMCTruth is non-null. When ClustererSpec calls reader.setDigitsMCTruth(nullptr) for an empty label container, a single-pixel chip indexes two empty vectors. This may not occur in practice, and before the PR the same case already crashed on the null labelsDigPtr.

  3. Index scheme depends on a copy of the deciding state. Clusterer::mSquashingDepth is kept in sync with DigitPixelReader::mSquashOverflowsDepth only by ClustererSpec.

    • A caller that sets setMaxROFDepthToSquash(n > 0) without reader.setSquashingDepth (a macro, a test, a non-DPL driver) worked before and now indexes empty vectors.
    • The opposite mismatch silently keeps the wrong labels.
  4. Duplication. The squashing-versus-contiguous choice now exists three times in this file (finishChip lines 238-242 and 259-263, and here), plus ITS3.

  5. No regression test, empty PR description. A test with two ROFs, one chip, the first digit squashed away and one survivor, asserting the label equals that digit's label, would guard this.

A minor point: the added two-line comment explains the reasoning, whereas the existing one-liner at finishChip line 238 is the precedent in that file.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@f3sch f3sch Awaiting requested review from f3sch f3sch is a code owner
@fprino fprino Awaiting requested review from fprino fprino is a code owner
@mcoquet642 mcoquet642 Awaiting requested review from mcoquet642 mcoquet642 is a code owner
@mconcas mconcas Awaiting requested review from mconcas mconcas is a code owner
@shahor02 shahor02 Awaiting requested review from shahor02 shahor02 is a code owner

At least 1 approving review is required to merge this pull request.

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@mpuccio @sawenzel
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.