I have a 2D histogram with values of the histogram output as colors plotted via TTree::Draw(). I want to normalize each xbin (column) of the histogram (i.e. choosing a particular xbin and integrating the values corresponding to the y bins in this column). This means I am looking to do something like h->xbin(i)/Integral(i,i,1,100) where i goes from 1 to 100.

Could someone direct me to the right syntax?

TH2F *h = new TH2F("h","h",100,0,5000,100,0,5000); The histogram output I have is like a histogram scatter plot with values corresponding to a (i,j) on the color pallet.