Find closest value in a column of a TNtuple?

Hi,
I’m afraid RDF does not have an algorithm for that, it’s a very specific usecase :smiley:

Loading your data into memory (e.g. in C++ vectors of vectors, or maybe better in a vector<Triplet> using a simple custom Triplet struct) is a perfectly valid way to proceed, unless you expect the total amount of triplets to exceed what you can store in RAM.

Cheers,
Enrico