Skip to content

feat: add in-browser histogram panel using jsroot (#840)#843

Open
rx18-eng wants to merge 1 commit intoHSF:mainfrom
rx18-eng:feat/histogram-panel-840
Open

feat: add in-browser histogram panel using jsroot (#840)#843
rx18-eng wants to merge 1 commit intoHSF:mainfrom
rx18-eng:feat/histogram-panel-840

Conversation

@rx18-eng
Copy link

Summary

Adds a histogram panel to the toolbar that shows invariant mass distributions live using jsroot. this is for the masterclass workflow (#840) - students tag particles, compute mass values, and the histogram fills up in real time so
they can actually see the physics (Z peak at 91 GeV etc).

uses the event bus (on/emit) i added to EventDisplay so the histogram subscribes to result-recorded events. config is experiment-agnostic ATLAS default included with reference lines for J/ψ, Z, and H.

Features Implemented:

  • event bus on EventDisplay (on/emit + cleanup)
  • HistogramConfig interface + ATLAS default config
  • histogram panel components (CDK overlay pattern, same as collections-info)
  • jsroot dark theme integration (gStyle + post-draw DOM fixes)
  • reference hint lines aligned to jsroot pad margins
  • reset + CSV export

Test Plan

  • open /atlas, click histogram icon in toolbar
  • run in console: window.EventDisplay.emit('result-recorded', {mass: 91.2})
  • add more events, bars should cluster around Z peak
  • test reset and export buttons

I have also uploaded a video of the same below with random 100 events:

Recording.2026-03-21.233005.mp4

closes #840

Signed-off-by: Jyotiraditya Patel <jyotiraditya.dev@gmail.com>
@rx18-eng
Copy link
Author

rx18-eng commented Mar 21, 2026

hey @sponce @EdwardMoyse , this adds the histogram panel from #840. @cohm mentioned he wants to test this with students in Stockholm on Monday so it would be great if you could take a quick look before then. happy to make changes if anything needs fixing!

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.

Add histogram panel for masterclass invariant mass results

1 participant