Hi all, having some issue with histogram adding. I keep getting the following error:
Info in <TH1D::Add>: Attempt to add histograms with different axis limits - trying to use TH1::Merge
Error in <Merge>: Cannot merge histograms - limits are inconsistent:
first: SiPM_A_OR_D (100, 0.000000, 1.022260), second: SiPM_A_OR_D (100, 0.000000, 1.022260)
I assume one is actually 1.022260001 and the other is 1.022260002 or something. These are time stamps from our detector system and don’t always match up perfectly. Otherwise the histogram is identical. 100 bins, roughly the same range. What’s the best way to add these?
If these are ordinary “fix bin sizes” histograms, you could simply “align” their axes (neglecting the “imperfect” time stamps) using: SiPM_A_OR_D->GetXaxis()->SetLimits(0., 1.022260);
or: SiPM_A_OR_D->GetXaxis()->Set(100, 0., 1.022260);