[ROOT] bug (?) using sumw2, TH2D and COLZ

From: Sylvie Brunet (brunet@slac.stanford.edu)
Date: Sat Dec 04 2004 - 00:17:47 MET


Hi,

I try to plot a 2D histogram using the COLZ option.
If I use at the sametime the option sumw2 for my histogram, the resulting
plot has not the right scale (i.e. the color of one bin doesn't
represent the number of entries in that bin.) If I try histo->GetSum()
however, I get the right numbers.

If I don't use sumw2, all is ok.

I'm using version 3.05/05

----

To reproduce the feature:
-------------------------

gStyle->SetPalette(1)
gStyle->SetOptStat(0)
TH2D *TH2b0 = new TH2D("TH2b0","Double tags MC B0B0bar",50,1.73,2.0,50,1.73,2.0);
TH2b0->Sumw2()
TH2b0->Fill(1.9, 1.8)
TH2b0->Draw("COLZ")

You'll see that the entry reprent less than one (= 0.5 ?) according to the
color scale.

GetSum is ok however:

root [10] TH2b0->GetSum()
(const Stat_t)1.00000000000000000e+00

(if you don't put the TH2b0->Sumw2() line all will be ok)

Is that understood?

Thanks,

Sylvie



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:10 MET