Die Erfindung betrifft ein Verfahren sowie eine Vorrichtung (51) zur Optimierung eines Partikelbeschleunigers (15). Das Verfahren weist folgende Schritte auf:a) Bestimmung einer Bestrahlungsdauer bei einer Bestrahlungsplanung undb) Verwendung des Wertes der bestimmten Behandlungsdauer zur Optimierung der Einstellung des Partikelbeschleunigers (15).The method involves determining irradiation period during irradiation planning, and using a value of determined treatment time to optimize setting of a particle accelerator (15). Treatment time of patients for preset and/or measured accelerating efficiency is determined to obtain efficiency optimum. Treatment efficiency is adjusted such that preset radiation period is maintained. Complete radiation period of treatments is determined with constant accelerating efficiency. The accelerator is adjusted if expected treatment time is shortened as time for adjustment of the accelerator is required. Independent claims are also included for the following: (1) a device for optimizing a particle accelerator (2) a computer program product comprising a set of instructions to perform a method for optimizing a particle accelerator.