Make a Tree cut using user-defined function

Hello,

To clarify what I need, I’ll illustrate through the following example:

I have a tree that has two Branches: x and y.
I would like to select the events where y is less than func(x)
I prefer to do it in .C macro program, is it possible to have the command below or similar ?

tree->Draw(“y:x”,“y<func(x)”);

Regards,
hicho

Hi,

Yes. You need to make sure to load into CINT either the definition (if you want it to be interpreted) or the library and dictionary for your function.

Cheers,
Philippe.