No, the hijab is not mandatory in Baghdad or general cities. It is only required when entering mosques and holy shrines in Karbala, Najaf, and Kadhimiya.