## 2 Methods  
### Numerical Simulation  
COMSOL Multiphysics software, version 5.3, based on finite element analysis, was used to perform the numerical simulations. The software allows the modeling of different multiphysics phenomena through a simple graphical interface, with minimal need for coding. To model the optical detectors, the numerical model considered the physical equations of semiconductor materials (semiconductor material model) when an optical radiation is applied to them, by taking into account the conversion of optical energy (given by the equations of electromagnetic waves in a frequency domain) into electrical energy. In the model, the carrier statistics are given by a Fermi-Dirac distribution. The model  
Figure 1: Cross-section views (non-scaled) of the standard photodiodes’ designs in CMOS technology: (a) n-well/p-substrate, (b) p+/n-well and (c) n+/p-substrate. The orange shading on top represents the active area of each photodiode, i.e., the photosensitive region. Figure 2: Estimation of the quantum efficiency curves for the 3 types of vertical silicon photodiodes manufactured in CMOS technology (2 \(\upmu\)m): p+/n-well, n+/p-substrate and n-well/p-substrate (data estimated from [7]). uses trap-assisted (Shockley-Read-Hall) recombination, where the electrons transitioning between bands pass through new energy states created by a dopant within the band gap. The most important equations to describe the model are the Poisson and the continuity equations. The Poisson Equation (3) allows to calculate the electrostatic potential, where \(\epsilon\) is the product between the relative and the absolute dielectric constants, \(V\) describes the electrostatic potential, \(q\) is the elementary charge, \(n\) and \(p\) represent the electron and hole concentrations, and the donor and acceptor concentrations are given by \(N_{d+}\) and \(N_{a}\), respectively [14]. \[\
abla\cdot(\epsilon\
abla V)=-q(p-n+N_{d+}-N_{a-}) \tag{3}\]  
The two continuity equations in the absence of illumination and the two drift-diffusion equations are given by, respectively:  
\[\frac{1}{q}\
abla\cdot J_{n}=-R_{srh} \tag{4}\]  
\[\frac{1}{q}\
abla\cdot J_{p}=R_{srh} \tag{5}\]  
\[J_{n}=qn\mu_{n}E+qD_{n}\
abla n \tag{6}\]  
\[J_{p}=qp\mu_{p}E-qD_{p}\
abla p \tag{7}\]  
where \(J_{n}\) and \(J_{p}\) are electron and hole current density, \(\mu_{n}\) and \(\mu_{p}\) are the carrier mobility, \(D_{n}\) and \(D_{p}\) are the diffusion coefficients for electrons and holes, \(E\) is the electric field, and the \(R_{srh}\) is the Shockley-Read-Hall generation/recombination rate, which is given by:  
\[R_{srh}=\frac{n\cdot p-{n_{i}}^{2}}{\tau_{p}\cdot(n+n_{1})+\tau_{n}\cdot(p+p_{ 1})} \tag{8}\]  
In this equation, \(\tau_{n}\) and \(\tau_{p}\) are the electron and hole lifetimes, \(n_{i}\) is the intrinsic carrier density, and the electron and hole densities in trap energy level are denoted by \(n_{1}\) and \(p_{1}\)[14]. Equations (9) and (10) describe the continuity equations under illumination conditions, considering the effect of the photogeneration rate (\(G\)) [14]:  
\[\frac{dn}{dt}=\frac{\
abla\cdot J_{n}}{q}+R_{srh}+G \tag{9}\]  
\[\frac{dp}{dt}=-\frac{\
abla\cdot J_{p}}{q}+R_{srh}+G \tag{10}\]  
Derivatives \(\frac{dn}{dt}\) and \(\frac{dp}{dt}\) are assumed as zero in a steady-state analysis, without the lighting effect. Assuming the light in the photodiode, the photogeneration rate can be obtained from the Lambert-Beer law (11) [15]:  
Figure 2:0  
where \(x\) is the depth along the substrate, \(R\) is the reflectance, \(l_{in}\) is the input optical intensity, \(\alpha\) is the absorption coefficient, \(\tau\) is the wavelength of the light, \(c\) is the speed of the light in vacuum and \(h\) is the Plank constant. The optical absorption is dependent on the incident wavelength. Taking this into account, the variations of the refractive index and the extinction coefficient of silicon were considered in the simulations according to the data made available by [PERSON] and [PERSON] [16].