Issue in addition of 2D plots

Dear experts,

I am adding three 2D histograms after scaling with different numbers. But when I add these histograms the number in bins decreases instead of increase. But when i plot them separately, the number in individual plots is increased.
Please check new_bins.cc

Thank you. I am attaching the separated plots as well for comparison.
new_bins.cc (6.7 KB)
added_nt2.root (16.8 KB)
zjets_nt2.root (16.8 KB)
ttbar_nt2.root (16.8 KB)ww_nt2.root (16.8 KB)

Right before Nt3->Scale(mul);, try to add:

std::cout << "mul = " << mul << std::endl;

You do not provide required input files so one cannot run your macro.

Dear Wile_E_Coyote,

Please take these files to run the above script.
MC13TeV_WWTo2L2Nu.root (18.0 KB)
MC13TeV_TTJets.root (21.4 KB)
MC13TeV_DY50toInf_nlo.root (53.0 KB)

In the “new_bins” function, you get all “*w_orig” histograms from “f2” while you should get them from “f3”.

This following picture (all histograms after applying “scale*” factors) seems fine to me (after I corrected the bug mentioned above).

1 Like

Dear Wile-E-Coyote

Thank you so much.
God bless you.

FYI: https://root.cern.ch/rainbow-color-map

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