A methodology to select galaxies just after the quenching of star formation