A cosmic-ray veto system based on the direction of flight technique