Investigation of band gap and permittivity of the perovskite CaTiO3 in ultrathin layers