Inelastic electron scattering by the gas phase in near ambient pressure XPS measurements

X‐ray photoemission spectroscopy (XPS) measurements in near‐ambient pressure (NAP) conditions result in a signal loss of the primary spectrum as a result of inelastic scattering of photoelectrons in the gas phase. The inelastic scattering of the primary electrons gives rise to a secondary signal that can result in additional and often unwanted features in the measured spectrum. In the present work, we derive equations that can be used to model the resulting signal and provide equations that can be used to simulate or remove the inelastic scattering signal from measured spectra. We demonstrate this process for photoemission spectra of a wide range of kinetic energies, measured from Au, Ag, and Cu, in a variety of gases (N2, He, H2, and O2). The work is supplemented with an open‐source software in which the algorithms described here have been implemented and can be used to remove the gas phase inelastic scattering signal.


Funding information
Max-Planck-Gesellschaft X-ray photoemission spectroscopy (XPS) measurements in near-ambient pressure (NAP) conditions result in a signal loss of the primary spectrum as a result of inelastic scattering of photoelectrons in the gas phase. The inelastic scattering of the primary electrons gives rise to a secondary signal that can result in additional and often unwanted features in the measured spectrum. In the present work, we derive equations that can be used to model the resulting signal and provide equations that can be used to simulate or remove the inelastic scattering signal from measured spectra.
We demonstrate this process for photoemission spectra of a wide range of kinetic energies, measured from Au, Ag, and Cu, in a variety of gases (N 2 , He, H 2 , and O 2 ).
The work is supplemented with an open-source software in which the algorithms described here have been implemented and can be used to remove the gas phase inelastic scattering signal. In recent years, the use of near-ambient pressure XPS (NAP-XPS) has steadily increased its popularity for research in materials, catalysis, electrochemistry, corrosion, and biomaterials. [1][2][3][4][5][6][7][8][9][10][11][12][13] In a NAP-XPS measurement, a photoemission signal is measured from a sample, while the sample is exposed to a gas atmosphere. Pressures for NAP-XPS measurements typically range from 0.01 up to 100 mbar.
The measured photoelectrons must travel from the sample surface to a photoelectron detector (i.e., through an electrostatic lens system and a hemispherical analyzer, to an electron amplifier and detector), as illustrated in Figure 1. Before the electrons reach the entrance slit of the photoelectron spectrometer, they travel a certain distance (approximately 0.1-1 mm) through a relatively high density of gas molecules, where they can collide with gas molecules and may lose kinetic energy. These inelastic scattering events change the kinetic energy distribution of the outgoing electrons, resulting in a photoemission spectrum with additional background features. 11 While inelastic scattering in solids gives rise to relatively featureless background line shapes-that are often well approximated with the Tougaard universal cross section 14 -the narrow electronic states of molecules give rise to sharp features in the background line shape.
For accurate analysis of sample properties, these features should be corrected for. This kind of correction is especially important when interpreting XPS spectra of broad asymmetric peaks containing complex satellite structures.
In a recent paper, we demonstrated that the electron transport theory implemented in the QUASES software 15 can effectively be applied to remove these effects from the spectrum. 16 In the present work, we use a similar approach and explore the fundamentals of the single and multiple excitation processes in the gas molecules that are responsible for the inelastic background signal, and furthermore, we express the variation of the scattering properties of the gas directly by the gas pressure and temperature. Finally, we derive equations to simulate and remove signal due to inelastic scattering in the gas phase. We provide several examples where the equations have been applied, including gases He, O 2 , H 2 , and N 2 and materials Au, Ag, and Cu. As supporting information, we provide a python-based program that can be used to remove the background signal. 17

| BACKGROUND
The theory needed to model how electron energy distributions change when passing through scattering media has been well established in fields of electron-energy loss spectroscopy (EELS) [18][19][20][21] as well as in the photoemission community 15,[22][23][24][25][26][27][28][29][30][31][32][33][34] for modeling background signals in XPS spectra of solids and thin films. Here, we will derive the equations in the context of electron scattering in the gas phase and derive a relationship between electron energy distribution and gas pressure. Inelastic scattering in the gas phase has essentially the same effect as inelastic scattering through solid thin films, with the exception that, in the gas phase, interface effects and plasmon scattering do not play a role.

