Dear root community!
I have 2 TH1F histograms (h_data and h_mctot) and want to build a third one (h_ratio) with the ratio of the original ones as entries (i.e. ratio data/MC).
h_ratio = h_data.Clone()
h_ratio.Divide(h_mctot)
h_ratio.Sumw2()
However, when I plot this the entries of h_ratio are integer, but I obviously need float number entires, e.g. 1.3 instead of 1.
So my questions:
Why the int entries? Integer division?
Where is my mistake?
How can I get float number entries?
Thanks a lot!
couet
March 18, 2020, 12:50pm
2
Can you post the histogram you are talking about here ? so we can have a look at them โฆ
Hereโs the histograms. I want to do the ratio of histograms data and mctot. The last one is the result with only integer entries.
couet
March 18, 2020, 2:17pm
6
May be @moneta may have an idea just looking the the plots ?
moneta
March 18, 2020, 3:04pm
7
Looks strange. Can you please upload the macro and possibly also the histograms in a ROOT file ?
Thank you
Lorenzo
system
Closed
April 1, 2020, 3:06pm
8
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.