Skip to content

Review PR #1762: identify remaining bugs in DBSClusterer and FlagBkgHits changes#1771

Closed
Copilot wants to merge 1 commit intomainfrom
copilot/review-pr1762-issues
Closed

Review PR #1762: identify remaining bugs in DBSClusterer and FlagBkgHits changes#1771
Copilot wants to merge 1 commit intomainfrom
copilot/review-pr1762-issues

Conversation

Copy link
Contributor

Copilot AI commented Mar 18, 2026

Code review of PR #1762 ("Updates to DBSClusterer and FlgBkgHits") after two prior review rounds. Found additional issues not previously identified.

🔴 Bugs

  • Missing shiv.clear() in sub-level output path (FlagBkgHits_module.cc): fillStrawHitIndices(size_t, SHIV&, Level) appends via push_back without clearing — verified in ComboHit.cc:135-159. The old code called shiv.clear() each iteration; the new code removed it. Hit indices accumulate across iterations, producing duplicate ComboHits when the sub-level path is active.

  • hit.time() vs hit.correctedTime() mismatch in MVA input (DBSClusterer.cc:classifyCluster): Time delta computed as hit.time() - cluster.time(), but cluster.time() derives from correctedTime(). time() returns raw TDC threshold crossing (_etime[_eend]), correctedTime() returns calibrated aggregate time (_time). The MVA feature is physically meaningless.

🟠 Issues

  • countProton flags don't propagate (FlagBkgHits_module.cc): countProton() merges energysel flags into chfcol after chcol_out is already built and put into the event. The flags are dead writes.

  • Removed error-handling in sub-level path: Two consistency checks silently dropped — parent pointer mismatch exception and unfiltered output size validation.

🟡 Minor

  • Phi wrapping removed from calculateCluster (circular mean problem near ±π, raised previously but not addressed)
  • bkghitcol allocated unconditionally even when savebkg_=false
  • Stale #include <queue> in DBSClusterer.cc
  • Commented-out code remnants in FlagBkgHits_module.cc

📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Copilot AI changed the title [WIP] Review PR1762 and identify issues Review PR #1762: identify remaining bugs in DBSClusterer and FlagBkgHits changes Mar 18, 2026
Copilot AI requested a review from oksuzian March 18, 2026 15:44
@oksuzian oksuzian closed this Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants