Excitations and optical properties of phenylene-based conjugated polymers and oligomers