## Appendix A  
We consider a plano-concave cavity made up of a plane mirror on which is set a selecting diaphragm (circular aperture) and a concave mirror, in front of which a diffractive optical element (DOE), or an absorbing ring, is placed. The DOE can be a circular phase plate (CPP) or a binary annular phase plate (BAPP). The determination of the resonator transverse mode parameters (intensity distribution, mode volume, width, etc.) is of key importance in the design of a laser system. For instance, the knowledge of the fundamental mode characteristics (\(M^{2}\) factor, losses, transverse mode discrimination, etc.) are the quantities to be evaluated. For a long time, the method used for the determination of the resonant field of cavities was the so-called Fox and Li method [1] and other more or less sophisticated procedures based on integral equation solving, the solution of which is very sensitive to the initial conditions, thus giving rise to a certain amount of numerical instabilities. This is why we prefer the matrix method proposed by [PERSON] and [PERSON] in 1983 [65], which involves, as will be shown below, a matrix operator which holds the information about amplitude and phase clipping undergone by the resonant field after insertion inside the cavity. The types of cavities that are considered in the following section are shown in Figures A1 and A2 when a phase DOE (an absorbing ring) is inserted. Note that the binary DOE in Figure A1 is displaced from the concave mirror by a distance \(D\), and the reason for that can be found in [35]. To understand the necessity of displacing the DOE from the mirror \(\mathrm{M_{c}}\) by a distance \(D<<L\), we have to remember that if we consider, for instance, a DOE in form of a single-phase discontinuity or a binary annular phase plate, then the emerging beam is reshaped, since it suffers a partial or a total rectification [21]. Note that the word rectification means that the negative parts of the beam are rendered positive so that the far-field intensity distribution is no longer identical to the incident intensity distribution. If we want a \(LG_{p0}\) as the fundamental mode imposed by the binary DOE, it is important that the beam incident on the DOE, and the reflected beam by the ensemble (DOE + \(\mathrm{M_{c}}\)) are together a \(LG_{p0}\) beam. For this, the reshaping effect of the DOE, as mentioned above, must be prevented by passing the mode twice through the DOE. It is important that the distance \(D\) should be very short compared to distance \(L\) in order for the phase change introduced by the first passage to be prevented by the return passage through the DOE. In other words, if the distance \(D\) is sufficiently short then the DOE is consequently set in its own near field after reflection on the concave mirror, and as a result, the field distribution does not change. The resonant field determination of the cavities shown in Figures 11 and 12 involves its decomposition into its two progressive waves: a forward (and backward) beam propagating in the positive (and negative) \(Z\) direction. The plane mirror position corresponds to the origin \(Z=0\) of the axial coordinate. The circular diaphragm set against the plane mirror has a radius labelled as \(\rho_{C}\). The phase DOE (Figure 11), set at a distance \(D=5\) mm from the concave mirror, is characterised by its complex transmission, labelled as \(\tau_{DOE}(\rho)\). The concave mirror has a radius of curvature of \(R=150\) mm. In Figure 12, the absorbing ring is assumed to be set against the concave mirror. The reflectivity (intensity ratio) of the plane (concave) mirror is labelled as \(R_{1}(R_{2})\). The determination of the resonant field is carried out numerically and involves its decomposition on the basis of the eigenfunctions (eigenmodes) of the bare cavity, i.e., made up of only mirrors, \(\mathrm{M_{p}}\) and \(\mathrm{M_{c}}\). Thereafter, a perfect axial symmetry is assumed for the cavity.