User defined formula in Draw() ??

Daniel Barna (barnad@rmki.kfki.hu)
Tue, 6 Apr 1999 15:04:49 +0200


Hi Rooters,
It would be nice to be able to use user defined functions in the Draw
function of a tree/ntuple as well, not only in fits or in the
constructors of other functions. Is it possible already? I failed to
run the following (stupid) code.

TNtuple ntuple("ntuple","ntuple","x:y:z");
// fill ntuple here
TF1 my_func("my_func","x*x");
TF2 my_selection("my_selection","x+y");
ntuple.Draw("my_func(x):x","my_selection(x,y)>0");

Thanks
Daniel