An approach to an accurate determination of the energy spectrum of high-energy electron beams using magnetic spectrometry

At the national metrology institute of Germany, the Physikalisch-Technische Bundesanstalt, a research accelerator for dosimetry in radiation therapy has been installed. Magnetic spectrometry is used to determine the spectrum of high-energy electrons generated by this accelerator. Regarding the intended experiments at the accelerator, a high accuracy for the energy determination of the electron beam is required. For this purpose, an experimental setup is used that has a number of additional devices assembled around the spectrometer to determine geometric characteristics of the electron beam, which influence the energy analysis. For the analysis of the acquired data, a software was developed which meets specific needs. One important aspect is that the software is based on an algorithm for energy determination which considers the measured magnetic flux density of the spectrometer and geometric details of the beam and the spectrometer. The software also meets the demand that it can be used to estimate the uncertainty assigned to the energy. This paper covers the experimental and analytical background of magnetic spectrometry at the high-energy beamline of PTB's research accelerator. A comparison of results calculated with the specific algorithm for energy determination which was developed for this experimental setup and with well-known algorithms is given to show the advantage of the specific method. Results of measurements and their analysis with the algorithm are presented as well.


Introduction
Since 2008, the national metrology institute of Germany, the Physikalisch-Technische Bundesanstalt (PTB), has been operating an electron linear accelerator for fundamental research in dosimetry for radiation therapy [1]. The energy spectrum of the accelerated electrons provides important information for specific research purposes with regard to dosimetric problems. To determine the electron energy magnetic spectrometers have been installed at both sections of the research linear accelerator. 1 This work presents the method for the energy determination at the high-energy section of the accelerator. At this section a benchmark experiment was done which aims at the verification of radiation transport calculations. Therefore, the experiment had to be simulated by radiation transport calculations with the electron beam of the accelerator as the radiation source. The energy spectrum is, among other parameters, one characteristic which is necessary to realistically describe the electron source for the calculations. In the application field of radiation therapy magnetic spectrometry is proposed as one method to determine the electron energy of an electron beam [2]. Especially it is the method of choice to provide the energy of electrons with high accuracy [3,4]. With regard to the benchmark experiment the main focus lies on a very precise determination of the energy spectrum of electrons at about 25 MeV. In principle, the energy determination is based on the reconstruction of electron trajectories within the spectrometer taking given conditions into consideration. One thing to know is the entrance and exit point which the electrons take to move across the spectrometer. Furthermore, the divergence of the electron beam and the entrance angle of the beam relative to the spectrometer are considered. The experimental setup which is used to record this information is presented at the beginning of section 2.1 and is complemented by the description of the process of acquiring measurement data. For the data analysis it is important to know the distribution of the magnetic flux density along the electron trajectory within the spectrometer. The investigations which have been conducted to determine the magnetic flux density are presented in section 2.2. Finally, section 2.3 deals with methods for analyzing measured data with emphasis on an algorithm which is based on tensor interpolation of the magnetic flux density. Section 3 contains results obtained with this method. The method is compared to well-known methods of energy determination (section 3.1) and an analysis of a real measurement is presented exemplarily (section 3.2). Thereby, an important aspect is to consider the uncertainty which is accompanied to the energy. This is one of the uncertainty contributions to dosimetric quantities which are determined by radiation transport calculations which simulate the benchmark experiment at the high-energy beamline of the accelerator. The whole setup for the energy determination, which is established at the high-energy beamline after the accelerating part, can be seen in figure 1. It consists of the magnetic spectrometer and additional devices: beam position monitors (BPMs), beam profilers, a beam current monitor (integrating current transformer -ICT) and a horizontal steerer. The spectrometer is an H-shaped electromagnet with specifications according to table 1. The spectrometer dipole consists of two water-cooled coils around the iron yokes which have a gap of 40 mm. In figure 1, the spectrometer is shown in horizontal section view with details of its interior. The gap between the yokes contains a vacuum chamber. The chamber is made of stainless steel with a relative magnetic permeability 1 ≤ µ r < 1.01 (specification by manufacturer). Within this chamber the electrons move along an almost semicircular trajectory with a reference radius of 170 mm. A slit system consisting of two horizontally moveable jaws defines the entrance location of the electrons into the spectrometer. It is possible to adjust variable slit widths relative to a fixed centre defined by the reference radius. If the spectrometer is turned on, its flux density is determined with an NMR (Nuclear Magnetic Resonance) probe. The probe is placed outside of the vacuum chamber in a nearly homogeneous region of the magnetic field. The measured flux density is a reference value which is used to calculate the distribution of the flux density inside the vacuum chamber by scaling the known relative distribution (for the determination of this relative distribution, see section 2.2.1). At the exit side of the spectrometer a moveable wire is located which scans the electron beam cross-section horizontally. To be independent of possible instabilities or a temporal drift of the beam during the acquisition of the wire signal, the signal is normalized by the beam current which is measured with a beam current monitor placed in front of the spectrometer entrance. Beam position monitors and beam profilers are used to survey the electrons' path along the beamline. Beam profilers are also used to determine the entrance angles and divergence of the beam which is illustrated in figure 2 and 3. The steerer in front of the spectrometer entrance is used to adjust the horizontal position of the beam when the spectrometer is switched on (for more details see section 2.1.2). For that case, a relationship between steerer current and horizontal entrance angle of the beam (ϕ) was determined.

