Hi Lorenzo,
This solution looks promising (and efficient), do you need to pass a variable here? i.e. “par” in the definition
I didn’t manage to run it
In the meantime I figured out a way by basically converting TF1’s to TH1’s then add the histograms:
for iev in chain1:
Gaus_i.Clear()
Gaus_i = ROOT.TF1(“Gaus_i”,“gaus”,100, 200)
Gaus_i.SetParameters(1., iev.mean, iev.sigma)
Hist_i = Gaus_i.GetHistogram()
Hist_tot.Add(Hist_i, iev.weight)
And this works, however on the edges of the histogram, peaks are appearing, which is due to accumulating events that doesn’t fall out the range. Any idea how to fix that?