Make use of a temporary class to sort the valid detections according to angular separation from the query position.