Skip to content

fix(event-display): extrapolate tracks with zero q/p as straight lines - #1073

Open
G26karthik wants to merge 1 commit into
HSF:mainfrom
G26karthik:fix-extrapolate-straight-track
Open

G26karthik wants to merge 1 commit into
HSF:mainfrom
G26karthik:fix-extrapolate-straight-track

Conversation

@G26karthik

Copy link
Copy Markdown
Contributor

extrapolateTrackPositions built its start direction from a vector of length p, and p is Number.MAX_VALUE when q/p is 0. The vector overflowed, so the direction came out as zero or NaN and a straight track from dparams collapsed to a single point or was dropped. For example, Muons and Electrons loaded without LinkedTracks or a pdgId get q = 0 in phoenix-loader.ts, so they were not drawn.

The direction now comes from a unit vector, the same change #1060 made in extrapolateFromLastPosition. Tracks with q/p other than 0 give the same points as before.

Testing

jest --config configs/jest.conf.js src/tests/helpers/rk-helper.test.ts

  • Before: 2 of the 8 tests fail (the straight-track cases).
  • After: all 8 pass. The existing q/p = 0 test expected the collapsed [0, 0, 0] points; it now expects a straight line along the start direction.

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

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

Built from e4d410f.

extrapolateTrackPositions built its start direction from a vector of
length p, and p is Number.MAX_VALUE when qop is 0. The vector
overflowed, so the direction came out as zero or NaN and the track
collapsed to a point or was dropped. Build it from a unit vector, as
was done for extrapolateFromLastPosition in HSF#1060.

This branch was successfully deployed

1 active deployment
pull-request — e4d410f7 Deployed Nov 12, 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.

1 participant