Treatment planning for Flash radiotherapy: General aspects and applications to proton beams | Synapse