added option maxtol in vcgRaySearch