Electron contamination suppression in transmission detectors for radiotherapy

Objective. Higher energy and intensity radiotherapy beams are being used, in part, due to the increased spatial accuracy of treatments. However, higher intensity beams can result in a larger total dose error, motivating the increasing need for real-time dose monitoring. We are developing a thin, real-time upstream monolithic active pixel sensor based system for beam monitoring with excellent precision on measuring the beam shape. Here we present a method to additionally provide dosimetry by adding thin conversion material in strips to the surface of the detector, a grating structure. Approach. By modulating the thickness of the conversion material to minimally disturb the contamination electron signal while enhancing the photon signal, the difference in these signals can be used to extract a photon-only signal, and hence dose. The simulation software Gate, based on Geant4, is utilised to study whether well functioning gratings can be better made from aluminium or copper and to optimise the thickness of a copper grating. Main results. It is possible to enhance the photon signal by a factor 6.7 (7.7) compared to the bare sensor for a 5.8 (6.7) MV beam, without modulation of the signal due to beam electrons. Significance. The grating can be used to perform dosimetry in real-time using a thin upstream detector.


Introduction
Radiotherapy is an essential part of cancer care, being used in almost 50% of all treatment plans and 40% of curative treatments in the UK (Public Health England 2017).It has been shown that treatment outcomes can be improved by using shorter and more intense x-ray beams (Chinsoo Cho et al 2013), made possible by the increased precision of intensity modulated radiotherapy (IMRT) and volumetric arc therapy (VMAT).In these therapies, the x-ray beam is dynamically shaped by a multileaf collimator (MLC) system which can have up to 160 thin collimator leaves.The treatment is administered from different angles to the patient to minimise dose to healthy tissue and maximise dose to the tumour.The use of more intense and/or higher energy x-ray beams means that if a fault were to occur in the machine and the wrong treatment were administered, the impact on the patient would be greater.Hence, monitoring treatments in real time is highly advantageous for patient safety.Transmission detectors monitor the beam upstream from the patient.Hence they can obtain a clear image of the collimated beam shape before the beam is scattered in the patient.
The beam predominately consists of x-ray photons which have a small interaction probability in a thin solid state detector.Additionally, contamination electrons are generated mainly by the photon interactions in the treatment head of the linear accelerator (LINAC) and the air.Although there is a smaller flux of electrons incident on the detector than photons, they have a larger interaction probability in the detector.In order to measure dose, typically x-ray detectors use a thick build up layer of material, which causes a large fraction of the treatment photons to Compton scatter electrons out of the material which can then be detected.This amplifies the signal detected from the x-ray beam whilst also having the advantage of stopping a fraction of contamination electrons, reducing this signal.However, thick build up layers absorb too much of the treatment beam, increase skin dose from the generation of secondary electrons, and shift the energy spectrum of the beam and this affects the dose depth profile.Accurate modelling in Monte Carlo of a treatment beam including beam electrons is complicated with long computing times (Brualla et al 2017).In order to use a transmission detector without altering the prescribed treatment or needing it to be re-planned, clinicians require that it attenuates the beam by <1%, therefore thick conversion layers are not feasible for in vivo upstream beam monitoring.This also ensures that the skin dose is minimally affected.
In order to monitor the dose delivered to the tumour volume in real-time, both the positions of the MLC and the intensity of the x-ray beam must be determined.We have previously shown that using a Lassena MAPS, see section 1.2, leaf position resolutions between 60.6 ± 8 and 109 ± 12 μm were achieved with conventional edgeextraction algorithms using 0.3 s of treatment beam time while the sensor was placed at an SSD of 85 cm (Pritchard et al 2021).Leaf position resolutions less than 100 μm were achieved using single data frames, 0.03 s of data, using an r-UNet machine learning algorithm (De Sio et al 2021).The design and performance in terms of leaf position resolution and attenuation of a full-scale upstream MAPS-based verification device for radiotherapy has been presented in (Velthuis et al 2023).A radiation test has shown that sensor can operate well for ∼2 years of normal clinical operation with cooling and about 1 year without cooling (Pritchard 2023).
Here we present a method for dosimetry using a very thin layer of conversion material in strips of two thicknesses, producing a grating pattern (International patent granted 2018), as shown in figure 1, to maintain a very low attenuation.This has been shown to work as a proof-of-principle experiment previously in Beck et al (2020).It is key to pick a type of material with appropriate thickness to minimally change the signal from the electron contamination, whilst causing a larger change in the photon signal, between thicker and thinner strips in the grating.Then by subtracting the energy deposits in the sensor under a thicker part, S high , of the grating from a thinner part, S low , we can obtain a signal, S grating , which comes predominantly from the treatment photons.

