Rosen–Zener transition of two-component Bose–Einstein condensates