## 2 Materials and Methods
### Hybrid Model Implementation  
Since we implemented the simulation of a laser beam propagation through a scattering layer using Monte Carlo technique, and since we know how to estimate distortions of laser radiation using Shack-Hartmann technique, we can combine these techniques and numerically estimate what distortions (in terms of focal spots displacements) the beam will obtain after passing the scattering medium. To solve this, we upgraded our beam propagation model by adding the implementation of Shack-Hartmann technique. In order to do so, we placed the measurements plane, as well as the plane that simulates the lenslet array, at the specified distance from the output edge of the scattering layer (this distance can be varied by the user). Since Monte Carlo technique treats the light as a huge number of photons (or photon packets), we can use the ray-tracing technique and principles of geometrical optics to calculate the trajectory of propagation of photon in free space after it leaves the scattering layer. For this, we calculate the direction cosines \(dirCosX_{f}\), \(dirCosZ_{f}\), and \(dirCosZ_{f}\) of each photon that left the scattering layer:  
\[dirCosX_{f} =\frac{sin\theta\cdot(dirCosX_{i}dirCosZ_{i}\cdot cos\theta-dirCosY _{i}\cdot sing)}{\sqrt{1-dirCosZ_{i}}^{2}}+dirCosX_{i}\cdot cos\theta \tag{10}\] \[dirCosY_{f} =\frac{sin\theta\cdot(dirCosY_{i}\cdot dirCosZ_{i}\cdot cos\theta -dirCosX_{i}\cdot sing)}{\sqrt{1-dirCosZ_{i}}^{2}}+dirCosY_{i}\cdot cos\theta\] \[dirCosZ_{f} =-sin\theta\cdot cos\theta\cdot\sqrt{1-dirCosZ_{i}}^{2}+dirCosZ_{i }\cdot cos\theta,\]  
where \(dirCosX_{i}\), \(dirCosY_{i}\), and \(dirCosZ_{i}\)--direction cosines of the photon's propagation trajectory before it left the scattering medium (before the last photon-particle interaction). After calculation of direction cosines, we traced the photon to the plane of the lenslet array. The photon fell on the particular lenslet that retraced it to the measurement plane according to the incidence angle. Photon's coordinates \(x_{f}\), \(y_{f}\), \(z_{f}\) were calculated using the formulas:  
\[x_{f}=f\cdot\frac{dirCosX_{f}}{dirCosZ_{f}},\;\;y_{f}=f\cdot\frac{dirCosY_{f}} {dirCosZ_{f}},\;\;\;z_{f}=f, \tag{11}\]  
where \(f\)--focal length of the lenslet. As a result, we obtain a set of coordinates of all photons that fell on the lenslet array and then retraced to the measurement plane. Afterward, we discretize the measurements plane so it becomes more like the real camera sensor--with fixed pixel size and pixel resolution. The focal spot field also called hartmannogram image obtained on the \(4.8\times 4.8\)-mm measurements plane after the simulation of 4-mm laser beam propagation through the scattering medium is presented on Figure 3.  
It can be observed from Figure 3 that there are extra focal spots that appear out of the diameter of 4 mm (the diameter of the initial collimated laser beam that fell on the scattering layer). This effect can be explained by laser beam broadening due to light scattering. A scattered photon flux contains three components [75]: ballistic, on-axis (or \"snake\"); and off-axis (or diffusive) photons. Ballistic photons travel through a turbid medium without interaction with the scatterers and do not change the initial trajectory. This coherent component of the scattered light is the most important for imaging and focusing applications. On-axis photons undergo few scattering events and travel in near-forward paths along a trajectory that is close to the initial direction of the beam propagation. These photons play an important role for imaging and focusing when the thickness of the scattering medium layer increases because the number of ballistic photons decreases exponentially in this case [11]. Off-axis photons scatter in all directions and form a noncoherent component of the scattered light. As noted above, ballistic photons are most valuable for focusing, but their number decreases exponentially when the layer thickness or scatterer concentration increases.