Cool core clusters from cosmological simulations