Skip to content

feat: animate pileup interactions sequenced by timestamp (#235)#862

Closed
deveshbervar wants to merge 1 commit into
HSF:mainfrom
deveshbervar:feat/pileup-animation
Closed

feat: animate pileup interactions sequenced by timestamp (#235)#862
deveshbervar wants to merge 1 commit into
HSF:mainfrom
deveshbervar:feat/pileup-animation

Conversation

@deveshbervar

Copy link
Copy Markdown
Collaborator

Closes #235

What this adds

Animates multiple pp interactions (pileup) from a single bunch crossing,
sequenced in time order using the timestamp stored on each interaction.
This is the foundational feature needed for HL-LHC precision-timing
detector visualisation in ATLAS and CMS.

Demo

Recording.2026-03-28.143749.mp4

How it works

  • Added PileupInteraction type with timestamp (ps), vertex (x,y,z), tracks and jets
  • Added PileupEvent type containing an array of interactions
  • animatePileup() sorts interactions by timestamp and maps each to a
    proportional delay, firing a vertex flash at the exact (x,y,z) position
  • _animateInteractionTracks() handles per-interaction track animation
    when real tagged track data is provided
  • New "Animate pileup" button added to the toolbar

Testing

  • All 179 existing tests passing, 0 failures
  • Tested on ATLAS sample: 10 sequential vertex flashes visible along
    beam axis, each clearly separated by ~1 second

Next steps for real HL-LHC data

Replace synthetic test data in animate-event.component.ts with real
JSON matching the PileupEvent format:

{
  "interactions": [
    { "timestamp": 0,  "vertex": {"x":0,"y":0,"z":-45}, "tracks":[] },
    { "timestamp": 32, "vertex": {"x":0,"y":0,"z": 12}, "tracks":[] }
  ]
}

- Add PileupInteraction and PileupEvent types to event-data.ts
- Add animatePileup() to AnimationsManager with timestamp-based sequencing
- Each interaction fires a vertex flash at its specific (x,y,z) position
- Add _animateInteractionTracks() for real per-interaction track animation
- Expose animatePileup() through ThreeManager and EventDisplay public API
- Add Animate pileup button to animate-event UI component

All 179 existing tests passing. Tested on ATLAS sample: 10 sequential
vertex flashes visible along beam axis, each separated by ~1 second.
@EdwardMoyse

Copy link
Copy Markdown
Member

Sorry for taking so long to get back to you on this - I really wasn't quite sure what to say. Unfortunately I really think we should just close this PR - from the animation I can see that this is just fundamentally incorrect ... the pileup should be overlapping not played one after another. This is just not what is happening in reality. But I don't have time right now to try to work out if there is a correct way to do this - I suspect the timing differences from the different pileup will be imperceptible anyway.

@deveshbervar
deveshbervar deleted the feat/pileup-animation branch July 25, 2026 15:49
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.

Animate pileup interactions?

2 participants