Histogram scaling not working

Hello,

I might just be misunderstanding what the Scale() function is supposed to do but here is what I have (histogram h already exist)

root [1] h->Clone("h2")
root [2] double s = h->GetEntries()
root [3] h2->Scale(s)

The problem is that when I draw h2 I get the exact same histogram as h1. What I am trying to do is get a normalized version of the original histogram h. I thought Scale() would perform the function h2= h2 x (constant) so that each bin would be scaled by that constant. So what am I misunderstanding or doing wrong?

EDIT: nevermind, I figured it out

Good you found the solution :-).

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