Relationship between charge transfer energies of Yb3+ and Sm3+ and crystal environmental factor