Monolithic active pixel sensor
Monolithic active pixel sensors (MAPS) can be used to detect the signal generated from the photons and contamination electrons.MAPS are pixelated silicon sensors developed for high energy physics applications.They consist of a heavily p-doped silicon carrier wafer (bulk) on top of which a lighter p-doped epitaxial layer is grown.Electron-hole pairs, generated by charged particles traversing the sensor, are confined in the potential well between the bulk and epitaxial layers.Without an external voltage, they diffuse to the depleted zone under the diode.The amount of collected electrons affects the gate voltage of the source follower and hence the current when the select switch is opened.MAPS have in-pixel amplification and the sensor readout is integrated into the top (passivation) layer of the sensor ( m 10 m ( )  ), hence no external readout board is required.The epitaxial layer is typically between ∼2 and ∼20 μm thick.The bulk of the wafer may be thinned from the back without a loss of signal-to-noise as only the first few microns are required to generate the built-in bias voltage.The sensor can be made to be less than ∼30 μm thick and hence will attenuate the beam by =1% (Velthuis et al 2023).These properties mean that MAPS are suitable for in vivo dosimetry as we can image the beam in real time without disturbing the treatment to the patient.Figure 2 shows a schematic drawing of a three transistor (3T) MAPS.

Lassena sensor
In this work we have simulated the Lassena MAPS (Sedgwick et   Velthuis et al 2023).It has 2800 × 2400 pixels that are 50 × 50 μm 2 , making it 12 × 14 cm 2 .It is 700 μm thick but can be thinned as discussed in section 1.1.The Lassena is 3-sides buttable and hence can be tiled in a 2 × N configuration.

Simulation
The Elekta Precise linac head was modelled using Gate v8.2 (Jan et al 2004), a software package based on Geant4 (Agostinelli et al 2003) (using v10.5.1).The simulation was split into three main phases: • Phase 1 where the stationary elements of the LINAC head are modelled, from the initial electron beam hitting the tungsten target generating the x-ray photons and going through stationary collimators.Phase spaces of particles approaching Phase 2 (moving collimators) were saved.
• Phase 2 where the output particles from Phase 1 are propagated through the subsequent moving parts including the jaws and MLC.This simulation phase can be repeated for different treatment fields.
• Phase 3 where particles from Phase 2 were propagated through different materials on the upstream face of the Lassena sensor.For each particle the energy loss is calculated along its trajectory and the total energy deposited in each layer saved.
The phases of the simulation are described in more detail below.

Phase 1
Phase 1 only needs to be simulated once per beam energy as these elements of the LINAC head will not move for different treatments (as we are only considering treatments with a flattening filter present).The elements simulated are the target in its holder, primary collimator, ion chamber, back scatter plate and mirror.This part of the simulation was modelled on the work in Grevillot et al (2011).The positions and momentum directions of the photons and electrons were saved separately in a plane, Phase Space 1 (PS1), indicated on figure 3. A total of 37.5 million photons were generated.The physics list 'emstandard_opt3' was used.Physics cuts of 0.5 mm were used for all volumes excluding the world where it was set at 1 mm.A Gaussian electron beam with a width of σ x = σ y = 1.274 mm was generated along the Z axis towards the target.Many treatments are delivered using a 6 MV beam.As the beam energy can vary between LINACs, two beam energies were studied, one at the low end of the range (E = 5.8 MV, σ = 0.074 MV) and one at the high end (E = 6.7 MV, σ = 0.077 MV).

