The photoluminescence mechanism in carbon dots