Explanation of the data acquisition process
In order to realize a high energy resolution, a small slit width at the entrance of the spectrometer is necessary. On the other hand the smallest slit is restricted by the signal form resulting at the wire scanner. The signal distributions, examples of which are shown in section 3.2.1, have to be analyzable regarding the maximum amplitude and the FWHM. As a compromise, a slit of 1 mm is used. Since the cross-section of the beam is wider (FWHM > 4 mm), only a part of the beam can pass the entrance slit. A priori it cannot be assumed that it is sufficient to examine just a part of the beam to obtain information about the whole energy spectrum. To circumvent this problem, the horizontal steerer is used to deflect the whole beam across the entrance slit. Two methods are available therefore: the beam can be wobbled repeatedly across the slit or it is swept once across the slit while the scanner position is kept fixed. The result should be a distribution of signal amplitudes which represents the scanner signal for various parts of the beam. If the number of detected amplitudes per scanner position is large enough, their mean represents the scanner signal for the whole beam at each scanner position. That way one recorded signal distribution of the wire scanner already contains all information necessary to determine the whole energy spectrum. The wobbling and sweeping, respectively, are realized by supplying the coils of the steerer with a periodic current. For the wobbling a triangular current is used. The wobble frequency was found empirically. An appropriate frequency has to cause a wide but also regular variation in the wire scanner signal at one fixed wire position when deflecting the beam in the spectrometer (see figure 10). Using beam sweeping, the regular variation is caused by deflecting the beam with a saw tooth current whose period is defined by the number of averages divided by the pulse repetition frequency of the linac. In both cases, offset and amplitude of the current are set to just make the beam disappear behind the slit jaws at both sides of the deflection. Previous experience indicates a number of at least 50 beam pulses, of which the normalized single pulse charges are averaged per step, to yield a representative mean value for the normalized wire signal. In a measurement, all wire positions between a start and an end position at intervals of an adjustable step width are considered. Besides the normalized wire signal, the mean of the magnetic flux density and some other values containing information about the linac performance are recorded in a data file. In general, the magnetic flux density is a vector which has components in all three dimensions of the used Cartesian coordinate system. However, just the components which are perpendicular to the electron path can cause a deflection of the beam. Since the horizontal components were small they were neglected for this work. Consequently, in the course of this paper, talking about the magnetic flux density always means the vertical (y-) component of the flux density. For the determination of the distribution of the flux density inside the spectrometer at the region where the electrons may pass through, the spectrometer had to be taken out of the beamline and the vacuum chamber had to be removed. Consequently, additional investigations had to be conducted to assess the influence of the surrounding air and chamber material on the values of flux density (see section 2.2.2). The magnetic flux density inside the spectrometer was measured at discrete points, distributed in three planes which are located horizontally within the gap of the two pole faces. One plane is in the middle of the gap and the two others are at a distance of ±10 mm from the middle plane. The measurement points are arranged as a grid with a width of 10 mm and they cover the form of the vacuum chamber. Figure 4 shows the points of measurement in one plane. For the measurements, a Hall probe was used which was calibrated to an NMR probe (see figure 5). NMR is the most accurate method to measure the magnetic flux density [5]. The NMR system used is capable of detecting the magnetic flux density with an absolute accuracy of 5 ppm [6]. Hence, it is sensitive enough to detect relative variations in the flux density smaller than 5 · 10 −4 for a maximum value of 1 T (see table 1). The accuracy of the frequency indication of the device was checked with a calibrated frequency counter. In this way it was proved that the frequency indication of the NMR system is consistent with the indication of the frequency counter. A disadvantage of NMR probes is that they cannot measure in regions with steep gradients, like in the fringing fields at the entrance and exit region of the spectrometer (see figure 6). To bypass this limitation, the Hall probe was used in combination with a gaussmeter. The Hall probe was positioned with a software-driven 3Dpositioning system. The system is capable of realizing positioning down to 1/100 mm. A reference point had to be defined to take into account the relation between the probe, which was connected to the positioning system, and the spectrometer. This was a crucial aspect for accuracy in positioning and is considered by a conservative estimate of 1 mm for uncertainty of positioning. Another aspect which was treated as a contribution to positioning uncertainty is the unknown effective point of measurement of the Hall probe. The Hall probe has by far its largest dimension in z-direction. Because of this an uncertainty contribution was estimated by the variation in the inhomogeneous fringing field which dominates in z-direction.
The measurement to determine the distribution of the flux density inside the spectrometer was started after the warm-up of the spectrometer magnet (see section 2.2.2). The spectrometer current was set to 50 A, which causes a magnetic flux density of about 0.5 T measured at the centre of the spectrometer on the reference trajectory (central point in figure 1 or figure 4). Figure 7 shows the linear relation between spectrometer current and nominal flux density. The current and the resulting flux density, respectively, were chosen in accordance with the expected energy of the electrons. A system, which was already established for data recording in PTB, was used to measure the flux density at every point of the measurement grid. A mean value of the flux density as well as the -5 -    possible deviations from the value of 50 A (equals about 0.5 T) during the measurements for energy determination, it was also tested whether the relative distribution changes at currents between 45 A to 55 A. The influence of this slightly changing current on the relative distribution was considered in the determination of the uncertainties.

