Skip to content

feat: add PHYSLITE ROOT file loader for ATLAS Open Data (#823)#836

Merged
EdwardMoyse merged 1 commit intoHSF:mainfrom
rx18-eng:feat/physlite-loader-823
Mar 26, 2026
Merged

feat: add PHYSLITE ROOT file loader for ATLAS Open Data (#823)#836
EdwardMoyse merged 1 commit intoHSF:mainfrom
rx18-eng:feat/physlite-loader-823

Conversation

@rx18-eng
Copy link
Copy Markdown
Collaborator

Title: feat: add PHYSLITE ROOT file loader for ATLAS Open Data

Body:

Closes #823

Adds a loader for ATLAS DAOD_PHYSLITE ROOT files, allowing users to browse
real ATLAS Open Data directly in Phoenix via the IO options dialog.

What it does

Reads calibrated physics objects from .root files using jsroot's TSelector
API and converts them to Phoenix event format. Supports: Jets, Tracks (InDet,
Muon Spectrometer, Combined, Extrapolated, GSF), Electrons, Muons, Photons,
MET, Vertices, and Calorimeter Clusters.

The loader checks branch existence before reading, so it works with both real
data and MC files automatically.

Tested with

  • data15 minimum-bias (27 MB, 18,571 events) — MET, vertices, tracks load
    correctly
  • MC ttbar simulation (613 MB, 30,000 events) — ~19 jets, ~115 tracks per
    event, electrons, muons, photons all display correctly
  • No THREE.js NaN errors after guard fixes in phoenix-objects.ts

Files

  • loaders/physlite-loader.ts — new loader (reads CollectionTree, computes
    energy from pt/eta/phi/m)
  • loaders/objects/phoenix-objects.ts — NaN guards for track extrapolation
    and calorimeter geometry
  • index.ts — export
  • io-options-dialog.component.ts — PHYSLITE import option
  • event-data-import.tsPHYSLITE enum value
  • atlas.component.ts — enabled for ATLAS section
Recording.2026-03-16.225316.mp4

@rx18-eng
Copy link
Copy Markdown
Collaborator Author

Hey @EdwardMoyse @sponce , please let me know your thoughts on this

@deveshbervar
Copy link
Copy Markdown
Collaborator

Hi @EdwardMoyse,

I've been independently investigating issue #823 in parallel
and tested against the same PHYSLITE file from CERN Open Data
(DAOD_PHYSLITE.37001626._000001.pool.root.1, data15, 18,571 events).

I can confirm:

One issue I found while verifying branch names against
the actual file:

The loader expects AnalysisElectronsAuxDyn.pt and
AnalysisMuonsAuxDyn.pt but these branches do not exist
in the data15 file. What actually exists is:

  • AnalysisElectronsAux. (no AuxDyn sub-branches)
  • AnalysisMuonsAux. (no AuxDyn sub-branches)

This means Electrons and Muons will be silently skipped
for this file due to the branch existence check. The PR
description mentions testing with MC ttbar — it's possible
AuxDyn branches exist in MC but not in data15 real data files.

This might also be specific to the data15 file I tested
with — would be great to confirm against the MC file
used in testing.

Happy to help investigate further or test additional files.

@rx18-eng
Copy link
Copy Markdown
Collaborator Author

Hey, thanks for testing! This is actually already handled , the loader checks branch existence before adding anything to the TSelector, so collections like Electrons/Muons get skipped gracefully when their AuxDyn branches don't exist in the file.

You're right that the data15 file stores them as serialized blobs (AnalysisElectronsAux.) instead of flat AuxDyn branches. I ran into the same thing during development. The MC ttbar file does have the AuxDyn branches and
electrons/muons load fine there.

So it's working as intended , the loader adapts to whatever branches are available in the file.

@rx18-eng rx18-eng force-pushed the feat/physlite-loader-823 branch 2 times, most recently from 555d958 to dfaf376 Compare March 23, 2026 13:28
}

async handlePHYSLITEInput(files: FileList) {
if (!this.isFileOfExtension(files[0].name, 'root')) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (!this.isFileOfExtension(files[0].name, 'root')) {
if (!this.isFileOfExtension(files[0].name, 'root,root.1,pool.root,pool.root.1')) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a bunch of ways the postfix can be named... maybe extend the list to include them?

@EdwardMoyse
Copy link
Copy Markdown
Collaborator

This looks great - one minor suggestion to the accepted postfixes, and also maybe it would be good to improve the isFileOfExtension error to be more descriptive i.e.

-
-    console.error('Error: Invalid file format!');
-    this.eventDisplay.getInfoLogger().add('Invalid file format!', 'Error');
+   
+    console.error('Error: Invalid file format! Possibly the file name ',fileName, 'does not match the expected FILENAME.EXTENSION, where extension is one of', extensions);
+    this.eventDisplay.getInfoLogger().add('Invalid file format! Possibly the file name does not match the expected format?', 'Error');

This comes because I downloaded a file with the name DAOD_PHYSLITE.37001884._000001.pool.root.1 which could not be opened, because it has periods in the main name, and also because the extension was different.

@rx18-eng
Copy link
Copy Markdown
Collaborator Author

Thanks for your review ! . I will fix this soon !

Signed-off-by: rx18-eng <remopanda78@gmail.com>
@rx18-eng rx18-eng force-pushed the feat/physlite-loader-823 branch from dfaf376 to d9ff993 Compare March 26, 2026 10:08
@rx18-eng rx18-eng requested a review from EdwardMoyse March 26, 2026 10:09
@EdwardMoyse EdwardMoyse merged commit 8663064 into HSF:main Mar 26, 2026
2 checks passed
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.

Opendata improvements: support physlite

3 participants