Molecular aggregation and shape effects in the optical spectra of organic dye molecules in SiO2 and SiO2-PMMA matrices