RDataFrame, if I want to make a histogram from a function of other columns, I have to
Define a new column first. It would be useful, for me anyway, if I could define a new column on the fly while calling, e.g.,
ROOT could define a column name based on the passed function, then create (if necessary) and refer to this column in the
For example, instead of:
In : df_defi = df.Define('pt_test', 'sqrt(X_PX*X_PX + X_PY*X_PY)') In : h_defi = df_defi.Histo1D('pt_test')
I would like to do:
In : h = df.Histo1D('sqrt(X_PX*X_PX + X_PY*X_PY)')
In the case of line 11,
ROOT would create a new column in the background (with some unique name), much as in line 9 above, before doing
Histo1D as normal. Any future calls of
'sqrt(X_PX*X_PX + X_PY*X_PY)' would refer to this same column (since the same name would be generated).
This would provide functionality similar to
additional thoughts below.