1 of 16

RNTuples in

1

Andres Rios-Tascon

Andres Rios-Tascon

RNTuples in Scikit-HEP — PyHEP.dev 2025

2 of 16

TTrees are dead, long live RNTuples!

  • RNTuple is the new serialization format that will replace TTree.
  • It is much more modern, offers performance and storage improvements, and has a formal specification.
  • At the beginning of the year, the first stable version of the binary format was released. Now we can confidently write data with it, knowing it will continue to work in the future.

2

Andres Rios-Tascon

RNTuples in Scikit-HEP — PyHEP.dev 2025

3 of 16

Supporting RNTuples in Scikit-HEP

  • We have officially entered the transition period to RNTuples.
  • We need to stay on top of things to ensure a smooth transition and make sure everything works by the time experiments finalize the transition.
  • If everything goes as planned, Scikit-HEP will be even more useful than before due to better support than TTree.

3

Andres Rios-Tascon

RNTuples in Scikit-HEP — PyHEP.dev 2025

4 of 16

Projects in Scikit-HEP that could/will use RNTuples

4

Work not yet started, but (hopefully) relatively straightforward.

Work not yet started, but probably relatively straightforward.

Started looking into it. We’ll probably have to wait for dust to settle on CMS and ATLAS.

RNTuple support already pretty solid. The most important one since it’s the entry point for the other packages. Will discuss in more detail.

Andres Rios-Tascon

RNTuples in Scikit-HEP — PyHEP.dev 2025

5 of 16

RNTuples in Uproot

  • Work started a long time ago by Jerry Ling (but then moved to UnROOT.jl).
  • I continued Jerry’s work a bit over a year ago.
  • Current support is in pretty good shape. 100% of the specification can be read (as far as I know*). Most of the relevant part of the specification can be written.

5

Andres Rios-Tascon

RNTuples in Scikit-HEP — PyHEP.dev 2025

6 of 16

Working with RNTuples in Uproot

  • We have been ensuring to keep the interface as close as possible to ensure transition.
  • Hopefully, users won’t even realize anything changed (or see it got better).

6

Andres Rios-Tascon

RNTuples in Scikit-HEP — PyHEP.dev 2025

7 of 16

Things left for RNTuple support in Uproot

  • The only “main” missing feature is expression support.
  • I’ve been postponing it since it adds a lot of complexity, but I’ll confirm that people want it and start working on it.
  • Need to do some benchmarking and profiling to make sure it’s working efficiently. For now I was mostly focused on getting things working.
  • Some more minor or uncommon features are missing.

7

Andres Rios-Tascon

RNTuples in Scikit-HEP — PyHEP.dev 2025

8 of 16

Tracking RNTuple support in Uproot

  • Issue scikit-hep/uproot#1382 tracks RNTuple support.

8

Andres Rios-Tascon

RNTuples in Scikit-HEP — PyHEP.dev 2025

9 of 16

External factors that affect us

On the CMS side:

  • I don’t know all the details, but as far as I can tell the new RNTuples are not ideal, since (I think) they are making heavy use of unsplit types.
  • The NanoAOD RNTuples you can produce are… nonexistent.
  • The NanoAOD part (which is the one relevant for Scikit-HEP) has been stalled for a while and is completely broken.
  • It’s not all bad news, as there is still time to improve NanoAODs before the format is fixed.

9

Andres Rios-Tascon

RNTuples in Scikit-HEP — PyHEP.dev 2025

10 of 16

Improving NanoAOD

  • The RNTuple format gives us the opportunity to organize things better.
  • Arrays describing objects can be grouped into an array of structures. Flags can be grouped into structs.
  • I’d propose something like this:

Electron_pt (array[f32])

Electron_eta (array[f32])

Electron_phi(array[f32])

Electron (array[{pt (f32), eta (f32), phi (f32), …}])

HLT_AK8PFJet140 (bool)

HLT_AK8PFJet200 (bool)

HLT_AK8PFJet220_SoftDropMass40 (bool)

HLT ({HLT_AK8PFJet140 (bool), HLT_AK8PFJet200 (bool), …}]

(possibly with substructs to group things further)

10

Andres Rios-Tascon

RNTuples in Scikit-HEP — PyHEP.dev 2025

11 of 16

I’m working towards this, but could use some help

  • Already have the NanoAOD output module working with the arrays of structs.
  • Still waiting to discuss grouping flags.
  • CMSSW review is really slow.

11

Andres Rios-Tascon

RNTuples in Scikit-HEP — PyHEP.dev 2025

12 of 16

External factors that affect us

On the ATLAS side:

12

I know very little.

Please talk to me!

No clue about ALICE or LHCb.

Andres Rios-Tascon

RNTuples in Scikit-HEP — PyHEP.dev 2025

13 of 16

Plan for TTree support

13

"The reports of my death have been greatly exaggerated"

- TTree

TTree

Jim’s plan (which I agree with) was to freeze development for TTree and only move forward with RNTuple. TTree support in Uproot is far from complete, but still very good. We’ll need to think when we should make this shift official.

Andres Rios-Tascon

RNTuples in Scikit-HEP — PyHEP.dev 2025

14 of 16

Moving to RNTuple by default

14

We’re planning to introduce a warning telling people that in ~6 months this will write an RNTuple instead of a TTree.

Andres Rios-Tascon

RNTuples in Scikit-HEP — PyHEP.dev 2025

15 of 16

Summary

  • We’ve started the transition from TTree to RNTuple.
  • Uproot already has good support, but work needs to continue to ensure a smooth transition.
  • Other packages will also need some work (especially Coffea).
  • On the CMS side, the NanoAOD RNTuple is still not finalized, so we need to make sure that it is good.

15

Andres Rios-Tascon

RNTuples in Scikit-HEP — PyHEP.dev 2025

16 of 16

Thank you!

16

Andres Rios-Tascon

RNTuples in Scikit-HEP — PyHEP.dev 2025