Additional investigations concerning the magnetic flux density
One point was to verify the temporal stability of the magnetic field. To prove this, the NMR probe was placed at the central point inside the spectrometer (see figure 1 or 4). A measurement of the flux density covering a period of 25 hours was made while supplying the spectrometer with a rated current of 50 A which had a standard deviation of 0.01% during that time. A short warm-up period of approximately one hour while the magnetic flux density shows a build-up was observed. After this, the maximum deviation of the values is less than 1 · 10 −4 relative to the calculated mean value. It is smaller than the specified value of field homogeneity in table 1. Consequently, all measurements of the magnetic flux density are carried out after at least one hour of initial powering of the spectrometer.
Another measurement with the NMR probe was carried out to determine the hysteresis of the magnet. The results are already shown in figure 7. The spectrometer was operated with eight different currents from 35 A to 99 A (abscissa figure 7, measured values marked with asterisk). It can be seen that the flux density, which was measured at the central reference point in the spectrometer, is linearly dependent on the current. The plotted values of flux density are mean values. They consider values which were measured by increasing the current according to the eight current steps, then decreasing the current from 99 A back to 35 A, adjusting the same eight current values and, finally, increasing the current again as before. The relative standard deviation of each flux density value was less than 2 · 10 −5 , so hysteresis was neglected.
A difference between the measured values of the magnetic flux density in air and the actual values in vacuum can be neglected since the relative permeability of air and vacuum is almost identical (µ vacuum = 1; µ air = 1.00000037).
The influence of the vacuum chamber material and the chamber's welding seams on the magnetic flux density were investigated with material samples and with a dummy vacuum chamber. The magnetic susceptibility of samples of the chamber material with and without welding seams was determined to verify and improve the specification given by the manufacturer. The measured susceptibilities of all samples were in the order of 3 · 10 −3 , but varied for each individual sample. Variations could also be observed when placing discs of material samples in the spectrometer and measuring the flux density at different points across the samples. The results of this investigation are plotted in figure 8. Measured values without a sample in the spectrometer are also added. It is concluded that the chamber material has an influence on the magnetic flux density, but the welding seams do not change the values. Another expected finding is that the material influence is dependent on its thickness (bottom and cover plate: 3 mm, side plates: 5 mm). Further investigations with a dummy vacuum chamber made it possible to define a factor for the influence of the chamber material. This dummy chamber was made from the same material (the same batch) as the original chamber. In principal, the geometry was based on the original chamber, but the dummy chamber was constructed with an opening at the side which is parallel to the entrance/exit plane of the spectrometer. This method allowed measurements with the Hall probe inside the dummy chamber when the chamber was placed inside the spectrometer. By comparing flux densities measured at accessible parts of the dummy chamber with values measured without the chamber, a correction factor was determined.
-8 - Figure 8. Results of measurements with and without material samples of stainless steel placed in the spectrometer. The results are normalized to the magnetic flux density that has been measured without material sample at x = 0 mm. The sample discs had a diameter of about 5 cm.

