Importance of the Fermi-surface topology to the superconducting state of the electron-doped pnictide Ba(Fe1-xCox) 2As2