Unfortunately for sites like these, the best answers are rarely cookie cutter solutions. There are many factors in this situation. Some important ones you mentioned, particularly the past behaviors of this boss. Others may be harder to put down in words.
It's easy to divide the options up in to three categories. The first category has one option, "talk to HR." The second category has a host of options where you try to work your differences out directly with the boss. The third category contains a collection of options where you resolve your problems on your own. It is not going to be immediately obvious as to which category is best for your situation, but there's enough distinction between them that we can at least talk about the effects.
"Talk to HR" seems like the natural solution for any workplace harassment, and for good reason. Their job is to handle human relations issues. In theory they're good at it, and for your company, that might actually be your best option. However, you need to understand how your particular HR department works, especially when it comes to harassment. Many I have worked with are best viewed as a loaded gun: you can pull the trigger on them, and they will resolve the issue you want to see resolved, but you lose control of the situation. HR does have the company's interests in mind, and may find a solution you deem less ideal because it protects the company's stock price. Or they may be the pie-in-the-sky ideal HR department that prides themselves on finding good solutions for every issue. You may not even be able to put down in words how they react, but you should be able to internalize it and act on it. Again, treat them as a loaded gun. If you need a solution solved, at all costs, they will solve it. The price may be your relationship with your boss. Needless to say, nobody has ever appreciated having HR called down upon them like a gaggle of flying monkeys. Your boss will have negative feelings about this occurrence. HR may tie her hands to make sure she can't do anything in retribution, or they may not.
Working it out with the boss is the middle ground, and that naturally makes it a soupy mess. Any good middle ground solution includes trying to make both parties happy, and that involves details you may not even know right now. For all you know, she has a known disorder and is grappling to deal with it. Or perhaps she's just an insensitive clod. It won't be easy to determine which. You'll have to work with her on it. However, if you feel that her personality dominates yours (which, from your wording, may be a concern of yours), you may find the "middle ground" is too close to "whatever she thinks is right," which would make this a bad category of solutions. I, personally, consider it the ideal solution -- why not solve a problem between two people with a solution that exists between two people? However, only an idealist would presume that makes it the only solution worth considering. If you're not comfortable with this as a solution, guess what... this is in your court. She slapped you on the butt, and the irrevocable consequence of this is that she has ceded you the right to go down whatever path you see fit. (If anything, this would be the most important message I'd give to you: her action has consequences, but you have a great deal of control as to what those consequences are. She has given you power over her through her mistaken gesture.)
The final class of solutions are to solve it yourself. These are often considered the "pansy" solutions, so if you're worried about being bullied they may be hard to implement. However, they are real valid solutions that recognize the crux of the issue: you may not care as much about your boss' predilection for flagellating coworkers, what you may really care about is that it doesn't happen to you again. I worded that last sentence carefully, because its suggesting how you might think. If you're thinking in terms of retribution, justice, or merely "making the workplace a better place for others," you have the full right to think differently... it just suggests this class of solutions isn't for you. However, if you just want to solve your own problems, there are many things you can do yourself. To blatantly steal from Teego1967's answer, one option is to get transferred away. That can solve your problem, if your problem is merely not wanting it to happen again. And there is a perk. Again, stealing blatantly from Teego1967's wise words: upper management likes to see people solve problems for themselves, making you look more attractive in the long run. (Since I'm stealing from Teego1967, I should probably steal their link too... but no. Go read their answer! And upvote it!)
In all, the choice is really how much of your life you want to control. If you just want control of your own life, the personal solutions may be best. If you want control of the workplace environment, working with your boss may be best. If you want to just make sure she doesn't do it again, ever, pulling the trigger on HR and dealing with the aftermath may be the best. My recommendation is simple: do whatever solves the problems you believe need to be solved for the future. Don't worry about the past directly. It's just the past. Only worry about the past for what effect it may have on the future, or predictions it may have for the future. Look forward, not backwards.
Addendum: As I wrote this, the first paragraph was intended to be a natural catch-all tautology. I tried to say "take all the options you have, and permit me to draw some lines to help make decisions easier." As I wrote, it did occur to me that there is a fourth category which I instinctively omitted because I generally do not recommend it to anyone. However, if I'm going to claim that the first paragraph is valid, I need to at least include the fourth option: manipulation. Her actions are irrevocable, which means you can use them as leverage to manipulate her to your advantage, much as the Sith from Star Wars. You may be able to get workplace perks, such as rapid promotions by leveraging any fear she might have of repercussions for her mistake. Would I recommend it to anyone? No. There's a reason why I invoke a deep dark fictional group of bad guys in my description of it. But, in the name of completeness, I decided to at least include it.