## 2 Methods
### Analog to Photon-Counting Signal Gluing
#### 2.3.2 Likelihood-Based Gluing  
Following and expanding the approach of Veberic [49], we construct a likelihood of the detection process in both channels, which can be expressed as  
\[\mathcal{L} =\prod_{i=j}^{j+n}PDF(p_{i},\delta,\epsilon|\mathcal{R}_{i,\text {obs}})\cdot PDF\Big{(}p_{i},g,r_{b},a_{b},\gamma^{2}|A_{i,\text{obs}},ENF\Big{)}\] \[\qquad\times PDF\big{(}r_{b}|\langle\mathcal{R}_{b}\rangle,s_{ \mathcal{R}_{b}}\big{)}\times PDF\big{(}a_{b}|\langle A_{b}\rangle,s_{A_{b}} \big{)} \tag{18}\]  
where \(p_{i}\) is the (unknown) total number of incident photoelectrons (summed over all \(N_{sh}\)) in channel \(i\), and \(\delta=f_{\text{s}}\tau/N_{sh}\) and \(\gamma\) are the electronic noise of the signal transmission  
Figure 10: Visualization of the \(\chi^{2}\)-based gluing process applied to an 355 nm elastic channel with amplitude saturation registered by an LOTR with 20 MSamples/s (**top**) and a 387 nm Raman channel registered by the same LOTR (**bottom**). The graphs on the right side show scaled amplitude (blue) and deadtime-corrected PC (red). The green regions display the search range, through which windows of different sizes have been slid, and the final selected windows (pink). The black points show the transition between scaled amplitude and deadtime-corrected PC for the glued signal. On the left side, the fitted AN gain \(g\), the additional AN offset \(O\) (see Equation (15)), and the reduced \(\chi^{2}\) of the fit (Equation (17) divided by \(n-i-2\)). The white dots highlight the final chosen solution. and digitization. The product runs from a suitable start index, which excludes amplitude saturation and ensures that \(\mathcal{R}_{i,\text{obs}}<\tau\). Note that \(\tau\) becomes a fit parameter in this method through \(\delta\) as well as the photon detection efficiency \(\epsilon\) of the PC channel. We denote the following parameters, which refer to an average per laser shot with capital letters, and those that refer to total accumulated over all shots with lower cases letters; that is, \(a_{i}=N_{sh}A_{i,\text{obs}}\) and the background of the (summed) amplitude channels is \(a_{b}\), similarly for the total photon background over all laser shots, \(r_{b}\). Moreover, we assume that the AN channels measure voltages with an expectation of \(E[a_{i}]=gp_{i}+N_{sh}B\), where \(B\) corresponds to the electronic pedestal. The variance of \(a_{i}\) can be described by [49]:  
\[s_{a,i}^{2}=N_{sh}\gamma^{2}+F^{2}g^{2}p_{i}, \tag{19}\]  
where we have, in addition to the approach of Veberic [49], added the excess noise contribution to the signal otherwise correlated with the PC channel: \(F^{2}=ENF^{2}-1\). The constant photon background \(r_{b}\) now becomes an unknown quantity, measured on \(n_{\text{off}}\) background data fields, just as the background in the AN channel \(a_{b}=N_{sh}B+g\beta r_{b}\), which has been measured to \(N_{sh}(\langle A_{b}\rangle\pm s_{A_{b}})\). Note that \(s_{A_{b}}\) here denotes the uncertainty of the mean \(\langle A_{b}\rangle\), while \(\gamma^{2}\) is the variance of the electronic noise per time slice. In addition, an amplitude background efficiency parameter \(\beta\) has been introduced that takes into account the efficiency of the amplitude offset measurement to measure the photon background, in addition to the electronic baseline.