Optical model for multilayer structures with coherent, partly coherent and incoherent layers