treewide: deprecate EDM4eic older than 8.7.0#2760
Conversation
26.01.0 is now outside our 6 month window. 26.02.0 comes with EDM4eic 8.7.0.
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Pull request overview
This PR updates EICrecon to require EDM4eic ≥ 8.7 and removes (tree-wide) conditional compilation paths meant to support older EDM4eic releases, standardizing on link-collection based truth linking where available.
Changes:
- Bump the minimum required EDM4eic version to 8.7 in CMake and update the eic-shell CI release to a newer stable.
- Remove EDM4eic-version
#if/#elsebranches across algorithms, factories, detector plugins, and tests, making link collections part of the standard data flow. - Expand the default PODIO output collection include list to include the relevant
*Linkscollections unconditionally.
Reviewed changes
Copilot reviewed 100 out of 100 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/tests/algorithms_test/reco_ClustersToParticles.cc | Remove EDM4eic<8.7 conditional branches; always exercise particle link output. |
| src/tests/algorithms_test/pid_lut_PIDLookup.cc | Remove EDM4eic<8.7 conditional branches; always validate link output. |
| src/tests/algorithms_test/particle_flow_TrackProtoClusterMatchPromoter.cc | Drop legacy match-collection path; standardize on link collections. |
| src/tests/algorithms_test/digi_MPGDTrackerDigi.cc | Always include/use tracker-hit link collection in tests. |
| src/tests/algorithms_test/calorimetry_CalorimeterHitDigi.cc | Always include/use calorimeter-hit link collection in tests. |
| src/tests/algorithms_test/calorimetry_CalorimeterClusterShape.cc | Always include/use cluster-particle link collection in tests. |
| src/tests/algorithms_test/calorimetry_CalorimeterClusterRecoCoG.cc | Always include/use hit/cluster link collections in tests. |
| src/services/io/podio/JEventProcessorPODIO.cc | Add many *Links collections to the default PODIO include list unconditionally. |
| src/global/tracking/tracking.cc | Always register link-collection collectors and link outputs in tracking plugin wiring. |
| src/global/reco/reco.cc | Always wire reconstructed particle link collections in reco plugin. |
| src/global/pid/pid.cc | Always wire charged PID particle link collections in PID plugin. |
| src/global/pid_lut/pid_lut.cc | Always wire PID LUT link collections in plugin outputs. |
| src/global/particle_flow/particle_flow.cc | Always use link-based inputs/outputs for PF match/subtraction wiring. |
| src/factories/tracking/TracksToParticles_factory.h | Always pass link collection output to algorithm. |
| src/factories/tracking/ActsToTracks_factory.h | Always pass track-particle link collection output to algorithm. |
| src/factories/reco/MatchClusters_factory.h | Always pass particle link collection output to algorithm. |
| src/factories/reco/ClustersToParticles_factory.h | Always pass particle link collection output to algorithm. |
| src/factories/pid/MatchToRICHPID_factory.h | Always pass link collection output to algorithm. |
| src/factories/pid_lut/PIDLookup_factory.h | Always pass link collection output to algorithm. |
| src/factories/particle_flow/TrackProtoClusterMatchPromoter_factory.h | Remove legacy match input path; always use link input. |
| src/factories/particle_flow/TrackClusterSubtractor_factory.h | Always pass track-expected link output to algorithm. |
| src/factories/fardetectors/FarDetectorTransportationPostML_factory.h | Always pass link output to algorithm. |
| src/factories/fardetectors/FarDetectorLinearTracking_factory.h | Always pass hit/track link collections through to algorithm. |
| src/factories/digi/SiliconTrackerDigi_factory.h | Always pass raw-hit link output to algorithm. |
| src/factories/digi/PhotoMultiplierHitDigi_factory.h | Always pass raw-hit link output to algorithm. |
| src/factories/digi/MPGDTrackerDigi_factory.h | Always pass raw-hit link output to algorithm. |
| src/factories/calorimetry/TruthEnergyPositionClusterMerger_factory.h | Always pass cluster link output to algorithm. |
| src/factories/calorimetry/TrackClusterMergeSplitter_factory.h | Always pass track-protocluster link output to algorithm. |
| src/factories/calorimetry/ImagingClusterReco_factory.h | Always pass MC hit links + cluster links through to algorithm. |
| src/factories/calorimetry/EnergyPositionClusterMerger_factory.h | Always pass cluster link output to algorithm. |
| src/factories/calorimetry/CalorimeterParticleIDPostML_factory.h | Always pass cluster link output to algorithm. |
| src/factories/calorimetry/CalorimeterHitDigi_factory.h | Always pass raw-hit link output to algorithm. |
| src/factories/calorimetry/CalorimeterClusterShape_factory.h | Always pass cluster link output to algorithm. |
| src/factories/calorimetry/CalorimeterClusterRecoCoG_factory.h | Always pass MC hit links + cluster links through to algorithm. |
| src/detectors/ZDC/ZDC.cc | Always wire *RawHitLinks/*ClusterLinks collection names in ZDC plugins. |
| src/detectors/RPOTS/RPOTS.cc | Always wire *RawHitLinks outputs for Roman Pots. |
| src/detectors/PFRICH/PFRICH.cc | Always wire raw-hit links outputs for PFRICH. |
| src/detectors/MPGD/MPGD.cc | Always wire raw-hit links outputs for MPGD subsystems. |
| src/detectors/LUMISPECCAL/LUMISPECCAL.cc | Always wire calorimeter raw-hit/cluster link outputs for LumiSpecCal. |
| src/detectors/LOWQ2/LOWQ2.cc | Always wire tagger tracker link collections and outputs. |
| src/detectors/FOFFMTRK/FOFFMTRK.cc | Always wire raw-hit links outputs for Off-M tracker. |
| src/detectors/FHCAL/FHCAL.cc | Always wire calorimeter raw-hit/cluster link outputs for forward calorimeters. |
| src/detectors/FEMC/FEMC.cc | Always wire calorimeter raw-hit/cluster link outputs for FEMC. |
| src/detectors/EHCAL/EHCAL.cc | Always wire calorimeter raw-hit/cluster link outputs for EHCAL. |
| src/detectors/EEMC/EEMC.cc | Always wire calorimeter raw-hit/cluster link outputs for EEMC. |
| src/detectors/ECTRK/ECTRK.cc | Always wire silicon raw-hit link outputs for endcap tracker. |
| src/detectors/ECTOF/ECTOF.cc | Always wire raw-hit link outputs for endcap TOF shared hits. |
| src/detectors/DRICH/DRICH.cc | Always wire DRICH raw-hit link outputs. |
| src/detectors/DIRC/DIRC.cc | Always wire DIRC raw-hit link outputs. |
| src/detectors/BVTX/BVTX.cc | Always wire barrel vertex raw-hit link outputs. |
| src/detectors/BTRK/BTRK.cc | Always wire barrel tracker raw-hit link outputs. |
| src/detectors/BTOF/BTOF.cc | Always wire barrel TOF shared raw-hit link outputs. |
| src/detectors/BHCAL/BHCAL.cc | Always wire barrel HCal raw-hit/cluster link outputs. |
| src/detectors/BEMC/BEMC.cc | Always wire barrel ECal raw-hit/cluster link outputs. |
| src/detectors/B0TRK/B0TRK.cc | Always wire B0 tracker raw-hit link outputs. |
| src/detectors/B0ECAL/B0ECAL.cc | Always wire B0 ECal raw-hit/cluster link outputs. |
| src/algorithms/tracking/TracksToParticles.h | Remove EDM4eic<8.7 conditional signature; always expose link output slot. |
| src/algorithms/tracking/TracksToParticles.cc | Remove EDM4eic<8.7 conditional logic; always produce links. |
| src/algorithms/tracking/ActsToTracks.h | Remove EDM4eic<8.7 conditional signature; always expose track link output slot. |
| src/algorithms/tracking/ActsToTracks.cc | Remove EDM4eic<8.7 conditional logic; always produce links. |
| src/algorithms/reco/MatchClusters.h | Remove EDM4eic<8.7 conditional signature; always include links output. |
| src/algorithms/reco/MatchClusters.cc | Remove EDM4eic<8.7 conditional logic; always produce links. |
| src/algorithms/reco/ClustersToParticles.h | Remove EDM4eic<8.7 conditional signature; always include links output. |
| src/algorithms/reco/ClustersToParticles.cc | Remove EDM4eic<8.7 conditional logic; always produce links. |
| src/algorithms/pid/MatchToRICHPID.h | Remove EDM4eic<8.7 conditional signature; always include links output. |
| src/algorithms/pid/MatchToRICHPID.cc | Remove EDM4eic<8.7 conditional logic; always produce links. |
| src/algorithms/pid_lut/PIDLookup.h | Remove EDM4eic<8.7 conditional signature; always include links output. |
| src/algorithms/pid_lut/PIDLookup.cc | Remove EDM4eic<8.7 conditional logic; always produce links. |
| src/algorithms/particle_flow/TrackProtoClusterMatchPromoter.h | Remove legacy match-collection input path; standardize on link collection. |
| src/algorithms/particle_flow/TrackProtoClusterMatchPromoter.cc | Remove legacy match-collection processing path. |
| src/algorithms/particle_flow/TrackClusterSubtractor.h | Remove EDM4eic<8.7 conditional signature; always include link output. |
| src/algorithms/particle_flow/TrackClusterSubtractor.cc | Remove EDM4eic<8.7 conditional logic; always produce links. |
| src/algorithms/onnx/CalorimeterParticleIDPostML.h | Remove EDM4eic<8.7 conditional signature; always include links output. |
| src/algorithms/onnx/CalorimeterParticleIDPostML.cc | Remove EDM4eic<8.7 conditional logic; always produce links. |
| src/algorithms/fardetectors/FarDetectorTransportationPostML.h | Remove EDM4eic<8.7 conditional signature; always include links output. |
| src/algorithms/fardetectors/FarDetectorTransportationPostML.cc | Remove EDM4eic<8.7 conditional logic; always produce links. |
| src/algorithms/fardetectors/FarDetectorLinearTracking.h | Remove EDM4eic<8.7 conditional signature; standardize on link-based truth association path. |
| src/algorithms/fardetectors/FarDetectorLinearTracking.cc | Remove EDM4eic<8.7 fallback path (but currently has an unsafe link_nav deref; see review comment). |
| src/algorithms/digi/SiliconTrackerDigi.h | Remove EDM4eic<8.7 conditional signature; always include links output. |
| src/algorithms/digi/SiliconTrackerDigi.cc | Remove EDM4eic<8.7 conditional logic; always produce links. |
| src/algorithms/digi/PhotoMultiplierHitDigi.h | Remove EDM4eic<8.7 conditional signature; always include links output. |
| src/algorithms/digi/PhotoMultiplierHitDigi.cc | Remove EDM4eic<8.7 conditional logic; always produce links. |
| src/algorithms/digi/MPGDTrackerDigi.h | Remove EDM4eic<8.7 conditional signature; always include links output. |
| src/algorithms/digi/MPGDTrackerDigi.cc | Remove EDM4eic<8.7 conditional logic; always produce links. |
| src/algorithms/calorimetry/TruthEnergyPositionClusterMerger.h | Remove EDM4eic<8.7 conditional signature; always include links output. |
| src/algorithms/calorimetry/TruthEnergyPositionClusterMerger.cc | Remove EDM4eic<8.7 conditional logic; always produce links. |
| src/algorithms/calorimetry/TrackClusterMergeSplitter.h | Remove legacy match-collection output path; standardize on link collection. |
| src/algorithms/calorimetry/TrackClusterMergeSplitter.cc | Remove legacy match-collection output path; always produce links. |
| src/algorithms/calorimetry/ImagingClusterReco.h | Remove EDM4eic<8.7 conditional signature; standardize on link-based truth association path. |
| src/algorithms/calorimetry/ImagingClusterReco.cc | Remove EDM4eic<8.7 fallback association path; always use LinkNavigator when available. |
| src/algorithms/calorimetry/EnergyPositionClusterMerger.h | Remove EDM4eic<8.7 conditional signature; always include links output. |
| src/algorithms/calorimetry/EnergyPositionClusterMerger.cc | Remove EDM4eic<8.7 conditional logic; always produce links. |
| src/algorithms/calorimetry/CalorimeterHitDigi.h | Remove EDM4eic<8.7 conditional signature; always include links output. |
| src/algorithms/calorimetry/CalorimeterHitDigi.cc | Remove EDM4eic<8.7 conditional logic; always produce links. |
| src/algorithms/calorimetry/CalorimeterClusterShape.h | Remove EDM4eic<8.7 conditional signature; always include links output. |
| src/algorithms/calorimetry/CalorimeterClusterShape.cc | Remove EDM4eic<8.7 conditional logic around link output population. |
| src/algorithms/calorimetry/CalorimeterClusterRecoCoG.h | Remove EDM4eic<8.7 conditional signature; standardize on link-based truth association path. |
| src/algorithms/calorimetry/CalorimeterClusterRecoCoG.cc | Remove EDM4eic<8.7 fallback association path; always use LinkNavigator when available. |
| CMakeLists.txt | Raise EDM4EIC_VERSION_MIN to 8.7. |
| .github/workflows/linux-eic-shell.yml | Bump eic-shell stable release used in CI matrix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This PR applies the include-what-you-use fixes as suggested by https://github.com/eic/EICrecon/actions/runs/29774650918. Please merge this PR into the branch `pr/edm4eic_870` to resolve failures in PR #2760. 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>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 100 out of 100 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (2)
src/algorithms/fardetectors/FarDetectorLinearTracking.cc:106
link_navis only emplaced whendo_associs true, but it is dereferenced unconditionally here (*link_nav). This will crash whenhitLinksis nullptr or empty (e.g. running without truth links).assocHitsis also dereferenced unconditionally and can be nullptr for the optional input.
ConvertClusters(*layerHits, *link_nav, *assocHits, convertedHits, assocParts);
src/algorithms/tracking/TracksToParticles.cc:65
track_assocs,part_links, andpart_assocsare all optional in the algorithm signature, but this code dereferences them unconditionally (*track_assocs,part_links->create(),part_assocs->create()). This can crash when running without truth associations or when a caller omits optional outputs.
wdconinc
left a comment
There was a problem hiding this comment.
Looked through them all and this is a great simplification.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 100 out of 100 changed files in this pull request and generated 4 comments.
Comments suppressed due to low confidence (2)
src/algorithms/fardetectors/FarDetectorLinearTracking.cc:82
assocHitsandlink_navare dereferenced unconditionally in the layer loop, even thoughhitLinks/assocHitsare optional inputs. When either is missing/empty,link_navis disengaged and/orassocHitsis null, leading to a crash at the firstConvertClusters(*layerHits, *link_nav, *assocHits, ...)call.
If this algorithm requires truth collections, fail fast with a clear message before building link_nav. If it should run without truth, it needs a separate non-truth conversion path and must avoid using assocParts later.
const bool do_assoc = hitLinks != nullptr && !hitLinks->empty();
if (!do_assoc) {
debug("Provided MCRecoTrackerHitLink collection is empty. No truth associations "
"will be performed.");
}
src/algorithms/tracking/ActsToTracks.cc:264
tracks_linksandtracks_assocare declared as optional outputs inActsToTracksAlgorithm, but are dereferenced unconditionally here. If a caller omits either optional output collection, this will crash.
26.01.0 is now outside our 6 month window.
26.02.0 comes with EDM4eic 8.7.0.
Briefly, what does this PR introduce? Please link to any relevant presentations or discussions.
What is the urgency of this PR?
What kind of change does this PR introduce?
Please check if any of the following apply
claude