SetBit(TH2::kCanRebin) and hadd

Hi,

I create the histogram and apply kCanRebin like that,

Correle =fs->make<TH2D>("Correle","Correle",1000,-0.1,0.1,1000,-0.1,0.1); Correle->SetBit(TH2::kCanRebin);

And then When I try to merge two histograms;

I see the below error. Is there way to merge the histograms when we use kCanRebin ?

[color=red]Target file: bnry.root
Source file 1: Histo-BeamHalo-62232_1.root
Source file 2: Histo-BeamHalo-62232_16.root
Target path: bnry.root:/
Found subdirectory myanalysis
Target path: bnry.root:/myanalysis
Error in TH2D::Merge: Cannot merge histograms - limits are inconsistent:
first: (1000, -8.294200, 17.305800), second: (1000, -4.096000, 21.504000)
…[/color]

Thanks

I attach the two files. Please have a look at them.

s.
Histo-BeamHalo-62232_16.root (442 KB)
Histo-BeamHalo-62232_1.root (485 KB)
Histo-BeamHalo-62232_1.root (485 KB)

hadd refues to merge because it does not know how to merge histograms with inconsistent binning.

Rene