Uncertainty of the magnetic flux density
The equation for the calculation of the magnetic flux density at each discrete point of the measurement grid is: The estimate of the measurand y in equation (2.2) is B(x; y; z) and there are N = 7 input quantities x i (see table 2). The factors c i are the sensitivity coefficients mentioned in table 2 which are calculated as the derivation of equation (2.1) with respect to each input quantity.

The algorithm for energy determination
A simple way to determine the kinetic energy of electrons deflected in a magnetic spectrometer is the so-called SCOFF 2 method. In the case of the SCOFF method, the real distribution of the magnetic flux density is replaced by a rectangular distribution with a constant flux density along an effective length [8]. That way, the kinetic energy of electrons can be calculated according to equation (2.3). In this equation, the meaning of the symbols is as follows: • E kin is the kinetic energy of the electrons in J, • B is the magnetic flux density in T, • r is the radius of the electron trajectory in m, • c 0 is the speed of light in vacuum in m · s −1 , • m 0 is the rest mass of an electron in kg and • e is the electron charge in C.
It is expected that the SCOFF method does not create accurate results for the setup used in this work. One reason is that the electrons at the exit of the spectrometer do not pass the whole fringing field. Consequently, an approach had to be found which could deal with a more realistic representation of the field. For ion-optical simulations, the program RAYTRACE [9] is widely used. It offers the possibility of considering the fringing fields of a spectrometer by one-dimensional polynomial approximation. Nevertheless, even RAYTRACE cannot use the detailed information given by the measured flux density distribution.
Therefore, a software for the energy determination was developed which was adapted to the conditions of this work [10]. This software uses an algorithm which analyses characteristic points in the measured wire signals, thereby considering the geometry of the vacuum chamber and the relative distribution of the flux density in the chamber. Table 3 summarizes the input parameters for the analysis.
The energy determination is based on a reconstruction of the electron trajectory inside the spectrometer. The trajectory is calculated with a step width ∆ according to an approach presented in [4] which is called ESPLINE. The stepwise calculation is described by equation (2.4) and illustrated in figure 9. The reconstruction of the trajectory is done inversely, that is, from the spectrometer exit to the entrance. The x-coordinate of the exit point is defined by the chosen characteristic point in the distribution of the wire signal. At present, for an automatic analysis, the user can choose between the point of maximum intensity and the two points corresponding to the FWHM. Based on the defined point which is related to a certain wire position, the algorithm calculates all possible trajectories within the spectrometer that electrons in a certain energy interval (divided into a finite number of energy bins) can take. The estimated centre of the energy interval is defined by the wire position and the currently measured magnetic flux density and is calculated by equation (2.3). The local radius of the electron trajectory r(B(x, y, z)) in equation (2.4) depends on the flux density at the current point. The flux density is variable within the spectrometer but is considered constant for the calculation of the radius in each step. Thus the radius in each step is determined by transposing equation  realized through a loop which covers the deflection angles between (ϕ − Φ/2) and (ϕ + Φ/2) and the energies within the user-defined confidence range. The reconstruction of a trajectory is continued until the electron exits the spectrometer vacuum chamber through the entrance slit. Another scenario is that the reconstruction is terminated beforehand, because the electron trajectory hits the borders of the vacuum chamber geometry or parts of the entrance slit system. In that case the electron is rejected. Finally, just the trajectories of electrons which pass the opening of the entrance slit system are selected. The selected trajectories are valid trajectories. They are related to electron energy bins which create the electron spectrum. (2.4)

