Analysis of the light production and propagation in the 4-tonne dual-phase demonstrator