Phase 2
The photons from PS1 were propagated though the tungsten MLC and jaws as indicated in figure 3. Again the physics list emstandard_opt3 was used.A cut of 0.001 mm was applied to the MLC and jaws and 1 mm to the world.Particles entering more than 2 mm in to the MLC are killed to save compute time.A small simulation was performed which showed this reduced the number of photons by less than 1%.The MLCs and jaws are positioned to give 10 × 10, 20 × 20, 30 × 30 and 40 × 40 cm 2 fields at isocenter.
Again photons and electrons are saved in a second phase space plane (PS2) for each field configuration.The electron distributions predominantly consist of electrons Compton scattered from the beam photons in the air and the collimators.A 10 × 10 cm 2 field is shown in figure 4 where it can be seen that the photon field has sharp edges defined by the MLC and jaws.Comparatively, the electrons are more widely distributed.The spread in the Y direction is larger because the Y jaws are further from the sensor than the X jaws, allowing more spread of the electron field in that direction as they scatter through the air.
The impact of a grating structure will depend on the energy of the electrons.Figure 5 shows that there is a change in the electron energy distribution as the field size increases and it becomes more dominated by electrons being Compton scattered in the air rather than the jaws.
The angle with which an electron or photon traverses the sensor will affect the amount of deposited energy (or in the case of the photon the probability of it interacting).A large angle from the perpendicular means a larger path length through the sensor and the grating.Given that the pixel pitch is much, much larger than the epilayer thickness, this mainly results in additional signal and not in significant smearing of the grating induced signal.The photon beam is approximately a cone beam.The angular distributions of electrons are more complicated due to scattering in the air and in the components of the LINAC The difference in these distributions may influence whether to align the grating along the X or Y axis.It can be seen from figures 6(a)-(d) that the photon beam is indeed conical as the angle |θ X | q Y (| |)increases as |X|(|Y|) increases.There is no difference in X and Y as expected.It can be seen that the electrons distributions follow the general shape of the photon distributions but they are a lot more diffusely spread due to scattering.The electron distributions differ in X and Y due to the different heights of the X and Y jaws as seen in figure 3. The distribution of energy deposited by electrons in X and Y will be due to a combination of the angular distribution of the electrons and the flux at each point.It has been shown in Beck et al (2020) (figures 13 and 14) that the angle of incidence of the electrons impacts the signal generated at the edges of the grating, putting a limit on the pitch of the grating.

Kernel density estimation for generating larger phase space files
Large particle phase spaces can be time consuming to generate using Gate especially since the processes of interest have small cross sections relative to other processes in the simulation.Hence, once a suitably large sample of particles have been simulated, one can learn the form of the phase space and generate more particles.The method chosen for this was kernel density estimation (KDE).The 'gaussian_kde' method was used from the Scipy (Virtanen et al 2020) stats package.Five variables were used to train the KDE to learn the phase space characteristics: positions X and Y, the energy, E, and the directional cosines, dX and dY.The Z position is fixed as the position of the phase space plane.As the directional vector is normalised to 1, the dZ directional cosine is redundant and can be calculated using equation (1) A scalar bandwidth of 0.1 was used as this reproduced the input variable distributions well without overfitting.The training and generated datasets are shown in figure 7 for the X position variable for photons (top), electrons generated from photons in PS2 (middle) and electrons from PS1 propagated through PS2 (bottom).It can be seen in figure 8 that electrons from PS1, have a smaller angular range than electrons scattered from volumes in PS2 as they have been collimated by the jaws and MLC.

Phase 3 2.3.1. Selection of grating material
The main interactions for the photons to produce signal are Compton scattering, with a cross section proportional to Z, and pair production, with a cross section proportional to Z 2 .The signal due to electrons is more or less constant as a function of Z (For details see Workman et al 2022).As such a preferred material has a thin layer of a not too low Z material to keep the signal enhancement large but not to increase the attenuation too   much.Aluminium, with a Z = 13, and copper, with a Z = 29 were chosen to prove that the concept can work and to study the differences between a lower and higher Z material.The sensor was replicated as a 25 × 25 cm 2 wafer of silicon in simulation, with a 700 μm bulk wafer with a 7 μm epitaxial layer and a 7 μm passivation layer made of silicon dioxide.The candidate grating was simulated as a continuous piece of material on the surface of the sensor.Thicknesses between 1 and 400 μm were tested.From this information, any two thicknesses of grating can be compared, and how it may vary across the field.The physics list 'emstandard_opt4' was used for more accurate electron tracking in the thin materials close to the sensor.A physics cut of 0.01 μm was used in the candidate grating material.The electrons and photons generated from PS2, in section 2.2.1, were propagated through the grating and sensor in the simulation.The energy deposited in the epitaxial layer after traversing the supplementary material is shown in figure 9 for a range of supplementary material thicknesses.The response depends on both the atomic number, Z, and the density of the material.We want to optimise the percentage increase in the detector response to photons with respect to electrons, hence having a minimal change in the signal generated from contamination electrons between two grating thicknesses.The square of the energy deposits is also saved in order to combine simulation output files, using the sum of the energy deposits and sum of the squared energy deposits to calculate the variance using the standard formula for uncorrelated variables.The photon signal increases as expected with thickness due to the increased Compton scattering in the material and hence electrons depositing energy in the epitaxial layer.Eventually this distribution plateaus as the increase in Compton scattering is matched by the Compton scattered electrons being stopped in the material.The signal from background electrons increases initially as secondary electrons are knocked out of the material but as the thickness increases more low energy electrons are stopped in the material, decreasing the signal.The ratio of electrons to photons has been tuned using experimental data, in Beck et al (2022), taken using the Lassena detector, with no conversion material on top, as 790 analogue-to-digital units (ADU) for photons and 1900 ADU for electrons, giving a ratio of 2.4 times more signal from electrons than photons.
It is also advantageous to keep the supplementary material thinner as thicker material will cause more scattering of electrons across the peaks and troughs meaning they would need to be further apart.Thinner gratings mean the dose can be deduced with a finer spatial granularity.Therefore only copper will be studied further.

Optimising thickness of copper grating
The energy deposited in the epitaxial layer by contamination electrons is shown in figure 10 (top) for two initial beam energies, 5.8 and 6.7 MV.As expected it can be seen that the signal increases for the first ∼30 μm as delta knock-on electrons are generated.Once transient charged particle equilibrium is achieved for the contamination electrons, a linear fit is made two these two distributions in figure 10 (top) in the tails from 100 to 400 μm.
For small thicknesses, less than ∼134 μm for a 6.7 MV beam, there are two thicknesses of foil that result in the same energy deposited by the electrons or in other words, any two points, or thickness of the copper grating, in figure 10 (top) with the same energy deposit will result in minimal modulation of the electron signal by a grating.The energy deposited by the x-ray photons interacting with the grating and sensor are shown in The energy deposited by the x-ray photons increases monotonically with the foil thickness.It is clear that the largest increase in photon signal for the minimal modulation of the electron signal will be when using a grating with 0 μm, or no copper covering the sensor, and the thickness of copper intersected by the horizontal red line in figure 10 (top).Therefore the thickness of copper at which the electron signal is unmodulated with respect to the bare sensor is 102 μm or the 5.8 MV beam and 134 μm for the 6.7 MV beam.By inserting the optimal thickness for minimising the modulation of the electron signal into equation 2 and dividing by the result forx = 0, we can obtain the factor by which the photon signal would be enhanced by this thickness of copper.This results in a factor of 6.7 (7.7) increase in signal over the bare sensor for the 5.8 (6.7) MV beam, for the respective thickness of copper for which there is zero modulation of the contamination electron field.
For the uncovered sensor, the electron signal is 2.4 times greater than the photon signal, as given in section 2.3.1.For an ideal grating, S grating is zero for electrons, although, the electron energy and angular spectrum will change depending on the field shape.
If we consider that instead of the electron signals for S grating cancelling perfectly, that there is a ±5% deviation in the signal under the extra material.Hence, instead of having 1900 − 1900 = 0 MeV we have 1900 − 1805(1995) = ±95 MeV, this still only amounts to 2.1 (1.8)% of S grating for photons at 4516 and 5305 MeV, respectively.As can be seen in figure 10(top), a ±5% deviation in the energy deposited, corresponds to a shift in energy spectrum from the low to the high beam spot energy, for either of the chosen grating thickness of 102 and 134 μm.Hence this encapsulates a large shift in the electron energy spectrum.
This result shows a significant reduction in the proportion of energy deposited in the detector from contamination electrons even if the signals under the grating do not exact cancel out, making the method quite robust to small variations in the contamination electron beam.These results are summarised in table 1, where the final entry shows that if the grating were substituted for a continuous flat conversion layer of the same thickness, the electron contamination from this flat signal (rather than taking the difference between S high and S low ) would be more than ten times larger.This shows that using a grating gives a superior reduction in comparison to a flat conversion material, for the same amount of beam attenuation.

Conclusion
With the trend towards more intense x-ray radiotherapy beams, real-time verification is becoming more and more important.Transmission detectors are ideally suited for this as they monitor the beam upstream the patient.Transmission devices need to be very thin, with less than 1% attenuation, to avoid having to recalibrate the machine and replan the treatments.Verification requires measurement of the beam shape and the dose.Measuring MLC leaf positions, and thus the beam shape, with great accuracy has been demonstrated before.Here a solution is presented for the dosimetry challenge based on a grating of thin copper strips, allowing the photon signal to be extracted from a transmission detector with minimal disturbance to the beam.Gate simulations were used to study the potential of a grating made from a low Z material (Aluminium)and a higher Z material (Copper).The x-ray photon signal enhancement for aluminium is quite small.However, the results presented here show that for a copper grating with a thickness of 102 (134) μm copper for a 5.8 (6.7) MV beam, the signal due to contamination electrons for the uncovered part of the sensor is the same as for the part covered by the copper, while the signal due to the x-ray photons is increased by a factor 6.7 (7.7) for the 5.8 (6.7) MV Table 1.Ratio of energy deposited in epitaxial layer by contamination electrons with respect to the energy deposited by electrons comptonscattered by the photon field in the sensor for; an uncovered sensor, 102 (134) μm of a copper conversion material grating on the sensor surface for a 5.8 (6.8) MV beam, an ideal grating, a grating for which the electron signal is ±5% different than expected, and lastly a flat conversion layer of copper.

Sensor configuration
Ratio of e-energy deposits Uncovered 2.4 Ideal grating 0 Grating e-signal modulated by ±5% 0.021 102 (134) μm flat Cu for 5.8 (6.8) MV 0.35 (0.31) beam.Thus by comparison of the signal below the copper and the uncovered part, the signal due to x-ray photons can determined.Our results show a significant reduction in the proportion of electron contamination electrons to signal photons from 240% to 2.1%.Thus calibration of the x-ray signal detected by this upstream detector will allow real-time monitoring of the dose delivered to a patient.

Figure 1 .
Figure 1.Sensor layers with grating structure on top (not to scale).Photons will generate electrons in (a) the sensor, (b) the grating and (c) air/LINAC.Reproducedfrom Beck et al 2022.The Author(s).CC BY 4.0.

Figure 2 .
Figure 2. Schematic cross section of a monolithic active pixel sensor (left) and the in-pixel circuitry of a standard 3T MAPS device (right).The p++ substrate layer can be thinned to <30 μm.Reproduced from De Sio et al 2021.CC BY 4.0.

Figure 4 .
Figure 4. Position phase space of photons (top) and electrons (bottom) after the jaw for a 10 × 10 cm 2 field.The colour bar represents the number of particles passing through the plane.

Figure 6 .
Figure 6.Angle versus position distributions for a 10 × 10 cm 2 field.The colour bar represents the number of particles passing through the plane.(a) Angle θ X versus X position after the jaws for photons (left) and electrons (right).(b) Angle θ Y versus X position after the jaws for photons (left) and electrons (right).(c) Angle θ Y versus Y position after the jaws for photons (left) and electrons (right).(d) Angle θ X versus Y position after the jaws for photons (left) and electrons (right).

Figure 7 .
Figure 7.A KDE was used to learn the form of the particle phase spaces.The training data (red) versus the generated data (blue) is shown the distribution in X for 10 × 10 cm 2 field for photons (top), electrons generated from photons in PS2 (middle) and electrons from PS1 propagated through PS2 (bottom).All distributions are normalised to have an area of 1.

Figure 8 .
Figure 8.A KDE was used to learn the form of the particle phase spaces.The training data (red) versus the generated data (blue) is shown the distribution in dX for 10 × 10 cm 2 field for photons (top), electrons generated from photons in PS2 (middle) and electrons from PS1 propagated through PS2 (bottom).All distributions are normalised to have an area of 1.

Figure 9 .
Figure9.Energy deposited in epitaxial layer versus thickness of grating material for photons (g) and electrons (e) in copper and aluminium.The uncertainties are too small to be seen.

Figure 10 .
Figure 10.Energy deposited in epitaxial layer versus thickness of copper for contamination electrons (top) and photons (bottom).The horizontal red line in the top figure indicates the signal intensity when the thickness of the grating is 0 μm.The uncertainties are too small to be seen.
al 2013), which we previously used for our experimental tests (De Sio et al 2021, Pritchard et al 2021, Beck et al 2022, Pritchard et al 2022, Pritchard 2023,