Skip to content

Move PID look up tables into global pid_lut file #1745

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jun 2, 2025
Merged

Conversation

simonge
Copy link
Contributor

@simonge simonge commented Feb 27, 2025

Briefly, what does this PR introduce?

Moves all of the PID LUT factories out of their detector plugin into the global pid plugin. Also moves PID factory files into the factories directory.

Maybe a matter of personal taste but this would make the data flow through the PID algorithms more transparent.

What kind of change does this PR introduce?

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

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

@simonge simonge requested review from a team and wdconinc and removed request for a team February 27, 2025 17:28
Copy link
Member

@veprbl veprbl left a comment

Choose a reason for hiding this comment

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

This should be fine to do.

Copy link
Contributor

github-actions bot commented Feb 27, 2025

@wdconinc
Copy link
Contributor

What's the plan for this PR? Since the conflicts are likely due to the clang-format or clang-tidy PR, I can offer to resolve them, but only if there's a plan to merge this.

@simonge
Copy link
Contributor Author

simonge commented Jun 2, 2025

I still think it makes the data flow clearer. I will resolve the conflicts myself but might add another intermediate PR to move all of the remaining factories out of src/global into src/factories.

@github-actions github-actions bot added topic: documentation Improvements or additions to documentation topic: calorimetry relates to calorimetry topic: tracking Relates to tracking reconstruction topic: far-forward Far forward reconstruction topic: far-backward Reconstruction related to far backward detectors topic: forward topic: backward topic: jets labels Jun 2, 2025
@wdconinc
Copy link
Contributor

wdconinc commented Jun 2, 2025

Hmm... is GitHub confused about e2dfefd, or did something go wrong in the update/rebase? I see the entire repository reformat in this PR again.

@simonge
Copy link
Contributor Author

simonge commented Jun 2, 2025

Hmm... is GitHub confused about e2dfefd, or did something go wrong in the update/rebase? I see the entire repository reformat in this PR again.

Something probably went wrong with the rebase. I have to admit I haven't quite got my head around how to rebase/merge safely, I think this happened because I earlier merged origin/main and now have tried to rebase.

@simonge
Copy link
Contributor Author

simonge commented Jun 2, 2025

It's not a lot of work so I can just create a new clean branch and PR to avoid the mess. Unless you have a better idea.

@wdconinc
Copy link
Contributor

wdconinc commented Jun 2, 2025

It's not a lot of work so I can just create a new clean branch and PR to avoid the mess. Unless you have a better idea.

If it's just the first 3 commits (?), you could possibly run something like:

git reset --hard origin/main
git cherry-pick sha1
git cherry-pick sha2
git cherry-pick sha3
git push --force

There will be conflicts, but hopefully manageable.

@simonge simonge force-pushed the Refactor-PID-code branch from e2dfefd to df3cb4a Compare June 2, 2025 15:33
@simonge
Copy link
Contributor Author

simonge commented Jun 2, 2025

Thanks, hopefully that's much better

@simonge simonge force-pushed the Refactor-PID-code branch from 62b1eff to 63e7e34 Compare June 2, 2025 16:20
@simonge simonge changed the title Move PID look up tables into global pid file Move PID look up tables into global pid_lut file Jun 2, 2025
wdconinc
wdconinc previously approved these changes Jun 2, 2025
Copy link
Contributor

@wdconinc wdconinc left a comment

Choose a reason for hiding this comment

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

Looks good to me. Waiting for diffs.

@simonge
Copy link
Contributor Author

simonge commented Jun 2, 2025

Should I ignore iwyu asking for both:

#include <JANA/JApplication.h>
#include <JANA/JApplicationFwd.h>

I'll wait for the diffs before drawing conclusions about the tests and benchmarks not using the right libraries

@wdconinc
Copy link
Contributor

wdconinc commented Jun 2, 2025

Should I ignore iwyu asking for both:

#include <JANA/JApplication.h>
#include <JANA/JApplicationFwd.h>

I looked into this only briefly, but I think iwyu is correct here in suggesting that both should be included. The JApplicationFwd.h is an incomplete forwarding header, so some things need JApplication.h as well.

@wdconinc
Copy link
Contributor

wdconinc commented Jun 2, 2025

I'll wait for the diffs before drawing conclusions about the tests and benchmarks not using the right libraries

Diff looks good.

@simonge simonge requested a review from wdconinc June 2, 2025 18:31
@simonge simonge added this pull request to the merge queue Jun 2, 2025
Merged via the queue into main with commit fc9120b Jun 2, 2025
107 of 108 checks passed
@simonge simonge deleted the Refactor-PID-code branch June 2, 2025 20:02
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: documentation Improvements or additions to documentation topic: far-backward Reconstruction related to far backward detectors topic: far-forward Far forward reconstruction topic: forward topic: infrastructure topic: jets topic: PID Relates to PID reconstruction topic: tracking Relates to tracking reconstruction
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants