Fitting Multiple Histograms With Same Function

I have not been able to find anything on this specific topic, so if I missed an appropriate resource, let me know.

My goal is to take a .root file and apply a Gaussian to 16 histograms that result, and output the mean and sigma values for each histogram fit. I can do it for each individual histogram, but 16 times however many runs I have to perform has gotten to be too many. I feel like there is a simple solution, but I haven’t been able to figure it out. Any guidance would be greatly appreciated.


ROOT Version 6.12/06:
Linux 3.2.0-23


Hi,

I am not sure I have understood what you are looking for. If you want to fit the histogram individually, so with different parameters for each histogram, you would need to perform a loop on the histograms and fit each one of them. This is rather easy to implement.
Instead if you need to apply a global fit with common parameters shared between the histograms, it is more complicated, but it is basically as merging the histogram.

Lorenzo

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.