Ultrafast spintronics with geometric effects in nonadiabatic wave-packet dynamics