Hello,
I am currently trying to write a python script using a RDataFrame in which I would like to create several columns from a user defined function with different arguments for each column as in :
rdf = rdf.Define('genDauInCone_02','''IsgenDauInCone(0.2,genLepton_daughters,HPStau_p4)''')
where rdf is my RDataFrame and ‘IsgenDauInCone’ is a C++ function defined with gInterpreter. Here 0.2 is the value I would like to vary but instead of writing as many lines as needed values I would like to write something like :
for dRmax in np.arange(0,1,0.1):
a = str(int(dRmax*10))
rdf=rdf.Define('genDauInCone_'+a,'''IsgenDauInCone(dRmax,genLepton_daughters,HPStau_p4)''')
but this gets me an error ‘dRmax’ undefined’. Is there a way to perform this ?
Thank you very much.
Mario
ROOT Version: 6.24/00
Platform: linuxx8664gcc