Photoelectric beam sensor