Skip to content

refactor: remove migrated momentum functions and dead batch helpers from util.h#5

Open
wdconinc wants to merge 1 commit intomainfrom
trim-util-h
Open

refactor: remove migrated momentum functions and dead batch helpers from util.h#5
wdconinc wants to merge 1 commit intomainfrom
trim-util-h

Conversation

@wdconinc
Copy link
Copy Markdown
Contributor

@wdconinc wdconinc commented Apr 27, 2026

Summary

Remove functions from util.h that have been migrated to edm4eic/analysis_utils.h or have no active callers:

Removed Replaced by
momenta_from_tracking edm4eic::momenta(tracks, mass) — also was a verbatim duplicate already in edm4eic
momenta_RC edm4eic::momenta(ReconstructedParticleData)
momenta_from_simulation edm4eic::momenta(MCParticleData)
mom, pt, phi, eta (batch) No active callers; single-particle equivalents in edm4hep/utils/kinematics.h

Also 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.

Copy link
Copy Markdown

Copilot AI left a comment

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

Comment thread include/common_bench/util.h
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants