Weight, GetBinError after scaling

for a TH2D “hist”, with

hist.SetBinContent(xbin, ybin, random)
error1= hist.GetBinError(xbin, ybin)

hist.Scale(1 / histi.Integral())
error2 = hist.GetBinError(xbin, ybin)

are error1 and error2 calculated in the same way after the scaling?

The documentation says
root.cern.ch/doc/master/classTH … 42c29fe021
"if the sum of squares of weights has been defined, this function returns the sqrt(sum of w2). otherwise it returns the sqrt(contents) for this bin."

can you define what “weights” are in the case of error1 and error2?

Try to create a “test” histogram and, instead of “random”, try 1 and see what you get afterwards, then repeat this exercise but this time with 2 or 4 (instead of “random”). This will give you an idea what is really happening.

Thank you!