Ask: the square sum of weight when rebining Histogram

Dear experts,

As far as I understand, the square sum of weight information have been stored after calling Sumw2().
According some requirement, I need to copy histograms by setting its contents and errors bin by bin.
In such a case, the sumw2 information is lost. If I do rebin later on, the error I got is wrong.
Am I right?

If so, may I ask how should I do to preserve the sumw2 information to get a reasonable rebinned error?

Thank you in advance!

Cheers

Lei

Hi,
When you set the bin error in an histogram the sum of the square of the weights for the bin is set to the square of the bin error. So the information is not lost, it is just replaced with the new one provided by the user.
If you rebin the histogram, the sum of the square of the weights for the bin are taken into account

Best Regards

Lorenzo