I have a root file with multiple trees inside.
I want to Snapshot it after I filter some events out.
But I get only filtered main tree in the output, losing filtering of Friend trees.
Codewise what I want looks:
import ROOT ch1 = ROOT.TChain("tree1") ch1.Add("files*.root") ch1.AddFriend("tr2 = tree2", "files*.root") ch1.AddFriend("tr3 = tree3", "files*.root") ROOT.RDataFrame(ch1).Filter("a >-42 && tr2.b < 42").Snapshot("new_tree", "new_file.root")
And I want to get also skimmed friend trees variables.
Is there a clean way to do it?
Or swaping places the chains and running the same code
Nfriend_tree times and merging them in the end is the only solution?
ROOT Version: 6.22/00