You need to explain to your DD PRONTO, that what happened between you and her father is WRONG, that there are organisations, charities and countless individuals that will help you protect yourself and your children from this ever happening again.
It is never right for a man to hit a woman, or a woman to hit a man.
No-one wants a relationship to end, even when there is violence, it's heartbreaking to have to come to terms with the fact that it's so dangerous, that it will never get any better and that it's harming you and your DC.
She needs to understand NOW that if you and she stay in this situation, it will make her think this is normal, and it isn't.
The only chance for her dad to get better is to see what being violent to his wife and abusing his children as a result does, is for you and the DC to leave him. THEN he may get help. If you stay, he won't. If you stay, it WILL happen again. If you stay, he could kill you. he will hit your DD when she is old enough to assert her opinion too.
You have to be as age appropriately honest and straight with her as possible. sugar coating it or making up fake excuses will harm you relationship long term, as the truth WILL always come out, and if you sell her a pack of lies, she will lose trust in you.
This is YOUR decision, YOUR responsibility and YOU have to choose to protect your family. This is not your fault, this is not your DDs fault, it is your H's fault.
The way you handle this will hopefully prevent your DD falling into the same trap when she is old enough to go out with men. The stakes are THAT high.
My son is 6, he was 5 when I had to have this discussion, he saw a lot less than your DD has seen.