Representation of the spatial distribution of the flux density
The core piece of the algorithm for the energy determination is an appropriate representation of the magnetic flux density which makes it possible to take the field for individual electron trajectories -12 - into account. The magnetic flux density is just known at discrete points inside the vacuum chamber as described in section 2.2.1. Based on these values, a continuous representation of the field or an approximation of the field with higher resolution ("finer grid"), respectively, was sought for. This is necessary for the precise energy determination. Firstly, an attempt was made to describe the magnetic flux density in the spectrometer continuously by an analytical equation. Eureqa II Formulize [11] was used to calculate such an equation via symbolic regression (for details see [10]). Since the results were not appropriate to represent the magnetic flux density well enough, a numerical model was looked for to describe the magnetic flux density. The aim was to increase the number of sampling points representing the magnetic flux density in comparison to the relatively coarse size of the measurement grid. Therefore, a field tensor was calculated which artificially improves the resolution of the flux density by a factor of ten in each spatial dimension. Each element of the tensor represents a volume of 1 mm 3 of the magnetic field, resulting in about two million interpolated points. To determine values of the magnetic flux density at the additional points of the finer grid, different approaches were used. Interpolation via biharmonic splines [12] or linear interpolation led to good results. The differences between the two methods were negligible. Cubic interpolation was discarded due to overshoots between measured grid points, which were not acceptable.

Uncertainty of energy determination
Parts of the overall uncertainty for the determination of energy as described above are the uncertainty of the flux density distribution, the uncertainty of the slit width, the uncertainty of the position of the wire scanner, and the uncertainty of beam divergence and entrance angle. Because of the iterative approach to the reconstruction of electron trajectories it is not possible to calculate the combined uncertainty for the energy determination as it was made for the magnetic flux -13 -density (section 2.2.3). Furthermore, it had to be considered that the magnetic flux density is a distribution of values which are correlated. Under these circumstances Monte Carlo calculations were applicable to calculate the combined uncertainty. To limit the extent of the calculation of the combined uncertainty, simplifications were used which resulted in an estimate of the combined uncertainty. This is called resultant uncertainty in the following to differentiate it from the term used in accordance with GUM. The influence of the uncertainty of the slit width is not included in the calculation for the following reason: the uncertainty of the slit width is assumed to be 50 µm for small slits up to 2 mm. This results from measurements of the slit width with a linear variable differential transformer (LVDT) in comparison with the display of the stepping motor which moves the slit jaws. The display of the stepping motor was originally checked against measurements with a thickness gauge and a sliding calliper before the spectrometer was installed in the beamline. Regarding the uncertainty of the wire scanner position, which is at least seven times larger than the uncertainty of the slit width, the influence of the uncertainty of the slit width is neglected. 3 So just the uncertainty contributions of the wire scanner position, the divergence and the entrance angle are considered in addition to the uncertainty of the flux density. Table 4 shows the quantities and their uncertainties as they are used for a comparison of the uncertainty of the energy determination based on the tensor interpolation approach described in section 2.3.2, the SCOFF method and the representation of the flux density used in RAYTRACE. Except for the flux density, rectangular distributions are assumed for all uncertainty contributions. There are four possible combinations of the upper and lower bounds of the two quantities mentioned in the two upper rows of table 4. They represent extreme uncertainty influences of the scanner position, beam divergence and entrance angle on the resultant uncertainty. The uncertainty of the magnetic flux density is handled as a normal distribution and concrete values are determined by random numbers (N random ). For the calculation of the estimated resultant uncertainty, the algorithm for energy determination was run four times (according to the four combinations of the upper and lower bounds mentioned) with a number of N random each time using the tensor interpolation method. All valid energies which were determined during this calculation form a distribution from which characteristic quantities of location and dispersion can be taken. In the case of a Gaussian distribution, these are the mean energy and its corresponding standard deviation which is used as the value of uncertainty for the mean electron energy.

Comparison with established methods of energy determination
Tensor interpolation was used by the algorithm for energy determination to represent the distribution of the magnetic flux density inside the spectrometer. Therefore, this is called the tensor interpolation method in the following. Results of the tensor interpolation method were used to make a comparison with other established methods for energy determination which use simpler descriptions of the magnetic flux density. Table 5 lists the parameters and their values taken as a basis  for the comparison and table 6 shows the resultant electron energies for the three methods under Table 4. The uncertainty values used for wire scanner position, divergence and entrance angle. The values in this table are used to compare the results of an energy determination based on the tensor interpolation method with the SCOFF method and RAYTRACE.

