*ROOT Version:* 6.06/01

*Platform:* Ubuntu 16.04

*Compiler:* gcc530

Hello, root experts.

I have a question for usage of Sumw2 function in my situation.

At the moment, I am filling my histogram in given way

```
sample ='ZH_HToSSTobbbb_ZToLL_MH-125_MS-15_ctauS-10 & 5'
h16 = TH1F("Decaydist",'%s Decaydist' % sample,100, 0, 100)
h16w = TH1F("Decaydistw",'%s Decaydistw' % sample,100, 0, 100)
h16w.Sumw2()
h16s = TH1F("ctauEventWeight",'%s ctauEventWeight' % sample,80, 0, 4)
DY16dir=glob.glob('path/0000/*')
for i in range (7):
filename = DY16dir[i]
_file0 = TFile.Open(filename,'read')
mytree16 = _file0.Get("lldjNtuple/EventTree")
for entry in mytree16:
ctau = mytree16.ctauEventWeight
h16s.Fill(ctau[0],1)
#print(ctau[0])
Decaydist=mytree16.AODnVtx
h16.Fill(Decaydist,1)
h16w.Fill(Decaydist,ctau[0])
```

As you can see, h16w hist is weighted with ctau[0] with predefined condition of h16w.Sumw2()

At the end, the plot looks like

Technically, the integral of the red(h16) and the blue(h16w) should be equal to each other, but differ a little bit in my case.

I want to prove that the discrepancy in integral is OK because the difference is within the error range of the integral of the Weighted (blue, h16w) histogram".

How can I get the error range in the integral of the blue histogram, using the Sumw2?

Do you have any good idea?

Thank you.

Trentacoollime