Is there an easy way to grab the entry numbers from a tree after applying a cut? For example, if I have a tree with branches:
and I want to know the tree entry number corresponding to trignum = 20453. I could just loop over entries until I find this value, but my trees are very very large, and this would be too time consuming.
see class TEventList or TEntryList
The simplest is to create a TEntryList during the application of the cut:
root  ntuple->Draw(">>elist","px>3.0","entrylist")
root  elist->Print("all")
Does this solution also work for a TChain?
Ah, this seems to work with “eventlist” as opposed to “entrylist.”