which leads to a deflection of the proton beam in (positive) y -direction. A look-up-table (LUT) of the magnetic field was exported from the finite-element model with a grid spacing of 5 mm in a volume of x$_{B}$ × y$_{B}$ × z$_{B}$ = 70 × 40 × 20 cm $^{3}$. The LUT covered the three magnetic field components in the volume of x ∈ [ − 50 cm , 20 cm] and y ∈ [ − 20 cm , 20 cm] and z ∈ [ − 10 cm , 10 cm]. To assess the influence of the different uncertainties of the simulations, a number of separate Monte Carlo simulations were performed while varying the input parameters. For each of these uncertainty simulations, the Bragg peak deflection y$_{80}$ and retraction Δ R$_{80}$ were extracted and compared to the original simulations. All uncertainties were calculated for the lowest (80 MeV) and highest (180 MeV) energy used and interpolated linearly for intermediate energies. Relevant systematic uncertainties of the input parameters are those of the initial proton energy E$_{0}$ , of the density of the PMMA phantom ρ and of the main magnetic field component B$_{z}$ . The uncertainty of the range measurements performed for Appendix B.1 amounts to 0 . 25 mm. Us- ing tabulated stopping-power data [32], this corresponds to an uncertainty of the beam energy E$_{0}$ of Δ E$_{0}$ (80 MeV) = 0 . 25 MeV to Δ E$_{0}$ (180 MeV) = 0 . 15 MeV. The absolute uncertainty of the PMMA density amounts to Δ ρ = 0 . 002 g cm − $^{3}$, and that of the simulated magnetic field map to Δ B$_{z}$ = 0 . 02 T. Each of these parameters was separately increased by its uncertainty (i.e. E$_{0}$ +Δ E , ρ +Δ ρ and B$_{z}$ +Δ B$_{z}$ ) in an additional simulation to assess its influence on y$_{80}$ and Δ R$_{80}$ . It was assumed that the influence of the parameter uncertainties was equally large in positive and negative direction. Furthermore, there is an influence of systematic uncertainties which are inherent to the Monte Carlo simulation, for example in the physical process models and the mean excitation energy applied. As an estimate for this uncertainty, the range differences of the model to the reference measurements (Appendix B.2) of Δ R = 0 . 2 mm was used. The influence of this range uncertainty on y$_{80}$ and Δ R$_{80}$ , was assessed by varying the initial energy accordingly, i.e. with Δ E R 0 (80 MeV) = 0 . 20 MeV to Δ E R 0 (180 MeV) = 0 . 12 MeV. The statistical uncertainty of the simulation was estimated by repeating the original simulation five times with different random number seeds and calculating the standard deviation of y$_{80}$ and Δ R$_{80}$ . It was found that all simulations would be performed with 2 . 048 × 10 7 primary particles each to acquire a statistical uncertainty of the Bragg peak position of 0 . 1 mm or smaller. The total uncertainty was estimated as the square root of the quadratic sum of the individual contribu- tions. 21 Appendix B.4. Uncertainty estimation