Vectorised CG select code