| SINGLE AND MULTIPLE ELECTRON SCATTERING AND CONVOLUTION
When an electron travels through a medium consisting of atoms, it can collide with these and transfer some of its kinetic energy to those atoms. In an electron-atom collision, the atoms can absorb energy in various ways, depending on the energy of the colliding electron. In electron spectroscopy, where photoelectrons have kinetic energies typically in the range of 100-2000 eV, the dominant channel for energy transfer is excitations from an occupied low-energy state to an unoccupied state at higher energy.  Figure 2A (red), responds after passing through a scattering medium consisting of hypothetical atoms, having only two states separated by the energy Δ, as shown in F I G U R E 1 Schematic of a near-ambient pressure XPS set-up F I G U R E 2 (A) Kinetic energy distribution of a hypothetical population of free-moving electrons. The red curve is the initial kinetic energy distribution. The blue curve is the distribution after having travelled through a hypothetical scattering medium. (B) The electronic structure of the hypothetical scattering medium, where the black lines represent electronic energy levels, the blue dot represents an electron, the dashed circle represents an electron-hole, and the orange arrow represents the process of electronic excitation. (C) The energy-loss probability function of the hypothetical scattering medium Figure 2B. The incoming electrons have a narrow kinetic energy distribution centered around E 0 . When these electrons travel some path length through the scattering medium, there is a probability that any of these electrons will collide with an atom of the scattering medium and lose energy Δ to excite an electron in the atom to the higher energy state. The probability of transferring a given amount of energy in a collision is described by a probability distribution function, as illustrated in Figure 2C. Note that the probability distribution function in Figure 2C is closely related to various quantities discussed in the literature, such as imaginary part of the negative inverse of the dielectric function, 35 differential inelastic scattering cross section, 30 and differential inverse inelastic mean free path, 25 with subtle differences in meaning. In the present work, we will use the energy-loss function, which is the inelastic scattering cross section versus amount of energy lost. 35 The result of interacting with the scattering medium is that a fraction of the electrons (in this case 20%) lose energy Δ and now appear on the low kinetic energy side of E 0 as shown in Figure 2A  To generalize this model, the gas molecules may have several occupied and unoccupied electron states, and the loss function, which we will denote L(Δ), will have several peaks as shown in Figure 3B.
These will all contribute to the possible energy loss processes, and the line shape of the scattered electron distribution can be constructed by taking the original unscattered electron distribution F(E), scaling by the intensity of the energy-loss function at some point (Δ), then shifting the scaled spectrum by Δ. If one does this procedure, pointby-point, for all points on the energy-loss function, the sum will be the scattered line shape. This gives the energy distribution after scattering one time which we denote I 1 (E): which is the discrete form of a convolution: In the preceding example, we made the implicit assumption that any given electron could only be scattered once when passing through the scattering medium. Of course, when passing through a medium of finite size, electrons may be scattered several times. The energy distribution of an electron population that has been scattered n times would simply be the line shape of the distribution after scattering n − 1 times, convolved once more with the energy-loss function. The result is equivalent to convolving the unscattered line shape with the energy-loss function n times: The resulting line shapes of n convolutions between the primary distribution and the energy-loss function of Figure 3 are shown in F I G U R E 3 (A) Kinetic energy distribution of a hypothetical electron population after having been inelastically scattered by a scattering medium that has an energy-loss probability function shown in (B). The kinetic energy distribution of the electron population prior to scattering is Gaussian shaped and centered at E 0 One can imagine an electron population passing through several infinitesimally thick layers of scattering medium, as depicted in Figure 5A. To be specific, we divide the total thickness t into d layers each of thickness t/d. The inelastic mean-free path (i.e., the mean distance between each inelastic scattering events) is denoted by λ. Then, for an infinitely small layer thickness t/d (i.e., for large d), the probability for an electron to be inelastically scattered once when passing through the layer of thickness t/d is p d = (t/d)/λ while the probability for multiple scattering in a single layer is negligible. The electron must pass through d layers, and the probability of being scattered n times is given by the binomial distribution: Now dp d =t/λ and for d infinitely large, the binomial distribution converges to the Poisson distribution (using the Poisson Limit theorem) where the Poisson parameter Λ = dp d = t λ : Thus, we have a formula to determine the probability of an electron being scattered n times when passing through a medium of thickness t: With Equation 10, we can determine the scaling factors for the convolved line shapes and can now write a formula for the electron distribution after passing through the scattering medium: where J(E) is the measured electron distribution after passing through the scattering medium, F(E) represents the initial electron energy distribution prior to any scattering, and L(E) represents the energy loss function of the scattering medium.
An interesting and fortuitous property of convolution is that convolution in real space is equivalent to multiplication in Fourier space.
This means that we can take the Fourier transform of Equation 11 F I G U R E 4 Kinetic energy distributions of a hypothetical electron population after having been scattered n times, by a hypothetical scattering medium with energy-loss function shown in Figure 3B. n are the numbers indicated in Figure 4 F I G U R E 5 (A) Illustration of a mono-energetic population of electrons, passing through multiple infinitesimal planes of scattering medium. The electrons are represented by colored dots, where the color indicates the number of times having been inelastically scattered (blue:0, orange:1, purple:2, red:3). The probability of being inelastically scattered when passing through a plane of scattering medium is 0.4. (B) Hypothetical kinetic energy distribution of an electron population passing through four infinitesimal planes of scattering medium, where the probability of being inelastically scattered per plane is 0.4 and the energy-loss function is that shown in Figure 3B and re-write it in terms of products instead of convolutions. Denoting j(ν), f(ν), and l(ν) to represent the Fourier transforms of J(E), F(E), and L (E), respectively, we get Equation 14 is a Taylor series and can be re-written as Thus, the measured electron energy distribution would be where F −1 denotes the inverse Fourier transform.
In the context of electron scattering in a gas, we can rewrite Equation 16 as a function of gas pressure. Using the kinetic theory of gases, the mean free path can be written as where σ is the inelastic scattering cross section of the gas molecules and ρ is the volume density of the gas atoms. Using the ideal gas law, ρ can be re-written as and get Now, our equation for the electron energy distribution becomes Equation 20 gives a means to calculate the measured energy distribution, provided we know the primary energy distribution (F(E)), the energy-loss function (L(E)), the inelastic scattering cross section (σ) of the gas molecule, the pressure (P) and temperature (T) of the gas, and the distance (t) from the sample surface to the entrance of the spectrometer. Alternatively, using this equation, one can remove the inelastic scattering background, given the energy-loss function, inelastic scattering cross section, and the experimental parameters P and t.
This can be done using the Fourier-ratio de-convolution technique. 18,20,36 From Equation 15, we obtain an expression for f(ν) and then we take the inverse Fourier transform to arrive at F(E):

