Understanding and quantification of elastic and plastic deformation during a scratch test