A time-of-flight detector for thermal neutrons from radiotherapy Linacs.