| EXAMPLE OF ELECTRONS SCATTERED IN He
Using the model derived above, we will first consider the case of photoelectrons being scattered in Helium gas. Helium is an excellent example, as it is possibly the simplest scattering medium one can imagine. There are only two electrons on the atom, and no inter-atomic bonds, making its energy-loss spectrum rather simple. Figure 6A shows a Au4f spectrum measured in ultra-high vacuum (red), a spectrum measured in 4 mbar He (blue), and a spectrum constructed by convolving, according to Equation 11, the spectrum measured in vacuum with the energy-loss function in Figure 6C, and scaling the convolved spectra by the probabilities calculated using Poisson statistics as given by Equation 10.
Comparing the spectrum taken in UHV with that in 4 mbar He, the intensity of the main XPS peak is seen to drop by about 25% due to scattering by the gas atoms. New features appear in the spectrum at around 1380 eV, as seen in Figure 6A. The loss function in Figure 6C, used to simulate the scattered signal, was determined by first constructing a synthetic spectrum qualitatively similar to published electron impact spectra of He. 37,38 This was then optimized by using a stochastic pseudo-gradient descent algorithm to minimize the difference between the simulated and measured line shapes. 39 The resulting energy-loss function in Figure 6C can be easily interpreted, given helium's simple electron structure. The main peak at 21.2 eV corresponds to a 1s ! 2s transition, the second peak at approximately 23.1 eV to a 1s ! 2p transition, the third peak to several unresolved transitions 1s ! 3s, 3p, …4f and the tail extending to much higher energies is due to ionization, that is, transitions from the 1s state into the continuum of unbound vacuum states. 37,38 The other parameters needed to simulate the scattered spectrum are the temperature and pressure of the gas (T, P), distance (t) between the sample and the first aperture of the spectrometer, and the inelastic scattering cross section (σ). The values of these parameters used to arrive at the fit shown in Figure 6 are T = 298 K, P = 4 mbar, and t = 800 μm while σ = 0.0039 nm 2 was determined by fitting the intensity at the peak energy. Once the energy-loss function and cross section are determined, spectra at other pressures can be simulated by simply changing P. In this case, we also measured at 2 mbar and could successfully reproduce the 2 mbar spectrum by changing P from 4 mbar to 2 mbar.
A plot of the contributions from single and multiple inelastic scattering is shown in Figure 7A. One can see that the main contributions is from electrons that have been inelastically scattered one time, with only a minor contribution from those that have been scattered twice.
This is as expected because in 4 mbar He, the inelastic mean free path for electrons of 1400 eV kinetic energy is approximately 1.8 mm (using σ = 0.0039 nm 2 ), and the distance traveled through the scattering medium in these measurements was 0.8 mm. Thus, plural scattering in this case is a rather rare event. Figure 7B shows the probabilities of scattering n-times for electrons of 1400 eV in various pressures of He, for a path length of 0.8 mm.
To verify that this approach can work at other pressures, we measured a spectrum at 25 mbar. To reach this pressure, we needed to change to a smaller first aperture (i.e., nozzle). The data at 4 mbar were measured with an 800-μm nozzle, at a sample distance of 800 μm, and the data at 25 mbar was measured using a 300-μm nozzle, and a sample distance of 300 μm. Thus, the parameters used to simulate the spectrum at 25 mbar were T = 298 K, P = 25 mbar, t = 300 μm, and σ = 0.0039 nm 2 . Note that the 300-μm distance gives rise to a different distribution between multiple scattering than shown in Figure 7B.
The measured and simulated spectra are shown in Figure 8. Here, one can see that at 25 mbar, plural scattering becomes significant.
The feature arising from Au4f electrons being scattered twice in the gas phase can clearly be seen (the feature at kinetic energy 1360 eV). The perfect fit in the enlarged plot of the energy loss range in Figures 6B and 8B demonstrates that the convolution and  Let us conceptually divide the energy loss function into two parts: features from onsite excitations, that is, excitations between two states localized on an atom (such as peaks A, B, and C in Figure 6C) and features from ionization (i.e., feature D in Figure 6C). The onsite excitations give rise to the fine structure in the inelastically scattered spectrum, while ionization gives rise to the majority of intensity loss. 40 The line shape of the onsite excitation features varies little with the electron kinetic energy, for kinetic energies greater than 100 eV.
Thus, the line shape if this region of the loss function can be reused to fit spectra from wide range of kinetic energies. In contrast to onsite excitation, ionization does not strongly influence the line shape of the fine structure in the inelastically scattered spectrum. It does, however, where the factor η accounts for the fact that not all of the primary signal intensity that was lost is accounted for by the modelled energy-loss function. Figure 9B shows the measured and simulated Cu2p spectra with η = 0.64, and the fit is very good. The rescaling factor is more thoroughly explained in the supporting information, but effectively, it indicates what fraction of the total inelastic scattering cross section we were able to model with our synthetic energy-loss function.