Quantity
Uncertainty Remark Wire scanner position ±350 µm Considers the wire cross-section and uncertainty in its positioning Divergence and horizontal entrance angle, altogether ±0.001 • Empirical value from first measurements without beam wobbling Magnetic flux density 1e-5 T Empirical value which corresponds to the standard deviation of measurements with the NMR probe Figure 10. The wire signal mean values and their raw data in dependence on the wire scanner position. One group of raw data points which all belong to one wire scanner position is accentuated in blue to show the connection between raw data and mean value. There are some raw data points between the scanner steps which are recorded during the movement of the wire scanner, but they are not included in the calculation of the mean values at the fixed scanner positions.
consideration. As expected, the biggest relative difference of 1.7% was found between the SCOFF method and tensor interpolation. RAYTRACE and tensor interpolation differ by 1.1%. The SCOFF method and RAYTRACE calculate energies which are higher than predicted with the tensor interpolation approach. For the SCOFF method this is easy to understand by equation (2.3), since the value for the magnetic flux density B is the value measured in the centre of the spectrometer and it is assumed to be valid along the whole electron trajectory. Consequently, the difference between the -15 -  results calculated by SCOFF and tensor interpolation is a result of the imprecise representation of the magnetic flux density in the case of the SCOFF method. It is assumed that this is also the reason for the difference in the comparison with RAYTRACE. A disadvantage of the tensor interpolation approach is that there is a fixed grid of tensor elements and it has to be interpolated between them to reconstruct electron trajectories. That may lead to a discrepancy of some keV in comparison with the true result which is unknown. Nevertheless, in a comparison of the uncertainty distributions calculated for all three methods of energy determination in consideration of the uncertainties listed in table 4, the tensor interpolation method creates the most probable distribution to describe the uncertainty out of the three methods. The SCOFF method results in four discrete energy values between 25.485 MeV and 25.500 MeV, RAYTRACE results in a triangular distribution of energies and the tensor interpolation method results in a Gaussian shaped distribution. A Gaussian shape is expected in this case, since it reproduces the combination of two rectangular distributions and one Gaussian distribution. Illustrations of the distributions obtained with all three methods are available in [10].
-16 - Figure 11. Signal of the wire scanner normalized to the ICT signal over the wire scanner position and over the energy estimated by the SCOFF method, respectively. The dashed curves are smoothed curves based on measurements (mean values) with wobbled and swept beam. A dashed black curve is added which is the result of a measurement with almost closed spectrometer entrance slit. It is used to determine the background signal at smaller scanner positions. The red and orange solid curves result from the red and orange dashed curves when the background signal is subtracted. The solid blue and green curves are Gaussian fits to these resultant curves.

Analysis of the wire scanner signal
Results of measurements are presented in figure 10 and figure 11. Figure 10 is a measurement which was performed by sweeping the beam across a spectrometer entrance slit of 1 mm width. Besides the mean values of the scanner signal at each wire position, the raw data which the means are based on is shown, too. Wobbling the beam gives a similar result and, therefore, an additional figure is omitted.
The mean values in figure 10 are the basis for the appropriate smoothed curve presented in figure 11. In figure 11 there is also a curve given which represents a measurement with a wobbled beam. In addition, a third measurement is shown which explains the offset at the (lower energetic) left part of the curves measured with a slit of 1 mm. When the slit is almost closed (slit width < 0.5 mm), a background signal remains, resulting from low-energy electrons hitting the wire scanner at smaller scanner positions. It is assumed that these are electrons which lost their energy by penetrating the edges of the slit jaws. With a strictly closed slit, the background signal almost vanished (not shown in figure 11). The contribution of slowed down electrons to the wire scan--17 - Table 7. The results of the Gaussian fits for the corrected curves with a 1 mm slit width in figure 11. The values apply to the wire scanner position which defines the particular symmetry point of the distribution.

