Add branches to TTree for a file opened with RDataFrame

So I opened my file using RDataFrame because I found it easier to access the data in the branches and use the data for analysis, but I want to add some branches to my dataset for which I need the tree in the dataset as a TTree object which is not stored by RDataFrame. How to go about this?

Just to give some background to my problem, I am trying to set a cut on a variable in my root file and draw the histogram for another variable. TCut method is used for TTree objects hence I want to add some new branches to my tree and then apply the cuts.

Thanks in advance for the help.

Check out the DataFrame tutorials; in particular, df007_snapshot.C (or .py) is probably what you want.

Thanks for the reply. I figured it out. So I opened my root file using TFile which would give me access to the tree and then I converted the Tree into a RDataFrame.