Statistical errors not propagated correctly

Hi,

I don’t think is a bug. As written in the documentation of the static function TH1::SetDefaultSumw2(),

root.cern.ch/doc/master/classTH … ed2ac153c2

[quote]all new histograms will automatically activate the storage of the sum of squares of errors
[/quote]

So this refers only for the new ones. You need to do :

TH1::SetDefaultSumw2(1);
TH1D *h=new TH1D("h","",10,0,10);

or using the non-static member function Sumw()

TH1D *h=new TH1D("h","",10,0,10);
h->Sumw2();

Then you will get the correct errors.
However, in my opinion, I think the scale by default should compute correctly the errors, independently if Sumw2 has been called or not. I’ll think about what is the best way to do this

Best Regards

Lorenzo