Officer fires shots at armed man, hits girl's bedroom