Averaging histograms

Hello,
I am trying to find a way to average multiple (~40) histograms and display error bars. Are there any convenient ways of doing this? Thanks.

-Eric Grashorn

Simply enable error calculation

h[i]->Sumw2()

before filling histos

and then add them up in a loop

h[0] = h[0] + h[i]; for i=1, i<N

and scale by

h[0]->Scale(1.0/N), where N is number of histos.

1 Like