I'm sure there's more to it than what you posted, but you seriously overreacted.
She got irritated because she didn't have crackers (she's just a little kid, what are you going to do, haha) and you punched her in the back and yelled profanities at her face.
however
I recognized that I was now way over then line and started to apologize when I heard footsteps racing down the stairs.
at least you realised that shortly after the event