Cumulative histogram fill

Greetings,

Has anyone ever thought of adding a feature to do a cumulative fill of a histogram? The reason I ask is because I notice that the “TH1::GetCumulative” function calculates the bin contents, but not the bin errors for the cumulative histogram. I understand this could be complicated if the bin contents are correlated, which will be the case a lot of the time.

Alternatively, what about a cumulative Fill method? Each invocation would add a weight not only to one bin, but to all bins to the left/right of the bin, depending on the direction chosen. It would be great if such a thing were implemented automatically in TTree::Draw as well. It’s not clear to me if the errors are correct in this case in the presence of correlations, but at least one doesn’t have to loop through the histogram a second time…

Thanks,
-Phil D.

3 Likes