Skip to content

fix(pid): DRICH IRT link migration - #2875

Merged
wdconinc merged 6 commits into
mainfrom
wdconinc-irt-link-migration
Aug 20, 2026
Merged

fix(pid): DRICH IRT link migration#2875
wdconinc merged 6 commits into
mainfrom
wdconinc-irt-link-migration

Conversation

@wdconinc

@wdconinc wdconinc commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Briefly, what does this PR introduce? Please link to any relevant presentations or discussions.

This PR isolates the DRICH IRT link migration from #2822 into a standalone change for focused review. It updates IrtCherenkovParticleID to consume DRICHRawHitsLinks (using getFrom()/getTo() for link access) while preserving addToRawHitAssociations output behavior by still using association objects. DRICH wiring/factory inputs are updated to pass both links and associations.

What is the urgency of this PR?

  • High (please describe reason below)
  • Medium
  • Low

What kind of change does this PR introduce?

  • Bug fix (issue #__)
  • New feature (issue #__)
  • Optimization (issue #__)
  • Updated parameters, constants (issue #__)
  • Updated documentation
  • other: __

Please check if any of the following apply

  • This PR requires changes to geometry (epic PR: __)
  • This PR requires changes to EDM4eic (EDM PR: __)
  • This PR introduces breaking changes. Please describe changes users need to make below.
  • This PR changes default behavior. Please describe changes below.
  • AI was used in preparing this PR. Please describe usage below.
    Used Copilot CLI to split the change, apply review-requested fixes, and update wording/comments for correctness.

Switch IrtCherenkovParticleID input wiring from RawHitsAssociations to
RawHitsLinks to avoid dangling references after association collections
were removed from default output selections.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings August 18, 2026 20:28
@wdconinc wdconinc changed the title fix(pid): isolate DRICH IRT link migration fix(pid): DRICH IRT link migration Aug 18, 2026
@github-actions github-actions Bot added the topic: PID Relates to PID reconstruction label Aug 18, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR isolates the DRICH IRT migration from using raw-hit associations to using raw-hit links, updating the IrtCherenkovParticleID algorithm, its factory, and the DRICH plugin wiring so the PID path consumes MCRecoTrackerHitLink collections.

Changes:

  • Switched IrtCherenkovParticleID algorithm input from MCRecoTrackerHitAssociationCollection to MCRecoTrackerHitLinkCollection.
  • Updated IrtCherenkovParticleID_factory to read MCRecoTrackerHitLink inputs and pass them to the algorithm.
  • Updated DRICH plugin wiring to provide DRICHRawHitsLinks to the PID factory instead of DRICHRawHitsAssociations.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/factories/pid/IrtCherenkovParticleID_factory.h Reads MCRecoTrackerHitLink inputs and passes them into the PID algorithm.
src/detectors/DRICH/DRICH.cc Updates factory wiring to feed DRICHRawHitsLinks into DRICH IRT PID.
src/algorithms/pid/IrtCherenkovParticleID.h Updates algorithm input type and input tag name from associations to links.
src/algorithms/pid/IrtCherenkovParticleID.cc Uses in_hit_links in processing and output association/link wiring.
Suppressed comments (1)

src/algorithms/pid/IrtCherenkovParticleID.cc:466

  • This comment now says “hit associations” but the loop iterates in_hit_links. Renaming the comment to “hit links” will reduce confusion (especially since the output method name still uses "Associations").
      // keep the legacy association relation while consuming links for MC truth lookup

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/algorithms/pid/IrtCherenkovParticleID.h Outdated
Comment thread src/algorithms/pid/IrtCherenkovParticleID.cc Outdated
Comment thread src/algorithms/pid/IrtCherenkovParticleID.cc Outdated
Copilot AI review requested due to automatic review settings August 18, 2026 20:35
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@wdconinc

Copy link
Copy Markdown
Contributor Author

Correction (formatting only): addressed review feedback from pullrequestreview-4965526672 in commit 040dbfe.

  • clarified in_hit_links docs to describe link objects (MCRecoTrackerHitLink) rather than raw hits
  • updated stale in-code comments to reference in_hit_links / link terminology
  • fixed trace grammar: "hit" -> "hits"

Associations output behavior is unchanged: addToRawHitAssociations still uses association objects.

@wdconinc
wdconinc removed the request for review from Copilot August 18, 2026 20:39
@wdconinc
wdconinc enabled auto-merge August 18, 2026 20:39
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This PR applies the include-what-you-use fixes as suggested by
https://github.com/eic/EICrecon/actions/runs/32183689072.
Please merge this PR into the branch `wdconinc-irt-link-migration`
to resolve failures in PR #2875.

Auto-generated by [create-pull-request][1]

[1]: https://github.com/peter-evans/create-pull-request

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 18, 2026 22:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Suppressed comments (1)

src/algorithms/pid/IrtCherenkovParticleID.cc:147

  • This trace message is now using in_hit_links->size(), which counts link objects (potentially multiple per raw hit) rather than raw hits. The current wording (“raw sensor hits with associated photons”) can be misleading when troubleshooting event content.
  trace("number of raw sensor hits with associated photons: {}", in_hit_links->size());

@chchatte92 chchatte92 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Also I have downloaded the artifact and I can print out the number of photons fror Aerogel and Gas. BTW, I noticed that now we have RNTuple. This would require to change the benchmarking. I believe in the benchmark we should have to have

auto reader = podio::RNTupleReader();

and podio/RNTupleReader.h has to be added.

Copilot AI review requested due to automatic review settings August 19, 2026 11:10

This comment was marked as low quality.

@wdconinc

Copy link
Copy Markdown
Contributor Author

BTW, I noticed that now we have RNTuple. This would require to change the benchmarking.

The default remains TTree, and only here in EICrecon CI do we explicitly switch to RNTuple. If you want to use RNTuple in the DRICH benchmarks, then you can switch.

@veprbl

veprbl commented Aug 19, 2026

Copy link
Copy Markdown
Member

LGTM. Also I have downloaded the artifact and I can print out the number of photons fror Aerogel and Gas. BTW, I noticed that now we have RNTuple. This would require to change the benchmarking. I believe in the benchmark we should have to have

auto reader = podio::RNTupleReader();

and podio/RNTupleReader.h has to be added.

There is a generic Reader interface that automatically handles this
https://github.com/eic/snippets/blob/96b1676aa938161405f5b8ea9cce207ce755a948/ElectronID/InclusiveSkim.C#L30-L31

Comment thread src/detectors/DRICH/DRICH.cc
@wdconinc
wdconinc added this pull request to the merge queue Aug 19, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 19, 2026
@wdconinc
wdconinc added this pull request to the merge queue Aug 19, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Aug 20, 2026
@wdconinc
wdconinc added this pull request to the merge queue Aug 20, 2026
Merged via the queue into main with commit 93a40a3 Aug 20, 2026
152 checks passed
@wdconinc
wdconinc deleted the wdconinc-irt-link-migration branch August 20, 2026 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: PID Relates to PID reconstruction

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants