Through-beam sensors