High-quality electron beams generation in a linear upramp density target