Curve
x(wire scanner) in mm FWHM in mm Swept curve 340.55 2.77 Wobbled curve 340.57 2.61 ner signal is corrected by subtracting the background signal from the curves which are based on measurements at a 1 mm slit width. The resultant distribution of the wire scanner signal is used for the determination of the electron energy. From this distribution characteristic points have to be defined. Although it is possible to analyse the data file with the measurement results automatically by the algorithm described in section 2.3.1, it was decided to plot the signal distribution and to determine the characteristic points of the distribution manually. This is motivated by the observation that the form of the signal distribution varies, depending on the linac settings and on the method used to move the beam across the entrance slit. Furthermore, an individual assessment of the signal distribution is indicated to determine the related uncertainties more realistically. It is assumed that the distribution is Gaussian-shaped since the linac was designed to produce almost monoenergetic beams with a small energy width. One of the resultant curves is in good agreement with a Gaussian shape. The other curve shows rather a trapezoidal form. Nevertheless, in both cases a Gaussian fit is appropriate to determine the wire scanner positions, which represent the symmetry point of the distribution and the points related to the FWHM. Exemplarily, table 7 contains the respective results of both Gaussian fits and they just differ a little. Taking into account that the resolution of the scanner position is restricted by the scanner step width of about 0.2 mm, the results for both fits are stated identically. Just considering the point of symmetry as an example, the scanner position is accounted for by a value of 341.56 mm. Its uncertainty is assumed as one scanner step width which accounts not only for the restricted resolution of the scanner position, but also for shifts of the scanner position caused by smoothing the signal distribution. This uncertainty is an additional contribution to the uncertainty of the wire position already mentioned in table 4. Compared to this, other uncertainties concerning the wire scanner position are negligible, e.g. the step-by-step variation in the wire step width. The uncertainty of entrance angle and beam divergence given in table 8 is dominantly influenced by the variation of the entrance angle when wobbling or sweeping the beam.
The top abscissa in figure 11, which shows the estimated energy based on the SCOFF method, makes it possible to estimate the width of the whole energy distribution even without making additional calculations. The two energy values corresponding to the half maximum of both Gaussian distributions limit the energy width to about 200 keV, which is less than 1 % of the mean energy.

Determination of the energy and its uncertainty
The data which result from the analysis of the distribution of the wire scanner signal in section 3.2.1 are used as input for the algorithm to determine the energy of electrons. The analysis is restricted to the wire scanner position in the middle of the distribution. Consequently, just an analysis concerning the mean energy is made here. Additional input (magnetic flux density, assumed energy, etc.) is taken from the data file and from measurements with the beam profilers. The associated -18 -

Quantity
Uncertainty Remark Wire scanner position ±400 µm Contains the wire cross-section and uncertainty in its positioning, also considering the analysis of the wire scanner signal Divergence and horizontal entrance angle, altogether ±0.7 • The value results from the uncertainty of the horizontal angle when using beam wobbling or sweeping Magnetic flux density 2e-6 T Corresponds to the standard deviation of the current measurement with the NMR probe Figure 12. Histogram of the calculated energies for the wire scanner position which was determined to be representative of the middle of the distribution of the wire scanner signal in section 3.2.1. A Gaussian fit to the distribution of the energy bins is added to guide the eyes.
uncertainties for the example are listed in table 8. They are considered using the method described in section 2.3.3. The result of the energy calculation is shown as a histogram in figure 12. The calculated mean of the energy distribution is 27.120 MeV. The energy width corresponding to the FWHM is 80 keV in integral bins. Based on this value, the standard deviation is about 34 keV 4 or 0.125% relative to the mean energy. This is a smaller uncertainty than the values given in [3] and [4], for example. 4 FW HM = 2 · √ 2 · ln 2 · σ ≈ 2.3548 · σ , with standard deviation σ .

Summary
For the sake of a an accurate determination of electron energies at PTB's research linac for dosimetry in radiation therapy, an experimental setup for magnetic spectrometry has been installed. A data acquisition procedure as well as a method for the analysis of the data have been established, too. The data analysis is based on the measured distribution of the flux density inside the spectrometer. Because of this specific information, a more correct energy determination is possible as in comparison with an energy determination based on a description of the magnetic flux density by the SCOFF approach or by the method used by RAYTRACE. Both last-named methods overestimated the energy by more than 1%. An innovation is that the evaluation of uncertainty can directly be included in the data analysis process. That way the probability distribution of the energy can be determined and the uncertainty of the energy can be specified. An analysis of data which was measured at the high-energy beamline of the linac for a nominal energy of 25 MeV results in a mean energy of 27.12 MeV with a standard deviation of 0.125%. This is at least by a factor two more accurate than the uncertainty of energy determination for electron beams of radiotherapy energy range stated in [3] and [4], for example. Consequently, the method used for the energy determination at the high-energy beamline of PTB's research accelerator is not only correct in comparison with other methods, but also very accurate. This provides good preconditions for specific research purposes like the benchmark experiment mentioned in the introduction. The width of the whole energy spectrum of the electron beam which is needed for the simulation of the benchmark experiment can already be estimated with the SCOFF method. A width less than 1% of the mean energy for the specific linac setting used in this examination is predicted.