And what is norm_h1
?
T tried with
h1->Scale(1/norm);
h1->Scale(1/norm_h1);
h1->Scale(1/norm_factor);
still same error
I donât understand what norm_h1
is. Try
Double_t norm_factor = h1->GetEntries();
h1->Scale(1/norm_factor);
If this doesnât work, can you show what you do from the beginning?
1 Like
Thanks it works. But there is no changing in histogramâs scale.
Try redrawing your histogram.
I redraw many times, but still itâs same. Could you please elaborate how we know that our histogram is normalized to unity or not?
If you do just whatâs on your screenshot, i.e.
root [1] h1->Draw("hist");
root [2] Double_t norm_factor = h1->GetEntries();
root [3] h1->Scale(1/norm_factor);
, you will still see the non-normalized histogram. However, if you do
root [4] h1->Draw("hist");
right after, youâll see itâs normalized.
1 Like
Thank you very much @yus i did it.
Thanks a lot.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.