Calculation of concentration histograms