Skip to content

fix(masterclass): emit result-recorded mass in GeV (#1042) - #1043

Merged
EdwardMoyse merged 1 commit into
HSF:mainfrom
coder-Yash886:fix/masterclass-histogram-mass-units
Oct 9, 2026
Merged

EdwardMoyse merged 1 commit into
HSF:mainfrom
coder-Yash886:fix/masterclass-histogram-mass-units

Conversation

@coder-Yash886

Copy link
Copy Markdown
Contributor

Closes #1042

Summary

Fixes #1042 by ensuring the result-recorded event bus payload emits invariant mass values in GeV rather than MeV.

Problem

When recording an invariant mass result in the masterclass panel (e.g., ~91 GeV for a Z candidate), the component emitted result-recorded with mass: this.liveMass which is in MeV (~91187 MeV). The histogram panel subscribed to this event and added the raw value without unit conversion. Since all histogram configs (ATLAS_MASS_HISTOGRAM, J/ψ, wide configs) use GeV ranges (e.g., 20–120 GeV for Z), all recorded results were going to overflow, leaving the visible histogram plot empty.

Solution

  1. Emitter Conversion: Converted mass to GeV (result.mass / 1000) when emitting result-recorded in MasterclassPanelOverlayComponent.recordResult(). Internal state (massResults) remains in MeV for panel UI and export consistency.
  2. Event Bus Contract: Documented that result-recorded payload emits mass in GeV in event-display.ts.
  3. Testing: Added unit test in masterclass-panel-overlay.component.test.ts to verify result-recorded emits mass values converted to GeV.

Related Issues

@coder-Yash886

Copy link
Copy Markdown
Contributor Author

@EdwardMoyse Please review the pr when you have the free time

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

🚀 Preview deployed: http://phoenix-pr-1043.surge.sh

Built from 7870fcb.

@EdwardMoyse
EdwardMoyse merged commit c770587 into HSF:main Oct 9, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
pull-request — 7870fcbe Deployed Oct 9, 2026 by github-actions[bot]
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.

Masterclass results reach the histogram panel in MeV, but histogram ranges are in GeV

2 participants