Skip to content

bug: applied cuts are lost on every event switch — Cut state is never persisted or re-applied after buildEventDataFromJSON() #863

@deveshbervar

Description

@deveshbervar

Summary

Applied cuts (e.g. η < 0.5 on Tracks) are silently lost on every event
switch. The new event renders all objects visible, ignoring active filters.
The same bug affects Save/Load State — cut values are never serialized.

Root Cause

buildEventDataFromJSON() destroys and recreates all 3D objects on every
event switch:

this.graphicsLibrary.clearEventData();  // all objects destroyed
this.configuration.eventDataLoader.buildEventData(...);  // recreated, all visible=true

No code path re-applies active cuts after rebuild. The Cut objects
(storing minValue, maxValue) live only in Angular component local state
— never stored by any manager, never queried after buildEventData().

StateManager.getStateAsJSON() serializes only camera position and clipping
angles — zero cut data. Confirmed: searching the entire codebase for
storedCuts, activeCuts, cutValues returns no results.

Reproduction

  1. ATLAS demo → Tracks_ → Cut Options → set η max to 0.5
  2. Observe tracks reduce to central region only
  3. Switch to next event
  4. All tracks reappear — cut silently lost

Live Screenshots

BEFORE (η < 0.5 applied, tracks filtered):

Image

AFTER (next event loaded, all tracks back, cut ignored):

Image

Impact

Every physicist browsing events with active filters must manually
re-apply cuts after every event switch. Affects ATLAS, LHCb, FCC,
Belle II, TrackML — all use the same code path.

Proposed Fix

  1. After buildEventData() completes, re-apply active cuts by calling
    collectionFilter() for each collection with active cuts
  2. Add toJSON()/fromJSON() to the Cut class and include cut state
    in StateManager.getStateAsJSON()

Files

  • cut.model.ts — Cut class (no serialization)
  • scene-manager.ts:290collectionFilter()
  • event-display.ts:168buildEventDataFromJSON()
  • state-manager.ts:82getStateAsJSON()

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions