Skip to content

feat: add eta-phi energy map panel#876

Open
rx18-eng wants to merge 1 commit intoHSF:mainfrom
rx18-eng:feat/eta-phi-map
Open

feat: add eta-phi energy map panel#876
rx18-eng wants to merge 1 commit intoHSF:mainfrom
rx18-eng:feat/eta-phi-map

Conversation

@rx18-eng
Copy link
Copy Markdown
Collaborator

@rx18-eng rx18-eng commented Apr 8, 2026

Body

Adds an interactive eta-phi energy heatmap panel to the UI menu.

Bins calorimeter energy (CaloCells + CaloClusters) into a 100x63 grid over eta [-5, 5] and phi [-pi, pi], and renders it on a Canvas 2D surface with a sequential warm colormap (blue to red to white).

What it does:

  • Heatmap of calorimeter energy deposits in eta-phi space
  • Overlay markers for Jets (cone ellipses), Muons, Electrons, Photons, Tracks (dots), and MET (arrow)
  • Hover tooltips showing energy in GeV, eta, phi for each bin, or the object label for markers
  • Clicking a marker highlights and zooms to that object in the 3D view
  • Log/linear scale toggle for the color mapping
  • Overlays on/off toggle
  • Color bar showing the energy scale
  • Auto-rebuilds when switching events

The config (EtaPhiConfig) is generic and not hardcoded to ATLAS. Other experiments can pass different eta/phi ranges and bin counts. Tracks derive eta/phi from dparams when direct fields aren't available.

Used native canvas event listeners instead of Angular template bindings because CDK overlay portals don't play well with Angular's change detection for rapid mouse events. Tooltip is drawn directly on the canvas for the same reason.

Follows the same CDK Overlay + ComponentPortal pattern as the other panels (collections-info, geometry-browser, etc).

Recording.2026-04-08.231911.mp4

Signed-off-by: rx18-eng <remopanda78@gmail.com>
@rx18-eng
Copy link
Copy Markdown
Collaborator Author

rx18-eng commented Apr 8, 2026

@sponce @EdwardMoyse please let me know your thoughts on this !

@EdwardMoyse
Copy link
Copy Markdown
Collaborator

Wow. This is very cool ... please bear with me though, I've had a quick play with it and I love the concept, but it will take me a little while to review it. I'm a bit puzzled why clusters appear and disappear if I turn log scale off/on for example, but I need to really read the code properly to be able to comment.

@rx18-eng
Copy link
Copy Markdown
Collaborator Author

thanks for checking it out!

the clusters aren't actually disappearing, its a dynamic range thing. calorimeter energies can span 3-4 orders of magnitude, so on linear scale the low energy cells end up with colors that are basically the same as the dark background. log scale compresses that range which is why everything becomes visible again when you toggle it back.

that's why log is the default (its the standard for lego plots). but I can see how it'd be confusing for students if things seem to vanish when they flip that toggle. I could add a minimum brightness floor so even the coldest cells stay faintly visible on linear, if you think that'd help?

take your time with the full review, happy to address everything together.

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