You need to explain things to your daughter in language that she understands. Tell her that the officers thought that because your name matched a name on a list they had with them, they thought you had committed a crime, and that's why they put the cuffs on you. You can go on to say that they weren't trying to hurt you, they just didn't want you to leave the area.
Then you can tell your daughter that it took the officers a little while to realize that your name and the other name didn't match. Once they did this, they took the cuffs off of you. One thing you definitely DON'T want to do is to act as though the police are people to be afraid of, especially not around your daughter. That will send the message to her that cops are people to be feared, which could put her life and/or safety at risk in an emergency. Instead, you should treat this as a learning experience for your daughter, and make it clear to her that when people do bad things that they shouldn't, the police use things like handcuffs to make sure that they don't repeat their acts. But that doesn't mean she should be afraid of them, because they aren't dangerous.