Hammering taking account of biodiversity and the health of the stand