Hi,
I am puzzled with the following (6.10.02, on Ubuntu 16.04)
root [0] TH1D *hhh = new TH1D("hhh", "hhh", 50, 0,100);
root [1] hhh->Sumw2(kTRUE); // should be default
root [2] hhh->Fill(22., 20)
(int) 12
root [3] hhh->GetBinContent(12)
(double) 20.000000
root [4] hhh->GetBinError(12)
(double) 20.000000
With root5 I get as expected hhh->GetBinError(12) = sqrt(20)
or do I miss something?
Cheers
Otto
couet
2
Hi Otto,
with ROOt 6 (master) i get:
root [4] TH1D *hhh = new TH1D("hhh", "hhh", 50, 0,100);
root [5] hhh->Sumw2(kTRUE); // should be default
root [6] hhh->Fill(22., 20)
(int) 12
root [7] hhh->GetBinContent(12)
(double) 20.000000
root [8] hhh->GetBinError(12)
(double) 20.000000
With ROOT 5 I get:
root [0] TH1D *hhh = new TH1D("hhh", "hhh", 50, 0,100);
root [1] hhh->Sumw2(kTRUE); // should be default
root [2] hhh->Fill(22., 20)
(Int_t)12
root [3] hhh->GetBinContent(12)
(const Double_t)2.00000000000000000e+01
root [4] hhh->GetBinError(12)
(const Double_t)2.00000000000000000e+01
root [5]
So except the output format it looks the same values.
Oliiver
Here is what I get with root5:
root [0] gROOT->GetVersion()
(const char* 0x7f422428ee31)"5.34/36"
root [1] gROOT->GetVersionTime()
(const Int_t)1024
root [2] gROOT->GetVersionDate()
(const Int_t)20160405
root [3] TH1D *hhh = new TH1D("hhh", "hhh", 50, 0,100);
root [4] hhh->Fill(22., 20)
(Int_t)12
root [5] hhh->GetBinError(12)
(const Double_t)4.47213595499957961e+00
root [6]
Otto
couet
4
I ran root 5.34/37 may be a change was done in ROOT 6 and back port to ROOT 5.
I think @moneta should know.
Hi,
from a previous post a learned that this default since ROOT 5.99
Otto
system
Closed
6
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.