def normalize(histogram):
    """Returns normalized histogram clone of input histogram

    Args:
        histogram: A TH1 histogram
    """
    nbins    = histogram.GetNbinsX()
    integral = histogram.Integral(1,nbins)
    newhist  = histogram.Clone()
    newhist.Reset()
    for bin in range(1,nbins+1):
        ibinY = histogram.GetBinContent(bin)
        newhist.SetBinContent(bin,ibinY/integral)
    return newhist