Normalizing a histogram

I want to normalized a histogram based on the initial number of projectiles(events) and I did not find an easy way to do this. There must be an easy way to do this. It is root! Somebody did this long time ago for sure, right?

If I have a TH1F* h. I was thinking in creating a clone, call it “clone_h”, then loop through all its bins to set their values to VAL, the normalization value. Then I i will do:


Is there any other way to do this?

Thank you,

See the [url= ways of normalizing histograms"[/url] thread.