TH2F::FitSlices fails to fill histograms

Hi all,

I’m using the attached script in the hope of getting the results of the 2D slice fit, but for some reasons the histograms in hSlicesX are empty. Can you tell me why?

This is what I do:

root [0] .x profileHist.C
Entries 1 3b1bbe0  0 h_0
Entries 2 3b38390  0 h_0
Entries 1 3b1c0f0  0 h_1
Entries 2 3d52930  0 h_1
Entries 1 3b1c6f0  0 h_2
Entries 2 3d52ca0  0 h_2
Entries 1 3b1ccf0  0 h_chi2
Entries 2 3d53160  0 h_chi2

Thanks,
N.
profileHist.C (3.52 KB)

Hi,
in TH2::FitSlicesY you should not use option “R” if you have not set any range in your function.
If you remove it, it will work

Cheers, Lorenzo