Skip to content

fix: remove *Associations from PODIO output collections - #2822

Open
wdconinc wants to merge 13 commits into
mainfrom
wdconinc-fluffy-invention
Open

fix: remove *Associations from PODIO output collections#2822
wdconinc wants to merge 13 commits into
mainfrom
wdconinc-fluffy-invention

Conversation

@wdconinc

@wdconinc wdconinc commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Dependencies

Description

Removes 60 unused *Associations entries from the default output collections list in JEventProcessorPODIO.cc. These association collections are no longer needed in the standard PODIO output, reducing file size and output verbosity. For each of the removed *Associations, the *Links are written.

Also, modifies IrtCherenkovParticleID algorithm/factory to use links instead of associations to avoid dangling references.

Changes

  • Removed all *Associations collection entries from output_collections vector
  • Adds *Links collection outputs to IrtCherenkovParticleID algorithm/factory

This change affects the default PODIO output files generated by EICrecon, excluding these association collections unless explicitly requested via configuration.

Impact

  • Smaller output ROOT files by default
  • Faster file I/O operations
  • Users can still enable specific associations via podio:output_collections parameter if needed

Copilot AI lite review requested due to automatic review settings August 3, 2026 20:20
@wdconinc wdconinc changed the title Remove unused *Associations entries from PODIO output collections fix: remove unused *Associations entries from PODIO output collections Aug 3, 2026
@wdconinc
wdconinc requested review from a team and veprbl August 3, 2026 20:23

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.

🟡 Not ready to approve

The implementation and PR description are inconsistent about which *Associations collections are still kept by default, and this needs to be clarified or corrected.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

This PR trims the default PODIO output collection include-list in JEventProcessorPODIO.cc by removing many *Associations collections (while keeping the corresponding *Links collections), aiming to reduce default output size and verbosity.

Changes:

  • Removed numerous *Associations entries from the default output_collections list.
  • Kept *Links entries alongside the corresponding reconstructed objects.
  • Left MCScatteredElectronAssociations / MCNonScatteredElectronAssociations (and also ReconstructedChargedParticleAssociations) in the default list.
File summaries
File Description
src/services/io/podio/JEventProcessorPODIO.cc Removes many *Associations collections from the default PODIO output collection list to reduce persisted output volume.
Review details

Suppressed comments (1)

src/services/io/podio/JEventProcessorPODIO.cc:216

  • The PR description says all *Associations entries were removed except the two MC*ElectronAssociations, but ReconstructedChargedParticleAssociations is still in the default output list. Either update the PR description to reflect this exception, or remove this entry if it is also intended to be excluded by default.
      "ReconstructedChargedParticles",
      "ReconstructedChargedParticleLinks",
      "ReconstructedChargedParticleAssociations",
      "MCScatteredElectronAssociations",    // Remove if/when used internally
      "MCNonScatteredElectronAssociations", // Remove if/when used internally
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

