Skip to content

feat: inherit jana::components::JOmniFactory and transition to using upstream JOmniFactory - #2450

Open
wdconinc wants to merge 18 commits into
mainfrom
jana2-2.4.3-jomnifactory
Open

feat: inherit jana::components::JOmniFactory and transition to using upstream JOmniFactory#2450
wdconinc wants to merge 18 commits into
mainfrom
jana2-2.4.3-jomnifactory

Conversation

@wdconinc

@wdconinc wdconinc commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

Briefly, what does this PR introduce?

This PR reapplies #1959 (reverted in #2005) and merges in #2002 for good measure. This removes our own extensive JOmniFactory support in favor of the JANA upstream JOmniFactory when version 2.4.3 is available: a thin forwarding shim class is used to allow us to keep the app argument in place for now, since it is required for < 2.4.3 versions. The only plugin factory wirings that have been modified are those where the new TypedWiring is required for variadic inputs.

The issues reported in #2000 are ultimately due to exceptions in the track reconstruction for the file used there (likely an out of sync geometry). These exceptions are gracefully absorbed in pre-2.4.3 local-JOmniFactory, but not anymore when using the upstream JOmniFactory. To make them less lethal, the exceptions are caught in the algorithm now. This shifts geometry mismatch from exceptional error to logic error (but likely a noisy one).

Needs:

What kind of change does this PR introduce?

  • Bug fix (issue #__)
  • New feature (issue #__)
  • Documentation update
  • Other: __

Please check if this PR fulfills the following:

  • Tests for the changes have been added
  • Documentation has been added / updated
  • Changes have been communicated to collaborators

Does this PR introduce breaking changes? What changes might users need to make to their code?

No.

Does this PR change default behavior?

No.

@github-actions github-actions Bot added topic: calorimetry relates to calorimetry topic: tracking Relates to tracking reconstruction topic: PID Relates to PID reconstruction topic: far-forward Far forward reconstruction topic: far-backward Reconstruction related to far backward detectors topic: infrastructure topic: barrel topic: forward topic: backward labels Feb 9, 2026
@wdconinc
wdconinc force-pushed the jana2-2.4.3-jomnifactory branch 3 times, most recently from 7591981 to cf78f5d Compare February 10, 2026 22:43
wdconinc added a commit that referenced this pull request Feb 11, 2026
…upstream JOmniFactory (fix: iwyu) (#2453)

This PR applies the include-what-you-use fixes as suggested by
https://github.com/eic/EICrecon/actions/runs/21885279736.
Please merge this PR into the branch `jana2-2.4.3-jomnifactory`
to resolve failures in PR #2450.

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>
Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
wdconinc added a commit that referenced this pull request Feb 14, 2026
…upstream JOmniFactory (fix: iwyu) (#2453)

This PR applies the include-what-you-use fixes as suggested by
https://github.com/eic/EICrecon/actions/runs/21885279736.
Please merge this PR into the branch `jana2-2.4.3-jomnifactory`
to resolve failures in PR #2450.

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>
Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
@wdconinc
wdconinc force-pushed the jana2-2.4.3-jomnifactory branch from 9811bd6 to 4d89276 Compare February 14, 2026 03:45
github-merge-queue Bot pushed a commit that referenced this pull request Feb 16, 2026
### Briefly, what does this PR introduce?
This PR (cherry-picked from #2450) adds a try-catch around cellID
position lookup in the TrackerHitReconstruction.cc and
LGADHitCalibration.cc. This helps build resiliency when running EICrecon
against a simulation file created with a different geometry than that
used in reconstruction (see e.g. #2000 which was ultimately caused by
this, along with stricter treatment of exceptions in JANA2 factories
used there). This shifts geometry mismatch from exceptional error to
logic error (but likely a noisy one).

One could argue that geometry mismatches should be treated as
exceptional, but that is more true if we can do this on `init` instead
of during `process`.

### What kind of change does this PR introduce?
- [x] Bug fix (issue: don't treat cellID lookup failures as exceptional)
- [ ] New feature (issue #__)
- [ ] Documentation update
- [ ] Other: __

### Please check if this PR fulfills the following:
- [ ] Tests for the changes have been added
- [ ] Documentation has been added / updated
- [ ] Changes have been communicated to collaborators

### Does this PR introduce breaking changes? What changes might users
need to make to their code?
No.

### Does this PR change default behavior?
No.

---------

Co-authored-by: epic-capybara <139920704+epic-capybara@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
jsobajic pushed a commit that referenced this pull request May 14, 2026
### Briefly, what does this PR introduce?
This PR (cherry-picked from #2450) adds a try-catch around cellID
position lookup in the TrackerHitReconstruction.cc and
LGADHitCalibration.cc. This helps build resiliency when running EICrecon
against a simulation file created with a different geometry than that
used in reconstruction (see e.g. #2000 which was ultimately caused by
this, along with stricter treatment of exceptions in JANA2 factories
used there). This shifts geometry mismatch from exceptional error to
logic error (but likely a noisy one).

One could argue that geometry mismatches should be treated as
exceptional, but that is more true if we can do this on `init` instead
of during `process`.

### What kind of change does this PR introduce?
- [x] Bug fix (issue: don't treat cellID lookup failures as exceptional)
- [ ] New feature (issue #__)
- [ ] Documentation update
- [ ] Other: __

### Please check if this PR fulfills the following:
- [ ] Tests for the changes have been added
- [ ] Documentation has been added / updated
- [ ] Changes have been communicated to collaborators

### Does this PR introduce breaking changes? What changes might users
need to make to their code?
No.

### Does this PR change default behavior?
No.

---------

Co-authored-by: epic-capybara <139920704+epic-capybara@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
wdconinc added a commit that referenced this pull request Jul 21, 2026
…upstream JOmniFactory (fix: iwyu) (#2453)

This PR applies the include-what-you-use fixes as suggested by
https://github.com/eic/EICrecon/actions/runs/21885279736.
Please merge this PR into the branch `jana2-2.4.3-jomnifactory`
to resolve failures in PR #2450.

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>
Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
@wdconinc
wdconinc force-pushed the jana2-2.4.3-jomnifactory branch from 4d89276 to 5d773c3 Compare July 21, 2026 18:18
wdconinc added a commit that referenced this pull request Jul 21, 2026
…upstream JOmniFactory (fix: iwyu) (#2453)

This PR applies the include-what-you-use fixes as suggested by
https://github.com/eic/EICrecon/actions/runs/21885279736.
Please merge this PR into the branch `jana2-2.4.3-jomnifactory`
to resolve failures in PR #2450.

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>
Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
@wdconinc
wdconinc force-pushed the jana2-2.4.3-jomnifactory branch from 5d773c3 to 4350d0b Compare July 21, 2026 18:29
wdconinc added a commit that referenced this pull request Jul 21, 2026
…upstream JOmniFactory (fix: iwyu) (#2453)

This PR applies the include-what-you-use fixes as suggested by
https://github.com/eic/EICrecon/actions/runs/21885279736.
Please merge this PR into the branch `jana2-2.4.3-jomnifactory`
to resolve failures in PR #2450.

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>
Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
@wdconinc
wdconinc force-pushed the jana2-2.4.3-jomnifactory branch from 4350d0b to 9372ac8 Compare July 21, 2026 19:07
wdconinc added a commit that referenced this pull request Jul 21, 2026
…upstream JOmniFactory (fix: iwyu) (#2453)

This PR applies the include-what-you-use fixes as suggested by
https://github.com/eic/EICrecon/actions/runs/21885279736.
Please merge this PR into the branch `jana2-2.4.3-jomnifactory`
to resolve failures in PR #2450.

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>
Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
@wdconinc
wdconinc force-pushed the jana2-2.4.3-jomnifactory branch from 9372ac8 to 8edf9ca Compare July 21, 2026 23:24
wdconinc added a commit that referenced this pull request Jul 21, 2026
…upstream JOmniFactory (fix: iwyu) (#2453)

This PR applies the include-what-you-use fixes as suggested by
https://github.com/eic/EICrecon/actions/runs/21885279736.
Please merge this PR into the branch `jana2-2.4.3-jomnifactory`
to resolve failures in PR #2450.

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>
Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
@wdconinc
wdconinc force-pushed the jana2-2.4.3-jomnifactory branch from 8edf9ca to 28b4276 Compare July 21, 2026 23:41

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 transitions EICrecon’s local JOmniFactory/JOmniFactoryGeneratorT implementation to thin shims over JANA’s upstream jana::components::JOmniFactory{GeneratorT}, updating plugin wirings where upstream “TypedWiring” is required (notably for variadic inputs/outputs) and adding a configure-time check to detect a known JANA 2.4.3 Input<T> bug.

Changes:

  • Replace the in-repo JOmniFactoryGeneratorT implementation with a forwarding shim to upstream JANA, and update multiple plugins to use upstream-style TypedWiring for variadics.
  • Replace the in-repo JOmniFactory implementation with a shim over upstream JANA, retaining EICrecon logging/MDC behavior and adapting input/output helper types across JANA versions.
  • Add a CMake configure-time probe program for a known JANA 2.4.3 JHasInputs::Input<T> bug and bump the eic-shell CI release version.

Reviewed changes

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

Show a summary per file
File Description
src/global/tracking/tracking.cc Updates tracking plugin factory wiring to TypedWiring for variadic collectors/splitters.
src/global/reco/reco.cc Updates reco plugin variadic collectors to TypedWiring and keeps shim generator usage.
src/global/pid/pid.cc Adds includes/aliasing for upstream TypedWiring usage consistency.
src/global/pid_lut/pid_lut.cc Migrates several variadic collectors to TypedWiring form.
src/global/particle_flow/particle_flow.cc Adds includes/aliasing for upstream generator compatibility.
src/global/beam/beam.cc Migrates splitter/collector wiring to TypedWiring and trims unused includes.
src/factories/tracking/LGADHitClustering_factory.h Removes no-op ChangeRun override in an omni factory.
src/factories/reco/ReconstructedElectrons_factory.h Adjusts PodioInput default naming to align with upstream wiring behavior.
src/factories/reco/LGADHitCalibration_factory.h Removes no-op ChangeRun override in an omni factory.
src/factories/reco/ChargedReconstructedParticleSelector_factory.h Adjusts PodioInput default naming to align with upstream wiring behavior.
src/factories/reco/ChargedMCParticleSelector_factory.h Adjusts PodioInput default naming to align with upstream wiring behavior.
src/factories/meta/CollectionCollector_factory.h Updates variadic input helper construction and adds explicit null-check behavior.
src/factories/digi/CFDROCDigitization_factory.h Removes no-op ChangeRun override in an omni factory.
src/extensions/jana/JOmniFactoryGeneratorT.h Replaces local generator implementation with a shim over upstream JOmniFactoryGeneratorT.
src/extensions/jana/JOmniFactory.h Replaces local omni factory implementation with a shim over upstream JOmniFactory, preserving logging/MDC integration.
src/detectors/ZDC/ZDC.cc Adds includes/aliasing for upstream generator/TypedWiring compatibility.
src/detectors/RPOTS/RPOTS.cc Adds includes/aliasing for upstream generator/TypedWiring compatibility.
src/detectors/PFRICH/PFRICH.cc Adds includes/aliasing for upstream generator/TypedWiring compatibility.
src/detectors/MPGD/MPGD.cc Adds includes/aliasing for upstream generator/TypedWiring compatibility.
src/detectors/LUMISPECCAL/LUMISPECCAL.cc Adds includes/aliasing for upstream generator/TypedWiring compatibility.
src/detectors/LOWQ2/LOWQ2.cc Migrates multiple variadic wirings to TypedWiring and drops now-unneeded app arguments.
src/detectors/FOFFMTRK/FOFFMTRK.cc Adds includes/aliasing for upstream generator/TypedWiring compatibility.
src/detectors/FHCAL/FHCAL.cc Adds includes/aliasing for upstream generator/TypedWiring compatibility.
src/detectors/FEMC/FEMC.cc Adds includes/aliasing for upstream generator/TypedWiring compatibility.
src/detectors/EHCAL/EHCAL.cc Adds includes/aliasing for upstream generator/TypedWiring compatibility.
src/detectors/EEMC/EEMC.cc Migrates ONNX inference wiring to TypedWiring and adds includes/aliasing.
src/detectors/ECTRK/ECTRK.cc Adds includes/aliasing for upstream generator/TypedWiring compatibility.
src/detectors/ECTOF/ECTOF.cc Adds includes/aliasing for upstream generator/TypedWiring compatibility.
src/detectors/DRICH/DRICH.cc Migrates variadic merges to TypedWiring and adds includes/aliasing.
src/detectors/DIRC/DIRC.cc Adds includes/aliasing for upstream generator/TypedWiring compatibility.
src/detectors/BVTX/BVTX.cc Adds includes/aliasing for upstream generator/TypedWiring compatibility.
src/detectors/BTRK/BTRK.cc Adds includes/aliasing for upstream generator/TypedWiring compatibility.
src/detectors/BTOF/BTOF.cc Adds includes/aliasing for upstream generator/TypedWiring compatibility.
src/detectors/BHCAL/BHCAL.cc Adds includes/aliasing for upstream generator/TypedWiring compatibility.
src/detectors/BEMC/BEMC.cc Adds includes/aliasing for upstream generator/TypedWiring compatibility.
src/detectors/B0TRK/B0TRK.cc Adds includes/aliasing for upstream generator/TypedWiring compatibility.
src/detectors/B0ECAL/B0ECAL.cc Adds includes/aliasing for upstream generator/TypedWiring compatibility.
CMakeLists.txt Adds a configure-time try_run() probe to detect a specific JANA 2.4.3 upstream bug and fail early.
cmake/test_jana243_f18b66c6.cpp Adds the probe program used by CMake to detect the JANA 2.4.3 Input<T> issue.
.github/workflows/linux-eic-shell.yml Bumps the eic-shell CI release version used in one matrix entry.
Comments suppressed due to low confidence (1)

src/global/tracking/tracking.cc:88

  • The new CentralTrackingRawHitAssociations wiring uses 'TOFBarrelRawHitAssociations'/'TOFEndcapRawHitAssociations', but the TOF digi chain outputs 'TOFBarrelSharedRawHitAssociations'/'TOFEndcapSharedRawHitAssociations'. This typo means TOF associations won't be merged even when available.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/global/tracking/tracking.cc Outdated
Comment thread src/global/tracking/tracking.cc Outdated
Comment thread src/extensions/jana/JOmniFactory.h
Comment thread CMakeLists.txt
Comment thread src/global/tracking/tracking.cc Outdated
Comment thread src/global/tracking/tracking.cc Outdated
Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
Copilot AI review requested due to automatic review settings July 24, 2026 13:19
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@wdconinc
wdconinc removed the request for review from Copilot July 24, 2026 13:19
Removed conditional compilation for EICRECON_JANA_IS_243 and related code.
@wdconinc
wdconinc requested review from Copilot and removed request for Copilot July 24, 2026 13:24

@veprbl veprbl 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.

Looks solid, thank you!

@wdconinc

Copy link
Copy Markdown
Contributor Author

Copilot AI review requested due to automatic review settings July 28, 2026 22:09

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.

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

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

Labels

topic: backward topic: barrel topic: calorimetry relates to calorimetry topic: digitization topic: far-backward Reconstruction related to far backward detectors topic: far-forward Far forward reconstruction topic: forward topic: infrastructure topic: PID Relates to PID reconstruction topic: tracking Relates to tracking reconstruction

Development

Successfully merging this pull request may close these issues.

5 participants