Drawing from a function

Hi,

I have a tree containing TF1’s which are the result of fits. I had hoped to be able to easily draw fit parameters doing (eg)

tree->Draw(“TF1Object->GetParameters()[0]”)

but it doesn’t work - perhaps I cannot access a function in this way from a tree draw/scan command?

Is there a better way to store and access a large number of fits?

thanks
Peter

Hi,

Write a small script:// File script.C double script() { return TF1Object->GetParameters()[0]; }and the header file:// File script.h #include "TF1.h"and use:tree->Draw("script.C");

Cheers,
Philippe.

PS. Also you might be able to use: tree->Draw("TF1Object->GetParameter(0)")