Generation And Optimization Of High Quality Multi-Gev Electron Beams In Plasma Wakefield Accelerators