\langle \psi '|\psi '\rangle=\langle \psi |\hat{D}(g)^\dagger \hat{D}(g)|\psi\rangle