| OTHER GASES (H 2 , N 2 , AND O 2 )
While the case of inelastic scattering in He is an instructive example, it is seldom used in NAP-XPS experiments, so we have also investigated some more commonly used gases, namely, H 2 , O 2 and N 2 . Figure 10 shows Ag4d XPS spectra measured in H 2 , N 2 , O 2 , and He. It is seen that each gas results in a different fine structure in the inelastic scattering background signal. This observation is to be expected, given that each molecule has a distinct valence electronic structure.
The spectra with and without gas phase scattering were used to approximate the energy-loss function of each gas, as shown in Figure 11. To obtain these, we first estimated the energy loss functions from electron-impact spectra published in the 1960s. 37,38,[43][44][45][46][47] In doing so, we used a combination of Gaussian, Lorentzian, and the Universal Tougaard 14 line shapes. These synthetic line shapes turned out to be very good estimates, and they were further refined using a stochastic pseudo-gradient descent algorithm to get the best fit of the simulated spectra to the experiment.
From the determined loss functions in Figure 11, we see that the molecules with higher number of valence electrons (i.e., N 2 and O 2 ) have rather complex energy-loss functions. Furthermore, diatomic molecules (i.e., H 2 , N 2 , and O 2 ) have vibrational fine structure that cannot be resolved in the line shapes shown here and appears in these line shapes as broadening. The vibrational fine structure can be seen in examples from previous literature of electron impact spectra. 36,42 The line shapes shown here were found to be relatively robust in the sense that they could be reused to simulate the gas-phase inelastic scattering signal for many photoemission spectra. To do that, one only needs to adjust the inelastic scattering cross section σ, and in some cases, the rescaling factor η, to accurately simulate the mea- temperature. Cross section, on the other hand, has particle density factored out, so that it does not depend on pressure and temperature.
In general, the workflow to determine the parameters for fitting/ removing gas phase signal are as follows: 1. Measure a spectrum with and without gas phase present, keeping all instrument settings constant, and using a sample that will not change when exposed to the gas phase.
2. Use the algorithms set-out here and enter the known experimental parameters (i.e., pressure and distance) and use η = 1 for the rescaling factor.
3. Construct a trial energy-loss function and convolve the loss function with the spectrum measured in vacuum. Compare the resulting spectrum with the spectrum measured in gas.
4. Adjust the inelastic scattering cross section σ so the intensity of the main (i.e., zero-loss) peak of the simulated spectrum is the same as the intensity of the zero-loss peak of the spectrum measured in gas.
5. Optimize the loss function by tuning peak position, width and intensity, such that the most pronounced features of the spectrum measured in gas phase are reproduced.
6. If necessary, tune the scaling factor η to fit the intensity far away from the zero-loss peak.
Once this procedure has been completed, and the parameters have been determined for a given kinetic energy range, it can be used to remove the gas phase background signal for a real case, where the gas interacts with the surface atoms, although some fine tuning of parameters may still be warranted, depending on how well the parameters and loss function were optimized for the test spectra.
Here, we show an example of a spectrum measured in the presence of gas, where the features caused by inelastic scattering in the gas can be removed. Figure 13 shows Co2p spectra measured of  1 The model uses a single number for distance travelled through the scattering medium. Actually, electrons will travel a distribution of path lengths, depending on the size of the nozzle and its acceptance angle, as illustrated in Figure 14A. Here, L samp is the distance between the sample and nozzle, D nozz the nozzle diameter, D spot the diameter of the illuminated spot on the sample, and θ the nozzle's acceptance angle. We see that an electron traveling at an angle of 0, relative to the nozzle axis, will travel a distance L samp to the nozzle, while an electron traveling at an angle θ to the nozzle axis, will travel a distance D samp. /cosθ. Furthermore, the path length traveled by the electron can increase due to possible angular deflections.
This effect turns out to be rather small and we found that it can be accurately corrected for by replacing the distance t by an average value L avg which is slightly larger than L samp (see Figure 15).
To evaluate the effect, we have used a Monte Carlo simulation to calculate the distribution of path lengths of electrons traveling through a gas phase, from a sample to a nozzle, where angular deflection was taken into account, as well as the change in scattering cross section as a function of kinetic energy. These calculations are published elsewhere. 49 Shown in Figure 14B Figure 14C), we see that a small error is introduced by ignoring the path length distribution and assuming that all electrons travelled the length L samp . While, the deviation in the present case is small, it becomes larger as pressure increases and also depends on all other parameters shown in Figure 14A. We have found that using the average path length, from the distribution shown in Figure 14B, one can very effectively correct for the error. However, the average path length depends on L samp. , D spot , D nozz , and θ. If one sets  In addition to inelastic scattering, electrons can also be elastically scattered by gas molecules along their path to the nozzle. When an electron collides elastically with an atom, it can change its direction of travel. While this is also true for inelastic scattering, the angular deflection upon elastic scattering is much more substantial than for inelastic scattering. As a consequence of the deflection, an electron that may have initially had a trajectory that would lead it into the nozzle, might, after collision, be deflected away from the nozzle.
Consequently, elastic scattering gives rise to a loss in total signal.
The precise amount of signal lost is a function of gas pressure, differential elastic scattering cross section, sample-nozzle distance, acceptance angle, X-ray spot size, and nozzle diameter, and is not trivial to calculate.
However, under the conditions one would typically use for NAP-XPS measurements, that is, under circumstances where scattering in the gas phase is minimized to the point where one can still obtain a useful XPS spectrum, the signal loss due to elastic scattering is quite low. For instance, using a sample-nozzle distance, X-ray spot diameter and nozzle diameter of 0.5 mm, in 5 mbar of He, the amount of signal lost due to elastic scattering would be 0.3%. In contrast, using the same configuration, but with a pressure of 30 mbar, the signal lost due to elastic scattering would be approximately 2%. These numbers were obtained using Monte Carlo simulations and are described in more detail in the supporting information.
In general, most NAP-XPS measurements would be performed under circumstances where losses from elastic scattering would be negligible.

| EXPERIMENTAL
All spectra presented in this work were measured using a Phoibos NAP-150 hemispherical analyzer from Specs GmbH. The nozzle used to separate the sample environment from the electrostatic lens system had a diameter of 0.8 mm in cases where the pressure was <5 mbar, and 0.3 mm in cases where the pressure was >5 mbar. The distance from the sample surface to the entrance aperture of the nozzle was always set to be equal to the nozzle diameter. Samples were sputter cleaned using argon ions (at 3 kV, a pressure of 1 × 10 −5 mbar, and an emission current of 10 mA, for 15 min), to remove adventitious carbon and any surface oxides. During XPS measurements where gas phase was present, gas was leaked into the sample chamber using a mass flow controller, and pressure was held constant during measurement by means of a throttle valve. The throttle valve controls the pumping cross section of a differential pumping stage. Pressure was measured using a diaphragm capacitance pressure.

ACKNOWLEDGEMENT
Open Access funding enabled and organized by Projekt DEAL.