Find out TCut output for a single TTree entry?


I’ve been trying to use a TCut to select events on a Tree. Getting a plot out of it is easy with the Draw method, but what I need to do is figure out if an event passed a cut or not event by event. I would really like to avoid using MakeClass and loading all Branches I need.

I’ve tried to create an event list, but from there is not clear to me how to loop over only the event that passed the cut and are on the list.

Currently the only way I can think of doing this is using the Draw method for each event on the Tree:

hasPassed = tree.Draw("",TCut, " ", event,event+1)

But maybe there is a smarter way of doing this… Any help is welcome!

As said here you should use SetEventList().

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.