The linac of the European Spallation Source is accelerating the proton beam to its final energy mainly by using superconducting structures, therefore choosing the right transition energy between these superconducting structures as well as choosing the cavity length and number of cells which enhances the acceleration is of great importance. Two types of linacs will be studied, a linac with superconducting quadrupoles and a linac with normal conduct- ing, resistive, quadrupoles. The procedure to find the optimized linac will be described in this technical note.