Development of a detector for bunch by bunch measurements and optimization of luminosity in the LHC