An 18-day-old baby girl suffered a fatal head injury when she was allegedly thrown out of a window by her mother, a court has heard.