Normalising in Histogram

Hi everyone, I want to normalize a histogram by dividing each bin with different number i.e divide count in first bin with .5 and second bin with 4. How should I proceed?

Hi @souvikc and welcome to the ROOT forum.

You can loop over the channel and rescale the content of each bin

for(int i=1;i<=h->GetNbinsX();i++)

or you could fill an histogram with the different value you want to use and then use the function TH1::Divide()


Just for reference,I leave below how the standard normalization to have an histogram with unit area is done


Thanks a lot @Dilicus. It works