The daughter is 9 - she should absolutely know that it's wrong to hurt anybody or anything. 'Beating' (not even hitting which would be bad enough, but 'beating' - how is that permitted?) a creature more vulnerable than herself reflects very badly on her - and the OP too to be honest, as she's the one who should be protecting everyone in the house.
How does the dog 'annoy' her? Is the dog pestering her to play? If so, it's the OPs responsibility to ensure that the dog is well exercised / stimulated and thus calm in the house.
Regardless of the dog 'annoying' her, she needs to know that violence is not acceptable. Torturing a dog - whether in anger or not - is a very worrying trait.
We had 2 large dogs in a 2 bed garden flat when I was growing up, and the dogs didn't come ahead of me (as people are suggesting is happening here) but woe betide me if I ever teased or hurt them. It wouldn't have been tolerated and rightly so. I was taught from a young age to be kind to all creatures.
I am torn between thinking the dog needs out of this situation asap before it eventually runs out of patience (I'm amazed she's not bitten already TBH - what a good-natured creature she is - don't presume too much on this, she will eventually bite. If your daughter loses an eye for example, the dog will be PTS and it won't be the dogs fault here, it would be yours and your DDs). And alternatively thinking that you need to be the adult here and make this situation work - don't let your daughter 'drape herself' all over the dog, or hit it - both are extreme and inappropriate behaviour. Teach her calmness and kindness. But if you can't make this work then you must get the dog out of there.