Wow! Blows to the back of the head can be nasty. Glad to see your helmet gave it's all for you. Give it a place of honor.
The lesson for the day: Keep loose articles secured on the bike. Maybe a bungy cord or similar on that pannier to prevent a repeat performance.