Smoothing 2D histogram

Hi all,

Is there any concrete example for smoothing a 2D histogram in root? It seems to be possible using or TH2::Smooth or RooKeysPDF but it doesn’t seem to be trivial as the 1D one… I attached for instance the 2D histogram I want to smooth. The name of the histogram is hist_full_all_qqZZ

Thanks in advance.


histlist_mll_sherpa_Zveto_applied.root (78.2 KB)

ROOT 6.22/09

hist_full_all_qqZZ is a TH1F:

TH1F  Jul 29 12:03 2022 hist_full_all_qqZZ;1      "" 

Smooth exists also for TH2.

Oups!! sorry wrong file attached. The right file is attached now.
histlist_mll_vs_m4l_2D_sherpa_SR2.root (179.3 KB)

root [0] hist_full_all_qqZZ->Draw("surf1")
root [1] hist_full_all_qqZZ->Smooth()
root [2] hist_full_all_qqZZ->Draw("surf1")

This looks really straightforward, thanks.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.