Sensor having a first radiation emitter and an individually assigned first detector, and an evaluation unit, wherein the first radiation emitter and the individually assigned first detector form a first surveillance channel configured to convey data that are coded based on a first code having a first code length, and wherein the evaluation unit is configured to evaluate the first detection signal, and wherein the evaluation of the first detection signal includes calculating the correlation between the first detection signal and a first mismatched filter code that has a code length larger than the first code length, characterized in that the sensor comprises a second radiation emitter and an individually assigned second detector, wherein the second radiation emitter and the individually assigned second detector form a second surveillance channel configured to convey data that are coded based on a second code having a second code length, wherein the second code has the same code length as the first code, wherein the evaluation unit of the sensor is configured to evaluate the second detection signal based on a correlation analysis, wherein the correlation analysis of the second detection signal includes calculating the correlation between the second detection signal and a second mismatched filter code that has the same code length as the first mismatched filter code, wherein the first and second mismatched filter code fulfil the following conditions min x ^ ‖ H 1 x ^ − b ‖ 2 min y ^ ‖ H 2 y ^ − b ‖ 2 x ^ = H 1 t b y ^ = H 2 t b wherein H1 and H2 are convolution matrices each containing the first code x and the second code y, b is a desired response, x̂ and ŷ are the first and second mismatched filter code, respectively, H 1 t describes the Moore-Penrose inverse of the convolution matrix H1, and H 2 t describes the Moore-Penrose inverse of the convolution matrix H2, wherein the desired response b is defined by the following vector b: = e, e,..., 1, e,... e and wherein e is a small given number in the range between 0 and 0.1. wherein the first radiation emitter and the individually assigned first detector form a first surveillance channel configured to convey data that are coded based on a first code having a first code length, and wherein the evaluation unit is configured to evaluate the first detection signal, and wherein the evaluation of the first detection signal includes calculating the correlation between the first detection signal and a first mismatched filter code that has a code length larger than the first code length, characterized in that the sensor comprises a second radiation emitter and an individually assigned second detector, wherein the second radiation emitter and the individually assigned second detector form a second surveillance channel configured to convey data that are coded based on a second code having a second code length, wherein the second code has the same code length as the first code, wherein the evaluation unit of the sensor is configured to evaluate the second detection signal based on a correlation analysis, wherein the correlation analysis of the second detection signal includes calculating the correlation between the second detection signal and a second mismatched filter code that has the same code length as the first mismatched filter code, wherein the first and second mismatched filter code fulfil the following conditions min x ^ ‖ H 1 x ^ − b ‖ 2 min y ^ ‖ H 2 y ^ − b ‖ 2 x ^ = H 1 t b y ^ = H 2 t b wherein H1 and H2 are convolution matrices each containing the first code x and the second code y, b is a desired response, x̂ and ŷ are the first and second mismatched filter code, respectively, H 1 t describes the Moore-Penrose inverse of the convolution matrix H1, and H 2 t describes the Moore-Penrose inverse of the convolution matrix H2, wherein the desired response b is defined by the following vector b: = e, e,..., 1, e,... e and wherein e is a small given number in the range between 0 and 0.1.