Branch selection


Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided


Hello,I wonder if there is a way to apply a certain selection to a branch.For example,px>0 for the branch px and then create a new branch containing all px bigger than zero inside the same tree.

Hi @zhaowei,

Actually, RDataFrame seems ideal for that task! Check the manual’s page Dataframes - ROOT.

What you want is called Filter(). In principle, you don’t need to create a new column as the resulting dataframe only has the filtered entries.

Cheers,
J.

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