RDataFrame: drawing style after normalizing histograms

Dear experts,

I noticed that in RDataFrame normalizing a histogram before calling h ->Write() produces a histogram with error bars, even if the histogram is not weighted.

How can I get the usual bar chart plot (obtained for example adding the option HIST in Draw()) after normalizing?

ROOT::RDataFrame df("mytree", myInputList);
auto h = df.Histo1D( {"", "", nBin, pT1, pT2}, "ele_pT");
Double_t scale = 1/(h ->Integral());
h ->Scale(scale);
h ->Write();

ROOT Version: 6.18/02

Nowadays, any floating-point precision histogram has uncertainties attached: we realized that the analysis mistakes stemming from not having those are more relevant than the memory saving from not doing it. If you don’t want to visualize the uncertainties, use the HIST option (as you pointed out), or call Sumw2(false). Well, that latter option has an issue: https://sft.its.cern.ch/jira/browse/ROOT-10459

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