TF1 saving

From: Jakub Čermák <jakub_at_jcermak.cz>
Date: Fri, 29 Jan 2010 18:21:15 +0100


Hi Rooters,
I’ve lots of histograms with fitted functions, so started to care about size of fitted functions (in the TFile) and speed of fitting. When I use predefined function to fit, like gaus, the fitting is quick and resulting TFile is relatively small. But I need to fit with more complex function, so I tried standard C function. The fitting was still quick, but the resulting TFile is now much bigger. Is it because it doesn’t store the formula with params but directly the values of the function, right? So it’s not a good solution for me. So I rewrote the C function to string formula and I expected that it would store just the formula and params, not „sampled“ function values. But I was wrong, the file was as big as when I used C function. And the fitting process was considerably slower than previous approaches. So that’s my question – what’s the best solution to store histograms fitted with custom function and keep the result file small and fitting process quick?

It's quite big issue for me, because there are few hundred of thousands fitted histograms.

The fitting function is [0]*TMath::Gaus(max(min([3], [1]), x), [1], [2])

Thanks in advance for good ideas :)

Best regards

Jakub Čermák Received on Fri Jan 29 2010 - 18:21:34 CET

This archive was generated by hypermail 2.2.0 : Sun Jan 31 2010 - 11:50:01 CET