Fit a derived variable

I’d like to import my data (both backgrounds that I use to construct the model as well as data to fit) from TTrees. However the actual variable I’d like to fit would be a derived variable based on a field. In the current case the tree contains particle eta as a signed variable ranging from -5 to 5. However for the fit I’d like to fit |eta| in range 0…5 instead.

Is there any reasonable way to do this during the dataset import? When I try a simple:

eta_lj = RooRealVar(“eta_lj”,“Eta of light jet”,-5,5)
eta_lj_abs = RooFormulaVar(“eta_lj_abs”,"|eta_lj|",“fabs(eta_lj)”,RooArgList(eta_lj))
ds[‘data’]=RooDataSet(“data”,“actual data”,t[‘data’],argSet,cutstring)
ds[‘data’].addColumn(eta_lj_abs)

Then I can import the dataset with this added variable, but how do I perform fitting and plotting? A simple issue is already this:

fr=eta_lj_abs.frame()
Traceback (most recent call last):
File “”, line 1, in
AttributeError: ‘RooFormulaVar’ object has no attribute ‘frame’

So how do I get the frame to which later on plot the model and data?