refactor: remove migrated momentum functions and dead batch helpers from util.h#5
Open
refactor: remove migrated momentum functions and dead batch helpers from util.h#5
Conversation
There was a problem hiding this comment.
Pull request overview
This PR simplifies include/common_bench/util.h by removing momentum helper functions that were migrated to edm4eic/analysis_utils.h or had no active callers, and by trimming now-unneeded includes.
Changes:
- Removed migrated momentum construction helpers (
momenta_from_tracking,momenta_RC,momenta_from_simulation). - Removed unused “batch” kinematics helpers (
mom,pt,phi,eta). - Cleaned up comments and removed several includes that were only needed by the deleted helpers.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…rom util.h
Remove from util.h:
- momenta_from_tracking: migrated to edm4eic::momenta(tracks, mass)
(also was a verbatim duplicate of edm4eic::momenta_from_tracking)
- momenta_RC: migrated to edm4eic::momenta(ReconstructedParticleData)
- momenta_from_simulation: migrated to edm4eic::momenta(MCParticleData)
- mom, pt, phi, eta: batch scalar projections with no active callers;
equivalent single-particle utilities exist in edm4hep/utils/kinematics.h
Also remove now-unnecessary includes (edm4hep/edm4eic headers, TF1/TFitResult,
algorithm, limits) and the related forward declarations.
Retained: get_pdg_mass, unknown_particle_error, find_decay_pair.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Remove functions from
util.hthat have been migrated toedm4eic/analysis_utils.hor have no active callers:momenta_from_trackingedm4eic::momenta(tracks, mass)— also was a verbatim duplicate already in edm4eicmomenta_RCedm4eic::momenta(ReconstructedParticleData)momenta_from_simulationedm4eic::momenta(MCParticleData)mom,pt,phi,eta(batch)edm4hep/utils/kinematics.hAlso removes now-unnecessary
#includes (edm4hep/edm4eic headers, TF1/TFitResult, algorithm, limits).Retained:
get_pdg_mass,unknown_particle_error,find_decay_pair.Depends on: eic/EDM4eic#166 — the new
edm4eic::momenta()overloads must be available before this lands.