Beam detector