I think the problems your daughter experiencing are migraine
attacks as pain is induced by some strenuous work like playing basketball etc.
I would advice you to take her to neurologist
to investigate and treat her for the migraine.
hope my info helped you
Dr Hari Om Chandrakar