I want to include weights (different than 1) in my histograms thus incrementing the bins but I don’t want the sum of the weights squared to be stored. What I understood from the tutorials is that I need to loop over all bins, get bin content using Double_t binContent = h->GetBinContent(bin), then setting the bit h->SetBit(TH1::kIsNotW). This sounds a bit tedious. Is there a better or easier way to do this, given that I have a lot of histograms to plot?
Thanks in advance.
After filling your histogram with weights, try:
SomeHistogram->ResetStats();
BTW. I don’t understand what the “sum of the weights squared” has to do with “plotting” of your histograms (maybe you are looking for the “HIST” drawing option).
I just wanted the weights to be stored but not the sum of the squares of the weights. Pretty much like ROOT 5 used to do.
Axel’s suggestion works for me.
Thanks for the reply.