Building density profile of all cells