@wdconinc
wdconinc requested review from Copilot and removed request for Copilot August 3, 2026 20:39
@wdconinc
wdconinc enabled auto-merge August 3, 2026 20:39
@wdconinc
wdconinc requested review from Copilot and removed request for Copilot August 3, 2026 20:50
@wdconinc wdconinc changed the title fix: remove unused *Associations entries from PODIO output collections fix: remove *Associations entries from PODIO output collections Aug 3, 2026
@wdconinc wdconinc changed the title fix: remove *Associations entries from PODIO output collections fix: remove *Associations from PODIO output collections Aug 3, 2026
wdconinc pushed a commit that referenced this pull request Aug 3, 2026
…s (fix: iwyu) (#2825)

This PR applies the include-what-you-use fixes as suggested by
https://github.com/eic/EICrecon/actions/runs/30852065609.
Please merge this PR into the branch `wdconinc-fluffy-invention`
to resolve failures in PR #2822.

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 3, 2026 22:12
Copilot AI previously approved these changes Aug 3, 2026

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.

🟢 Ready to approve

The changes are focused and consistent with the stated goal, with only a minor wording clarification suggested in an inline comment.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Review details

Suppressed comments (1)

src/services/io/podio/JEventProcessorPODIO.cc:217

  • The inline comments for the temporary MC*Electron{Links,Associations} entries read "Remove if/when used internally", which is ambiguous and appears inverted (if they are used internally, they should not be removed). Reword to clarify they can be removed once they are no longer needed internally / after migration.
      "MCScatteredElectronLinks",           // Remove if/when used internally
      "MCScatteredElectronAssociations",    // Remove if/when used internally
      "MCNonScatteredElectronLinks",        // Remove if/when used internally
      "MCNonScatteredElectronAssociations", // Remove if/when used internally
  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

@wdconinc
wdconinc requested review from Copilot and removed request for Copilot August 3, 2026 22:31
@github-actions github-actions Bot added the topic: PID Relates to PID reconstruction label Aug 3, 2026
@wdconinc
wdconinc requested review from Copilot and removed request for Copilot August 3, 2026 22:47
Copilot AI review requested due to automatic review settings August 3, 2026 23:35

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.

🟡 Not ready to approve

The default output now writes subset MC*ElectronAssociations collections without writing their parent ReconstructedChargedParticleAssociations, which can produce dangling collectionID references in the output.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Review details

Suppressed comments (1)

src/global/reco/reco.cc:17

  • The new #include <podio/detail/Link.h> and #include <deque> are unused in this translation unit, increasing compile time and risking unused-include warnings under stricter builds/clang-tidy.
#include <edm4hep/MCParticle.h>
#include <podio/detail/Link.h>
#include <deque>
#include <map>
  • Files reviewed: 6/6 changed files
  • Comments generated: 1
  • Review effort level: Lite

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

Comment thread src/services/io/podio/JEventProcessorPODIO.cc Outdated

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 5 out of 5 changed files in this pull request and generated no new comments.

Suppressed comments (3)

src/algorithms/pid/IrtCherenkovParticleID.cc:29

  • Avoid including PODIO internal headers from podio/detail/* here. These headers are not part of the stable public API and are currently unused in this file, which can cause brittle builds across PODIO versions.
#include <podio/ObjectID.h>
#include <podio/RelationRange.h>
#include <podio/detail/LinkCollectionImpl.h>
#include <podio/detail/LinkCollectionIterator.h>
#include <algorithm>

src/algorithms/pid/IrtCherenkovParticleID.cc:147

  • The trace message says "number of raw sensor hit" (singular) but logs a count. Update wording to plural (and mention links explicitly) to avoid confusing log output.
  trace("number of raw sensor hits: {}", in_raw_hits->size());
  trace("number of raw sensor hit with associated photons: {}", in_hit_links->size());

src/algorithms/pid/IrtCherenkovParticleID.cc:234

  • This comment still says the MC photon lookup loops over in_hit_assocs, but the code now loops over in_hit_links. Updating the comment avoids misleading future readers when debugging cheat-mode behavior.
        // get MC photon(s), typically only used by cheat modes or trace logging
        // - loop over `in_hit_assocs`, searching for the matching hit association
        // - will not exist for noise hits
        edm4hep::MCParticle mc_photon;
        bool mc_photon_found = false;
        if (m_cfg.cheatPhotonVertex || m_cfg.cheatTrueRadiator) {
          for (const auto& hit_link : *in_hit_links) {
            if (hit_link.getFrom().isAvailable()) {

@wdconinc
wdconinc requested review from a team and ruse-traveler August 18, 2026 18:22
@wdconinc wdconinc mentioned this pull request Aug 18, 2026
14 tasks
wdconinc and others added 10 commits August 19, 2026 21:55
Removed 62 entries ending with 'Associations' from the output_collections
vector in JEventProcessorPODIO.cc to exclude these collections from
PODIO output files.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep MCScatteredElectronAssociations and MCNonScatteredElectronAssociations
in the output_collections list as requested, removing only other Associations
entries that are not currently used internally.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Removed 'ReconstructedChargedParticleAssociations' from the list.
…s (fix: iwyu) (#2825)

This PR applies the include-what-you-use fixes as suggested by
https://github.com/eic/EICrecon/actions/runs/30852065609.
Please merge this PR into the branch `wdconinc-fluffy-invention`
to resolve failures in PR #2822.

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>
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 review requested due to automatic review settings August 20, 2026 02:57
@wdconinc
wdconinc force-pushed the wdconinc-fluffy-invention branch from e99c62c to c8204ec Compare August 20, 2026 02:57

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 2 comments.

Suppressed comments (1)

src/services/io/podio/JEventProcessorPODIO.cc:216

  • PR description/title says all *Associations outputs were removed from the default PODIO output list, but there are still association collections present elsewhere in output_collections (e.g. DRICHRawHitsAssociations, ReconstructedChargedParticleAssociations, MCScatteredElectronAssociations). Please align the PR description with the actual behavior (document exceptions), or remove the remaining association outputs if they are truly no longer needed.
      "ReconstructedParticles",
      "ReconstructedParticleLinks",
      "ReconstructedTruthSeededChargedParticles",
      "ReconstructedTruthSeededChargedParticleLinks",
      "ReconstructedChargedRealPIDParticles",

Comment on lines +76 to +80
m_algo->process({m_aerogel_tracks_input(), m_gas_tracks_input(), m_merged_tracks_input(),
m_raw_hits_input(), m_raw_hit_links_input(), m_raw_hit_assoc_input()},
m_raw_hits_input(), m_raw_hit_links_input(), m_raw_hit_assoc_input()},
{m_aerogel_particleIDs_output().get(), m_gas_particleIDs_output().get()});
}
}
Comment on lines 139 to 143
{"DRICHAerogelTracks", "DRICHGasTracks", "DRICHMergedTracks", "DRICHRawHits",
"DRICHRawHitsLinks", "DRICHRawHitsAssociations"},
"DRICHRawHitsLinks", "DRICHRawHitsAssociations"
},
{"DRICHAerogelIrtCherenkovParticleID", "DRICHGasIrtCherenkovParticleID"}, irt_cfg, app));
Remove duplicated input wiring lines introduced during conflict
resolution in DRICH plugin wiring and IrtCherenkovParticleID factory.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 20, 2026 03:04

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 2 out of 2 changed files in this pull request and generated no new comments.

Suppressed comments (1)

src/services/io/podio/JEventProcessorPODIO.cc:71

  • The PR title/description say all *Associations were removed from the default PODIO output list and that IrtCherenkovParticleID was migrated to links. However, JEventProcessorPODIO.cc still contains several *Associations outputs (e.g. DRICHRawHitsAssociations, MCScatteredElectronAssociations, MCNonScatteredElectronAssociations), and IrtCherenkovParticleID still persists RawHitAssociations relations via addToRawHitAssociations(...) (see src/algorithms/pid/IrtCherenkovParticleID.cc:470-473). Please either update the PR description/title to reflect what is actually changed, or complete the link migration/removal for the remaining association outputs so defaults are consistent.
      "CentralTrackerTruthSeeds",
      "CentralTrackingRecHits",
      "CentralTrackingRawHitLinks",
      "CentralTrackSeeds",
      "CentralTrackSeedParameters",

…2877)

This PR applies the include-what-you-use fixes as suggested by
https://github.com/eic/EICrecon/actions/runs/32326935761.
Please merge this PR into the branch `wdconinc-fluffy-invention`
to resolve failures in PR #2822.

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 20, 2026 03:43

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 1 out of 1 changed files in this pull request and generated no new comments.

Suppressed comments (1)

src/services/io/podio/JEventProcessorPODIO.cc:215

  • Although many *Associations entries are removed from the default output_collections, the list still includes some association collections (e.g. ReconstructedChargedParticleAssociations, MCScatteredElectronAssociations, MCNonScatteredElectronAssociations, and also DRICHRawHitsAssociations earlier). This conflicts with the PR description/title stating that *Associations entries are removed from the default PODIO output. Please either remove the remaining association collections as well, or update the PR description (and/or add an inline comment) to clarify which association collections intentionally remain and why.
      "ReconstructedParticles",
      "ReconstructedParticleLinks",
      "ReconstructedTruthSeededChargedParticles",
      "ReconstructedTruthSeededChargedParticleLinks",

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