Relationship between structure and optical properties in rare earth-doped hafnium and silicon oxides: Modeling and spectroscopic measurements