Analysis of the x-ray resonant scattering at the Mn K edge in half-doped mixed valence manganites