X-ray beam monitoring and wavelength calibration using four-beam diffraction

A novel scheme based on four-beam diffraction is illustrated for accurate calibration of X-ray photon energies and real-time monitoring of two-dimensional beam positions of modern synchrotron light sources.


Introduction
X-ray diffraction from crystals is generally based on Bragg's law of two-beam diffraction (2BD), 2d sin = , where is the Bragg angle, is the X-ray wavelength, and d is the spacing of the diffracting lattice planes. If can continuously vary, Bragg diffraction may occur at any angle 0 < 90 with no special points (DuMond, 1937). Without references, therefore, it is challenging to use Bragg diffraction to accurately calibrate/ measure X-ray wavelengths (photon energies) or beam directions since it is usually difficult to measure with very high precision. As an alternative, X-ray absorption edges of elements have been widely used for wavelength calibration, particularly for double-crystal monochromators (DCMs) of synchrotron beamlines. For elements with sharp absorption features, the absorption method may give high energy precision (at the eV level or better) (Kraft et al., 1996). In some unfavarouble cases, however, the absorption edges can be very wide (up to a few tens of electronvolts) (Keski-Rahkonen & Krause, 1974) without clear sharp features. This may make it difficult to achieve adequate precision so that one has to seek other alternatives.
The other disadvantage of Bragg diffraction is that it is only very sensitive to the incidence angle but insensitive to the lateral ' angle along the direction perpendicular to the plane of incidence (the plane containing both the principal incident wavevector and the diffraction vector). In other words, Bragg's law of 2BD is mainly a one-dimensional (1D) equation that is unable to generate two-dimensional (2D) diffraction patterns required for precise determination of the 2D position and direction of an X-ray beam in space.
To overcome these problems, it has been proposed to use multiple-beam diffraction to calibrate photon energies (e.g. Arthur, 1989;Hagelstein et al., 1992). However, these methods as well as many other existing multiple-beam diffraction methods involve wide-range È-scans that have extremely low ISSN 1600-5775 resolution because the lateral beam divergence is generally much larger than the divergence along the angle for conventional X-ray sources. The fourth-generation synchrotrons (e.g. Pacchioni, 2019) and X-ray free-electron lasers (XFELs) (e.g. Emma et al., 2010) with small 2D source sizes that can produce X-ray beams with high 2D collimation are expected to remove this obstacle. Motivated by the phasespace (1D) beam position monitor system based on element K-edge absorption (Samadi et al., 2015(Samadi et al., , 2019a, here we propose a new scheme that can accurately monitor 2D source positions and directions and at the same time can calibrate the wavelengths of the X-ray beams. This scheme is based on forbidden-reflection four-beam diffraction (4BD) from crystals with cubic structures, which has to be activated by a unique photon energy and a unique beam direction. For a point source, the 4BD pattern is an X-shaped cross that can be generated by imaging without rocking the crystal. Therefore, this unique property may be used for real-time monitoring of beam positions. The 4BD method will be particularly suited for diagonstic applications of modern synchrotron light sources, XFELs, and nano-focused beams that have small 2D source sizes.

Four-beam diffraction patterns and properties
To demonstrate the concept, we study 4BD using silicon 000=006=113=1 " 1 13 reflections 1 with the lattice constant a 0 = 5.431 Å . For a synchrotron X-ray source, this diffraction process can be activated by restricting the incident beam in the plane parallel to the (010) lattice plane, as shown in Fig. 1(a). Then one changes the incidence angle while keeping the incidence wavelength to satisfy the Bragg condition of the g 1 = h 1 k 1 l 1 = 006 reflection, For specific wavelengths, some reciprocal lattice points may also fall on the Ewald sphere of reflection 006. Under this condition, multiple-beam diffraction occurs (Chang, 2004;Colella, 1974). For example, if the reciprocal lattice point h 2 k 2 l 2 = 113 is on the Ewald sphere [ Fig. 1(b)], it is obvious that the angle between its diffraction vector g 2 = h 2 k 2 l 2 = a À1 0 ðh 2x x þ k 2ŷ y þ l 2ẑ zÞ and the incident wavevector K 0 = À1 ðcos x x À sin ẑ zÞ is /2 + 113 , i.e.
where 113 is the Bragg angle of reflection 113 satisfying 2a 0  (3). We denote this angle by 4B . The corresponding photon energy is E 4B = 10.5236 keV. By symmetry, the 1 " 1 13 reciprocal lattice point is also located on the Ewald sphere when K 0 lies in the (010) plane. Therefore, under these conditions, Fig. 1 represents a 4BD configuration involving reflections 000, 006, 113 and 1 " 1 13 (Huang et al., 2014a,b), and we call g 1 = 006 the main reflection.
Here we are only interested in the diffraction intensity of the main reflection 006 along the K 1 direction in Fig. 1. This implies that the experimental 4BD setup will be almost identical to that of 2BD, where one sets the detector to collect only the main reflection intensity. The intensities of the other two reflections g 2 = 113 and g 3 = 1 " 1 13 are usually of no importance. The only difference is that 4BD requires a highresolution ($ 1 mrad) rotation stage for accurate control of the azimuthal angle È in Fig. 1, while in 2BD the diffraction pattern is invariant with È for symmetric reflections.
Another interesting property of multiple-beam diffraction is that some of the involved reflections can be forbidden reflections. For the 000=006=113=1 " 1 13 4BD case, the main reflection 006 of silicon is forbidden, but it can still produce strong diffraction along the K 1 direction in Fig. 1. The underlying mechanism is that the diffraction intensity along K 1 comes from two detour reflection channels in Fig. 1(b). In one channel, the incident beam is first diffracted by g 2 , i.e. K 0 + g 2 = research papers 160 Huang, Shi and Assoufid X-ray beam monitoring using four-beam diffraction   1 13 4BD configuration. (a) Diffraction geometry of the 006 main reflection in real space with the plane of incidence parallel to (010). K 0 is the incidence wavevector, and K 1 is the 006 reflection wavevector. The dashed circle indicates the diffraction cone of g 1 formed by rotation of K 0 and K 1 around g 1 . (b) The Ewald sphere in reciprocal space. The four reciprocal lattice points 000, 006, 113 and 1 " 1 13 are all on the Ewald sphere. g 1 = g 2 þ g 0 2 = g 3 þ g 0 3 .
K 2 . Then this diffracted wave is further diffracted by g 0 2 = g 1 À g 2 = " 1 1 " 1 13 to produce a diffracted wave with wavevector K 1 , i.e. K 2 þ g 0 2 = K 1 . Similarly, the other channel consists of the two steps K 0 + g 3 = K 3 and K 3 þ g 0 3 = K 1 , where g 0 3 = g 1 À g 3 = " 1 113 (Huang et al., 2014a,b). Since the direct diffraction channel K 0 + g 1 = K 1 is forbidden, the diffraction pattern detected along the K 1 direction is a pure multiple-beam diffraction effect without the contribution of direct 2BD. Note that multiple-beam diffraction with a forbidden main reflection has been experimentally verified and it has many applications (e.g. Lang et al., 2013).
X-ray multiple-beam diffraction from perfect crystals can be rigorously computed by the Fourier coupled-wave diffraction theory (FCWDT) (Huang et al., 2013;Tang et al., 2021), which is based on similar principles as the method developed by Stetsko & Chang (1997). But, the FCWDT is more efficient and accurate. Using the FCWDT, we have calculated the 2D distribution of the reflectivity R 1 along the K 1 direction for the 000=006=113=1 " 1 13 4BD configuration, as shown in Fig. 2. Here we always set the main reflection to be symmetric, i.e. g 1 is strictly perpendicular to the crystal surface. We allow the incident beam to slightly deviate from the (010) plane by an azimuthal angle È. Then the incident wavevector is K 0 = À1 ðcos cos Èx x þ cos sin Èŷ y À sin ẑ zÞ in Fig. 1. The reflectivity only depends on K 0 , i.e. R 1 is a function of È, , and the photon energy E. Fig. 2(b) shows the calculated R 1 distribution as a function of È and at the exact Bragg energy E 4B = 10.5236 keV. Á is the relative deviation of the incidence angle from the geometrical Bragg angle 4B = 40.6013 . This map represents a 2D 'rocking curve' for an incident plane wave.
Note that for 2BD the Bragg condition is maintained when the incident and diffracted beams are rotated around the diffraction vector. We call the cone formed by such rotation the diffraction cone. For example, azimuthal rotation of K 0 and K 1 along g 1 in Fig. 1(a) forms a cone that is the diffraction cone of g 1 . The diffraction pattern in Fig. 2(b) mainly consists of three lines, which correspond to the diffraction cones of the three reflections 006, 113, and 1 " 1 13, respectively, in the Ècoordinate system. For example, the horizontal line corresponds to the 006 reflection, of which the Bragg condition is independent of È. All three lines intersect in the central region that is the 4BD region. In this region, the three lines have significant distortions, indicating that the three reflections have strong interactions. Here also note that the detour reflection can be very strong, with reflectivity close to 100% in some regions although the direct 006 reflection is forbidden. Fig. 2(a) is the diffraction pattern when the photon energy E deviates from E 4B by ÁE = À0.5 eV. Consequently, the Bragg angle of the 006 reflection increases following equation (1), as indicated by the upward shift of the 006 diffraction line (cone). The 113 and 1 " 1 13 diffraction cones also change with E according to their respective Bragg equations, for instance, equation (3) for reflection 113. The resulting effect is that the three lines no longer intersect at the same point, indicating that the 4BD condition can no longer be satisfied when the incident energy deviates from E 4B . Instead, each pair of lines intersect at a distinct point that corresponds to a three-beam diffraction (3BD) process (Renninger, 1937;Lang et al., 2013). The top-left (T 1 ) and top-right intersections in Fig. 2(a) correspond to the 000/006/113 and 000=006=1 " 1 13 3BD processes, respectively, while the intersection in the central area corresponds to 000=113=1 " 1 13 3BD. Fig. 2(c) is the diffraction pattern for E = E 4B + 0.5 eV, and it is nearly a mirror image of Fig. 2(a) with respect to the central 006 diffraction line Á = 8 mrad in Fig. 2(b). Here the slight shift of the central line from Á = 0 in Fig. 2(b) is caused by the slight refraction effect of X-rays.
The most important phenomenon revealed from Fig. 2 is that 4BD can only occur along a unique incidence direction and for a unique photon energy. For the current case, the unique energy is E 4B = 10.5236 keV, which is determined only by the lattice constant a 0 . The unique incidence direction corresponds to Á = 8 mrad (relative to 4B = 40.6013 ) and È = 0 [relative to the (010) lattice plane]. Fig. 2 shows that the plane-wave 4BD pattern is very sensitive to photon energy variation. For a real X-ray beam, the spectrum always has a finite energy bandwidth. Here we consider a synchrotron radiation beam monochromated by an upstream Si (111) DCM. The spectral bandwidth of the beam after the DCM is ÁE BW ' 1.5 eV at 10.5 keV, and we assume that the intensity has a Gaussian distribution in terms of E. Computed 2D 'rocking curve' of the 000=006=113=1 " 1 13 4BD setup in Fig. 1 showing the reflectivity R 1 of the main reflection g 1 = 006 as a function of the incidence angle (È, Á) and the photon energy E. The indices of each line (diffraction cone) indicate the corresponding Bragg reflection.
-polarization, i.e. the electric field of the incident wave, is parallel to [010] in Fig. 1(a). Semi-infinite Si crystal. Á = 0 always corresponds to 4B Based on such an incident beam, we have computed the plane wave diffraction patterns (as in Fig. 2) for different energies within the DCM bandwidth and overlapped them together to form the integrated diffraction pattern in Fig. 3(a). Here the center of the Gaussian spectrum is E 4B . The pattern is an Xshaped cross consisting of two oblique bands. Here, note that the central lines of the two bands (dashed lines) are not the diffraction cones in Fig. 2. The diffraction cones in Fig. 2 Fig. 2 are indeed located on the two dashed lines in Fig. 3(a). Such intersections move in the Ècoordinate system with varying E, thus forming the two 3BD lines that can extend far away if the energy and angular ranges are wide enough. Based on this conclusion, one can use the Bragg equations and equation (2) to easily calculate the slopes and positions of dashed lines in the Èspace. On the other hand, this indicates that 3BD can continuously occur for any wavelengths allowed by the diffraction geometry, similar to 2BD. Hence, 3BD usually cannot be used for energy calibration. However, the intersection of the two dashed line in Fig. 3, here called the cross center (CC), is the 4BD center that corresponds to a unique photon energy and a unique incidence direction even for polychromatic incident beams. This can be seen from Figs. 3(b) and 3(c) that when the central energy of the incident Gaussian spectrum deviates from E 4B the strong diffraction regions move away from the fixed-position CC to cover different regions of the X-shaped cross. The strong diffraction centers are always on the two fixed dashed lines. Here it can be verified that the shift of the strong diffraction center from the CC, ÁÂ, along the Á axis [see Fig. 3(c)] and the shift of the spectral center, ÁE, satisfy the differential Bragg law of the 006 reflection, around 4B . Hence, different points with different angles on the dashed lines correspond to different energies. Only those points with the corresponding energies falling within the incident spectrum can have strong diffraction when the incidence direction is correct. If E is away from E 4B , the CC may be completely out of diffraction. In such circumstances, one can still extrapolate the measured dashed line segments [e.g. in the lower half of Fig. 3(c)] to derive the CC position. This is very useful for the initial search and alignment of the 4BD crystal orientation and also for monitoring X-ray beams with large variations. Therefore, a polychromatic incident beam can produce a unique X-shaped diffraction pattern in the vicinity of the 4BD region. In particular, the spectral bandwidth and the divergence of the incident beam only affect the extent of the diffraction pattern (in the Èspace) and its intensity distribution without affecting the position of the CC. But, note that a white beam will not work here since it will activate strong harmonic reflections, such as 004 and 008, that will significantly reduce (if not destroy) the visibility of the 006 reflection. This is the reason why we have considered in the above a synchrotron beam monochromated by a Si (111) DCM.
For comparison, Fig. 3(d) shows the integrated diffraction pattern for another example of 4BD, 000=006= " 3 331= "  (a-c) Integrated 000=006=113=1 " 1 13 4BD patterns for a Gaussian incidence spectrum (ÁE BW = 1.5 eV). The intensities are normalized intensities of the main reflection g 1 = 006. The patterns can be generated with a parallel incident beam by 2D rocking of the crystal, or with a divergent beam from a point source as a one-shot image in the XZ coordinate system. Á = 0 corresponds to 4B The color scale is the same as in Fig. 2. the incident beam is ÁE BW = 1.2 eV, which is the bandwidth of a Si (111) DCM for this energy. Here the cross is sharper than those in Figs. 3(a)-3(c). For higher energies, the 4BD pattern can be further sharper. Note that the sharpness of the cross directly affects the precision of BPM and energy calibation.
Thus, we have illustrated that practical 4BD experiments with finite-bandwidth incident beams can be used to calibrate X-ray photon energies and measure the directions of X-ray beams based on the fact that the CC in Fig. 3 corresponds to a unique energy and a unique incidence direction. Although the polychromatic diffraction patterns are not as sharp as the plane-wave diffraction patterns, it is evident that the energy resolution can reach the sub-eV level from the comparison of Figs. 3(a)-3(c). Meanwhile, the angular resolution can reach the mrad level. The beam direction determined by 4BD is a complete 2D orientation (with the same high resolution along both the and È directions), which is a remarkable advantage over 2BD that may be sensitive only to the 1D directional change Á.

Energy calibration and beam position monitoring of point sources
In principle, the diffraction patterns in Fig. 3 can be realized by 2D rocking of the crystal near the 4BD conditions using a parallel polychromatic incident beam, but such a 2D scanning process will be time-consuming. Meanwhile, X-ray beams with 2D high collimation are very difficult to obtain and most X-ray beams have larger lateral (') divergence as aforementioned. In the following, we will focus on the principles of an imaging method that uses a naturally divergent beam from a point source to form a one-shot image of the 4BD pattern.
First, note that symmetric Bragg reflections always follow the flat mirror reflection (specular reflection) law for ray directions, which results from the conservation of the tangential momenta, K 0|| + g n|| = K n|| . Here || denotes the tangential component of the corresponding vector, i.e. the projection of the vector onto the crystal surface. This equation is valid for any Bragg reflection (Huang et al., 2013). For the symmetric main reflection g 1 in Fig. 1, g 1|| = 0 leads to K 1|| = K 0|| . Consequently, |K 1 | = |K 0 | gives K 1z = ÀK 0z . For symmetric Bragg reflections (of two-or multiple-beam diffraction), this mirror reflection law is always valid for any incidence directions and any wavelengths. [Asymmetric reflections are dispersive and do not have this property (Huang et al., 2012).] In the case of a point source, therefore, the symmetric Bragg reflection gives rise to a mirror-image virtual source S 0 , as shown in Fig. 4(a). Viewed from S 0 , each ray will not change its direction at all during the Bragg reflection. The only difference of the Bragg reflection is that only X-rays falling within a narrow spectral bandwidth and in a very small angular range will be strongly reflected, while mirror reflection of light is usually achromatic for any incidence direction. Similarly, a DCM consisting of two identical symmetric reflections also exactly preserves the direction of each ray, where the second reflection exactly offsets the deflection angle of the first one.
The net effect is that the DCM only causes a beam displacement that has no effect on the subsequent imaging process.
Second, the 2D orientation of a ray emitted from a point source can be described by two small angles along two orthogonal directions Á and ' with respect to the central axis of the beam, as shown in Fig. 4(b). For synchrotron beamlines, these two directions usually correspond to the vertical and horizontal divergence directions, respectively. For the vertical Bragg reflection, the vertical divergent angle Á is the same as the variation of the incidence angle on the crystal surface in Fig. 4(b). In addition to , we have also used the azimuthal angle È above in Figs. 2 and 3 to describe the incidence wavevector K 0 = À1 ðcos cos Èx x þ cos sin Èŷ y À sin ẑ zÞ: From Fig. 4(b) it is apparent that the lateral (horizontal) divergence angle ' is proportional to the azimuthal angle È we used in the above calculations by a geometrical factor cos 4B , i.e. ' = È cos 4B for small '. For the current case, cos 4B = 0.76.
Hence, a point source naturally provides X-rays along all the various directions around the central axis of the beam.  When the divergent beam is incident on the crystal, each point on the illuminated surface corresponds to a unique incidence direction (', ). Consequently, the point source may generate the 4BD patterns in Fig. 3 as one-shot images without the necessity of 2D angular scans of the crystal. In Fig. 3, we have set the Á and ' (top) axes to have the same scale. Then the one-shot images will have exactly the same shapes as the simulated images if the imaging device (usually a chargecoupled device, CCD) is set perpendicular to the diffracted beam. As shown in Fig. 4(a), if we establish the XZ coordinate system on the CCD, the positions on the CCD are related to the angular directions by X = D' and Z = DÁ, where D is the distance between the point source and the CCD. If we assume D = 50 m for a synchrotron beamline, the image size in Fig. 3(a) will be 2.04 cm Â 1.18 cm, which is close to the fields of view of some typical X-ray CCDs. If the beam divergence is smaller than that in Fig. 3, one can adjust the DCM and the crystal to image only the central part of the diffraction pattern.
The above principles show that a point source can be used to perform real-time imaging of the 2D 4BD pattern without angular scans of the crystal. In experiments, the initial alignment may still need angular scans. One can first set the DCM energy roughly at E 4B and set the Bragg angle of g 1 = 006 roughly at 4B . Then fine alignment of the crystal to the exact 4BD conditions may require several test È scans at different angles. Once we find two symmetric 3BD points on the two oblique dashed lines in Fig. 3, the two lines can be immediately determined in the Èspace based on their (calculated) slopes, from which the CC position can be derived. Afterwards, one sets the crystal orientation to the derived CC position and makes a DCM energy scan to maximize the 4BD intensity. Under this condition, the DCM energy (center of the spectrum) is calibrated to E 4B with an accuracy better than 0.5 eV. Meanwhile, the crystal orientation is also precisely determined. 2 In practice, the finite source size may blur the images in Fig. 3 in the imaging method. However, for modern lowemittance synchrotron light sources or XFELs with source sizes Ás < 50 mm and beamline lengths D > 10 m, the source size effect Ás/D < 5 mrad is very small, which can be further reduced or eliminated by image processing and data fitting. For the current cases, from data fitting the energy calibration precision may reach up to 0.1 eV. In a reversed way, data fitting of the image blurring can also give information about the source size.
In addition to wavelength calibration, the most potential application of the 4BD imaging method is for beam position monitoring (BPM) of modern synchrotron light sources and XFELs, and the principles can be understood from Fig. 5. In Fig. 5(a), we assume that the DCM and the crystal are aligned to the 4BD conditions to produce a symmetric 4BD pattern on the CCD detector. For simplicity of description, we further assume that the thick red line connecting the (virtual) source and the CC of the 4BD pattern is exactly horizontal. After the initial alignment, we assume that the DCM and the crystal are strictly static. Now in Fig. 5(b) if the source is displaced in the transverse plane by a distance Áh, the horizontal red line containing the source will also be displaced by Áh. As described above, the CC of the 4BD pattern always corresponds to an exact unique incidence direction, which is the horizontal direction here. This indicates that the CC on the CCD will also be displaced by the same Áh. Hence, the CC on the CCD will move synchronously with the source along the same direction. Therefore, monitoring the movement of the CC on the CCD is equivalent to real-time monitoring of the beam/source position. If the resolution of the CCD is on the micrometre level, it is expected that this BPM method can achieve micrometre resolution. Data fitting may further improve the spatial resolution.
As shown by Samadi et al. (2015), not only the position of a synchrotron light source or XFEL may vary over time, but the beam direction (angle) can also change. Fig. 5(c) schematically shows that the X-ray beam has both a displacement Áh and an orientation variation Á. It is obvious that as long as the horizontal direction remains within the angular range of the divergent beam, the additional Á does not affect the displacement of the CC, which is still Áh. Under the condition that the beam divergence is small enough, however, the angular variation of the beam will make the 4BD pattern asymmetric with the image center (which can be calculated by  Schematic of the BPM using 4BD of a point source. The left-hand side shows side views. The right-hand side shows the CCD viewed along the beam direction (K 1 in Fig. 1). The beam displacement caused by the DCM is not shown, which does not affect the BPM. Since the deflection angle (2 4B ) of the 4BD crystal is omitted, the source S 0 is the virtual source in Fig. 4(a). For simplicity the 2D variations of the source, the beam and the image are indicated by 1D shifts. (a) Initial 4BD configuration. (b) S 0 is displaced by Áh without beam direction changes. (c) S 0 is displaced by Áh together with a beam direction change Á, which makes the 4BD pattern asymmetric as the image center is shifted by Ác = DÁ from the CC. data fitting if necessary) shifted from the CC by a distance of Ác = DÁ if the divergence of the beam is small enough. If the beam divergence is large, measurements of Ác may not be very accurate. Meanwhile, the variation of the 4BD pattern from the symmetric shapes in Figs. 5(a) and 5(b) caused by beam direction changes may also depend on the spectrum (which can be numerically computed). However, all these factors do not affect the beam position variation Áh if the beam direction variation remains reasonably small. (For large beam direction variation, the 4BD could be out of the angular range of the incident beam.) Obviously, the 4BD BPM scheme, in fact, monitors the true position of the X-ray source (electron beam source) and, compared with many conventional BPM methods, a unique property of this method is that the source position and variation revealed are completely independent of any slits (particularly beam-defining slits or devices) that may exist in the beamline.
For simplicity, the variations of the beam and the image in Fig. 5 are schematically indicated by the 1D movements of the images, but it is obvious that in experiments the image variation gives the 2D variations of the source position and beam directions since the 4BD pattern is a 2D cross. As mentioned above, this is a remarkable advantage over 2BD schemes that can only give 1D beam position variation. Fig. 3 indicates that imaging a complete 4BD pattern (for E < 12 keV) requires beam divergence of several hundreds of mrad along both direction. Although bending-magnet beamlines can meet such requirements, the beam divergence of fourth-generation synchrotron undulators and XFELs may be only a few tens of mrad (for open beams without slits). However, note that here the BPM only depends on the position of the CC, which can be determined by a small central region around the CC without the necessity to image the entire 4BD pattern. For example, one can estimate that in Fig. 3(d), where the 4BD pattern has sharp lines, a realistic divergence range of about 20 mrad (V) Â 40 mrad (H) in the central part may well determine the CC position. As mentioned above, the 4BD pattern can become much sharper at higher energies (> 15 keV), which can further reduce the requirement of beam divergence if the BPM is chosen to work at these energies.

Discussion and conclusion
The above principles of 4BD and the corresponding point source imaging scheme are based on rigorous dynamical theory calculations. A practical implementation of the scheme at a synchrotron beamline for BPM will have two challenging requirements. The first is to maintain high stability of the DCM, particularly the stability of the relative orientation between the two DCM crystals. Variation of this relative orientation directly alters the virtual source position. It also changes the spectrum and beam direction, though these two factors are less critical than the virtual source variation that directly affects the precision and reliability of the BPM. On the other hand, by frequency analyses, it is also possible to decouple and identify the origin of beam motion (vibration) from either the source or the optics (Samadi et al., 2019c).
The second requirement is to reduce the heat load of the DCM so as to mimimize thermal lattice distortion (better than 10 À5 ). Lattice distortion (similar to slope errors of mirrors) will significantly change the directions of the locally diffracted X-rays and thus change the virtual source size and position, which may significantly affect or even destroy the 4BD pattern. A possible way to mitigate the heat load is to use a thin-crystal window as a beam splitter (Osaka et al., 2013) to diffract a weak beam for the 4BD imaging setup, as schematically shown in Fig. 6. This scheme has three major advantages. First, the head load of the thin crystal may be very small since the crystal thickness can be as thin as a few micrometres such that most of the photons will be transmitted without absorption. (Setting homogeneous absorbers/filters upstream of the thin crystal may reduce the long-wavelength heat load.) Second, the spectral bandwidth of the beam diffracted by the thin crystal can be wider than that diffracted by a thick crystal. The wide bandwidth can extend the angular range of the 4BD pattern in Fig. 3. Third, it is apparent that with the use of a thin-crystal splitter the 4BD-based BPM process will not require a dedicated beamline. Hence it may be implemented at any beamline with little effect on the main beamline.
Although we have focused on the 4BD case around 10 keV, there are, in fact, a large number of such 4BD configurations that cover various energies. For E < 20 keV, Table 1 lists some typical 4BD cases of silicon with a (001) surface and with the same (010) plane of incidence. Note that one can use a single silicon crystal with the (001) surface to realize all these 4BD configurations simply by setting the Bragg angle of the main reflection (g 1 = 002 or 006) to the specific 4B . If the crystal is rotated by 45 such that the plane of incidence becomes the (110) plane that also has mirror symmetry, we can obtain another set of 4BD configurations.
In fact, some of the special 4BD configurations in Table 1 involve six or eight reflections (or more). For such six-and eight-beam diffraction geometry, the diffraction patterns consist of three and four lines, respectively, instead of only two lines in Fig. 3 for 4BD. All these lines intersect at the same point that is the center of the diffraction pattern as in Fig. 3(a). Therefore, the diffraction mechanisms of six-or eight-beam research papers J. Synchrotron Rad. (2022). 29, 159-166 Huang, Shi and Assoufid X-ray beam monitoring using four-beam diffraction 165 Figure 6 Replacement of the DCM with a thin-crystal window for a 4BD-based BPM with possibly low heat load and minimum thermal lattice distortion on the thin crystal. The thin crystal must be of symmetric Bragg reflection. diffraction is almost the same as 4BD for energy calibration and for BPM. As mentioned above, the slopes and positions of all the inclined lines can be calculated by a simple computer program using simple geometry without the complicated dynamical theory calculations.
The multiple-beam diffraction can also be arranged in the transmission geometry, which may generate additional unique features owing to the transmission-diffraction properties, such as the Borrmann effect (Okitsu et al., 2003). For photon energies below 10 keV, however, the transmission geometry requires thin crystals that can be easily strained, which may require strain-mitigation efforts.
The 4BD principles are also valid for the case where g 1 is not forbidden. In this circumstance, however, the 4BD pattern has a strong and wide vertical column that is mainly the direct two-beam diffraction intensity of g 1 (nearly independent of È in the regions away from the CC). This column will greatly reduce or hide the sharp contrast features around the CC in Fig. 3.
In summary, we have used rigorous dynamical-theory calculations to demonstrate that the forbidden-reflection 4BD pattern, which is typically an X-shaped cross, can be activated only by a unique photon energy and a unique incidence direction. The 4BD geometry can be used to calibrate photon energies and X-ray beam positions and directions. Based on the principles that the 4BD pattern can be generated by direct imaging using the divergent beam from a point source without crystal rocking, we illustrated a high-resolution beam position monitoring scheme for real-time monitoring or ultrafast imaging of the sources of synchrotron beamlines and nanofocused beams. Although other BPMs, particularly blade-type BPMs, that can differentiate both the position (with mm resolution) and angle (down to $ 1 mrad) of the beam have already been developed and widely used (e.g. Huang et al., 2019), the new scheme we presented here provides an alternative method that is based on completely different mechanisms and may have unique or complementary advantages. We admit that the instant imaging of the 4BD pattern may be challenging for X-ray beams with extremely small divergence (e.g. fourth-generation light sources with divergence $ 10 mrad), which requires testing (preferably at higher photon energies with sharper 4BD patterns) in the future. However, we are confident that our scheme should work perfectly for bending-magnet or wiggler beamlines. In our following work, we will test this scheme at beamline 1-BM of the Advanced Photon Source, but note that the work by Samadi et al. (2015) has already demonstrated the feasibility for the 1D case.

Funding information
The following funding is acknowledged: US Department of Energy, Office of Science, Office of Basic Energy Sciences (contract No. DE-AC02-06CH11357). Table 1 Typical 4BD reflections from the silicon (001) surface for E < 20 keV.