If I rebin once more, the integral value does not change anymore.
Moreover, if I do
gStyle->SetOptStat(1001111);
tcalib->Draw("E1>>h(100,800,900)");
h->Integral()
(const Double_t)3.86838000000000000e+05
h->Rebin(2)
h->Integral()
(const Double_t)3.86838000000000000e+05
The integral value is not modified if I use Rebin() function via the command line. But if I rebin using the editor, the integral is modified. Do you have any explanation?
I tried with ROOT 5.28.00b and 5.34.10 and I get the same behaviour.
Thanks in advance
I succeed to generate a smaller ROOT file which reproduces the problem. I attached it.
So, if you type
root testTree.root
gStyle->SetOptStat(1001111);
tcalib->Draw("E1>>h(100,800,900)");
cout << h->Integral() << endl;
you will get 258746. After, if you Rebin using the graphical tools (Editor) like described in my first post, the integral will be 50854… testTree.root (1.89 MB)
[quote=“couet”]That’s not really my field of expertise but I think you need the option “width”:
cout << h->Integral("width") << endl;
[/quote]
Hmmm, the integral value is still modified after a “graphical” rebinning.
First, I get 258746 and after the rebinning, I get 25427.
This problem is explained in sft.its.cern.ch/jira/browse/ROOT-5900
A simple solution is to call TTree::SetEstimate with a larger value (larger than the histogram entries)