1 Introduction

In this work we introduce a new strategy to count particles hitting a counting detector that has counting sub-units. This general method could be used in existing or new particle or astroparticle detectors. The proposed statistical model provides useful count estimates if: (1) the signal processing of each sub-unit is based on a discrimination threshold (not on the signal amplitude or charge) and is thus subject to the effect of unresolved particles, (2) there is a subset (larger than one) of counting sub-units that expect the same particle rate, and (3) not all the sub-units of the subset have signal simultaneously. The new strategy is particularly useful for estimating the particle counts as a function of time, even when single particles cannot always be time-resolved.

We find a concise application of the counting strategy in the Underground Muon Detector of the Pierre Auger Observatory [1, 2], which we take as study case. Therefore, in the following paragraphs we describe the importance of this new strategy in the context of cosmic ray physics, within which it was developed. We delay the discussion on other possible applications of the counting strategy to Sect. 5.

In spite of extensive research, the origin, nature, and acceleration mechanisms of ultra-high-energy cosmic rays are still not fully understood [3]. To unravel these mysteries, cosmic rays are studied mainly through three observables: the energy spectrum, the distribution of arrival directions, and the mass composition as a function of the energy [4].

Low-energy cosmic rays are abundant and can thus be measured directly. However, the flux drops steeply with the energy, so cosmic rays with energies above \(\sim 10^{15}\,\text {eV}\) are measured only indirectly using ground-based observatories. The large areas the observatories cover provide enough exposure to detect the extensive air-showers (EASs) [4]. The latter are conformed by the particles that result from the chains of interactions and decays initiated by a cosmic ray [5].

The mass composition of cosmic rays is essential to understanding their origin, the transition energy between the galactic and extragalactic components, the flux suppression at the highest energies, and also for improving current high-energy hadronic interaction models. We know that high-energy cosmic rays consist mainly of nuclei ranging from proton (light) to iron (heavy) [6]. In their journey from their sources to Earth, these charged nuclei are subject to deflection by magnetic fields. Lighter, less charged nuclei are less deflected than heavy nuclei [7]. Then identifying the mass of cosmic rays would allow one to use the high-energy, light component to infer what the sources are [1]. Furthermore, a change in composition as a function of the energy around the transition from galactic to extragalactic cosmic rays is expected. The transition energy would be related to the acceleration limits of galactic sources. The magnetic fields of galactic sources are capable of accelerating heavy nuclei to higher energies than light nuclei. The transition would occur presumably between the highest-energy galactic iron component to the lowest-energy extragalactic proton component [8]. It would also be expected that the highest-energy cosmic rays are mainly extragalactic intermediate mass or even heavy nuclei [9]. Finally, the primary energies to which cosmic rays accelerate are inaccessible to human-made accelerators like the Large Hadron Collider. High-energy hadronic interaction models can only be tested at the highest energies through measurements of the ultra-energetic EASs [10]. These models are typically tested by analyzing the consistency of the composition implications of different EAS observables [10]. Composition studies help to improve these models, which in turn improve the precision of the inferred mass composition [11, 12].

There are two EAS observables that are specifically sensitive to the mass composition for a given energy: the depth of the shower maximum and the number of muons [13]. The first is measured using fluorescence telescopes. These telescopes measure the ultra-violet light emitted from the deexcitation of nitrogen in air, that is excited by charged air-shower particles [14]. The second is measured using underground or surface detectors. In surface detectors, the muons impinge on the detector together with the much more abundant electromagnetic component of air-showers. Isolating the muonic component in this case is typically only possible using inclined events, in which most of the electromagnetic component is absorbed by the atmosphere [11]. On the other hand, buried or shielded detectors are able to detect mainly muons regardless of the inclination of the event, because the other components are mostly absorbed in the earth or shielding material above the detector.

Segmented particle detectors are widely used in particle and astroparticle physics experiments [15]. They can be designed to operate as calorimeters or as counters. In the first case, the integral of the output signal is converted to a total deposited energy, that is in turn converted to a number of particles by knowing the energy deposited by a single particle. This is the case, for example, of the Surface Scintillator Detector of the Pierre Auger Observatory [1, 16, 17], or the surface detectors of Telescope Array [18]. For the second case, to use the segmented detectors as muon counters, the output signal of a segment is compared against a threshold using a discriminator. The resulting binary signal is matched to a known muon signal. For the Underground Muon Detector (UMD) of the Pierre Auger Observatory [1, 2], the single muon signal is a pattern of 0s and 1s. The Auger UMD and the shielded detectors of the AGASA experiment [19] are examples of segmented detectors used both as counters and as calorimeters.

For each EAS event, an estimate of the muon density can be obtained at each module of the detector by dividing the reconstructed counts by the effective area of the module. The muon densities as a function of the distance to the shower axis, measured on the shower plane, constitute a sample of the so-called muon lateral distribution function. Customarily the sampled distribution is fitted, and the fitted function is evaluated at a fixed distance to the shower axis. This provides an event-wise measure of the size of the muon component which is then used for further analyses (see for example Refs. [20,21,22]).

Estimating the number or density of muons impinging a segmented detector without bias is not trivial. If two or more particles hit one scintillator strip almost simultaneously, they will be read out as only one particle. This effect, referred to as pile-up, constitutes a source of undercounting [21, 23]. There are several existing methods that attempt to provide pile-up-unbiased estimates of the number of muons. A simple yet powerful strategy is the one used by the AGASA collaboration [19]. It is based on counting the number of occupied channels out of all available ones. The advantage of this strategy is that it presents little to no bias in the non-saturation region. The disadvantage is that it does not use the time information of the signal. Another strategy is the one used for the photo-multiplier data of the Auger UMD [22,23,24]. In this case, the output signals of each channel are tested for matches to a single-muon pattern. Then the signal is divided in time windows of a length equal to that of the single-muon pattern, and for each window the number of starting pattern matches across all channels is counted. The final estimate is then the sum over all windows. This strategy trades an increased use of the temporal information of the signal for increased biases. We analyze a modification of this strategy based on centering one of the windows around the peak of the signal. We will show that this modification reduces biases in some cases. Finally, we present a new strategy that exploits the full time resolution of the detector, that provides an estimate of the number of muons at each time-bin, and that has also little bias in the non-saturation region. The key of this strategy to achieve full time resolution is considering that a channel becomes inhibited after the first time-bin of a particle pattern.

In this work we simulate the Auger UMD to use it as a test scenario and as a point of comparison among the different counting strategies. The Auger UMD will consist of an hexagonal array of 219 modules at 73 locations when its construction is finished. 61 locations will be separated by \(750\,\text {m}\), and 12 separated by \(433\,\text {m}\) [2]. Each location has a water-Cherenkov detector (WCD) paired to three \(10\,\text {m}^{2}\) modules, each of which is segmented into 64 plastic scintillator strips with embedded wavelength-shifting (WLS) optical fibers. Figure 1 shows a scheme of a WCD with its three paired UMD modules. A previous implementation of the electronics used multipixel photo-multipliers, but now almost all modules are equipped with silicon photo-multipliers (SiPMs). The modules are buried \(2.25\,\text {m}\) underground implying a vertical muon energy threshold of \(\sim \!1\,\text {GeV}\). The UMD of Auger is designed to measure showers with energies between \(10^{16.5}\,\text {eV}\) and \(10^{19}\,\text {eV}\) [1, 2].

Fig. 1
figure 1

Scheme of a water-Cherenkov detector (WCD) of the Pierre Auger Observatory with its three paired UMD modules. The modules lie \(2.25\,\text {m}\) underground and have an area of \(10\,\text {m}^{2}\) each. They consist of 64 plastic scintillator strips embedded with wavelength-shifting (WLS) optical fibers. The SiPMs and the electronics are placed in the middle of the modules below an access tube. Figure adapted from Ref. [25]

In Sect. 2 we explain the different statistical models or algorithms that aim to provide unbiased estimates of the impinging muons. In Sect. 3 we describe how we simulate the detector and the air-shower library that we generated. In Sect. 4 we show the comparison of the performance of the different algorithms. Finally, in Sect. 5, we summarize the main conclusions and provide an outlook.

2 Counting strategies

The problem of counting particles on a segmented detector can be compared, on a first approximation, to the problem of counting “balls in boxes”.Footnote 1 In this problem, a finite number of balls (the impinging particles) are randomly uniformly allocated in a finite number of boxes (the segments of the detector). After one realization, each box can contain zero (with no pattern match), or one or more balls (with pattern match or occupied). The occupancy is then defined as the number of occupied boxes.

Considering a muon counter, the balls represent the number of impinging muons on the counter \(N_{\mu }\). We assume that \(N_{\mu }\) originates from one realization of a Poisson distribution [27] with mean \(\mu \), the average number of particles expected on the counter. \(\mu \) depends on the primary identity, energy, and zenith angle, and on the distance to the shower axis on the shower plane. For a flat detector, it can be expressed as \(\mu = \rho _{\mu } A \cos \theta \), where \(\rho _{\mu }\) is the average muon density of an EAS on the shower plane, A is the active area of the detector, and \(\theta \) is the zenith angle of the shower. It is important to understand the difference between \(N_{\mu }\) and \(\mu \): \(N_{\mu }\) is the number of particles actually impinging the detector, a property of the event, while \(\mu \) is the average number, a property of the EASs. Both \(N_{\mu }\) and \(\mu \) can be used to reconstruct the muon lateral distribution function [13, 21, 23].

The aim of the counting strategies is to answer two questions. The first one is: Knowing the occupancy, what is the estimated number of impinging particles \(N_{\mu }\)? And the second one is: Assuming that \(N_{\mu }\) is a realization of a Poisson distribution of mean \(\mu \), what is the estimated mean number of particles \(\mu \)?

The simplest estimator of both \(N_{\mu }\) and \(\mu \) is the sum of the number of pattern matches over all the scintillator strips of one module. Yet it is evident that the obtained estimates would be biased due to the pile-up effect, since one pattern match can account for more than one muon. Therefore, the goal of these counting strategies is to use the information of the event trace to provide a pile-up-unbiased estimate of \(N_{\mu }\) and \(\mu \).

We now introduce the four counting strategies that we consider in this work.

Infinite window strategy: This is the simplest strategy since it does not make use of the temporal structure of the event trace (hence its name). Instead, it only uses the number of occupied channels k (the occupancy), which is computed as [13, 21, 28]

$$\begin{aligned} k = \sum _{i=1}^{n_s}\Theta (m_i), \end{aligned}$$
(1)

where \(n_s\) is the number of active segments of the detector, \(\Theta \) is the Heaviside step function, and \(m_i\) is the number of starting pattern matches of the i-th channel. \(\Theta (m_i) = 0\) if \(m_i=0\) and \(\Theta (m_i) = 1\) otherwise.

The number of impinging muons on a scintillator strip follows a Poisson distribution of mean \(\mu /n_s\). It follows that the probability of an empty channel is \(q=\exp (-\mu /n_s)\), and the probability of an occupied channel is \(p=1-q\) [21, 23]. The probability of having k occupied channels (successes) out of \(n_s\) channels (trials) given \(\mu \) (which determines the success probability) follows a binomial distribution [21, 23]

$$\begin{aligned} B(k \vert \, \mu ) = \left( {\begin{array}{c}n_s\\ k\end{array}}\right) p^{k} q^{n_s - k} = \left( {\begin{array}{c}n_s\\ k\end{array}}\right) e^{-\mu } (e^{\mu /n_s} -1)^{k}. \end{aligned}$$
(2)

This is also the expression for the likelihood of \(\mu \) given k occupied channels. For \(k < n_s\) the maximum likelihood estimator of \(\mu \) is [21, 23]

$$\begin{aligned} {\widehat{\mu }} = -n_s \ln \left( 1 - \frac{k}{n_s}\right) . \end{aligned}$$
(3)

Moreover, the probability of having k occupied channels given \(N_{\mu }\) impinging muons and \(n_s\) scintillation bars is given by the occupancy distribution [28]

$$\begin{aligned} Occ\,(k \vert \, N_{\mu }, n_s)= & {} \left( {\begin{array}{c}n_s\\ k\end{array}}\right) \frac{S(N_{\mu }, k)}{n_s^{N_{\mu }}} \nonumber \\{} & {} \ \forall \, k \in \mathbb {Z} \mid 1 \le k \le n_s, \end{aligned}$$
(4)

where \(S(N_{\mu }, k)\) are the Stirling numbers of the second kind (see also Ref. [26]). As shown in Refs. [13, 28], a good approximation of the maximum likelihood estimator of \(N_{\mu }\) is

$$\begin{aligned} {\widehat{N}}_{\mu } = \frac{\ln \left( 1 - {\mathop {\displaystyle \frac{k}{n_s}}}\right) }{\ln \left( 1 - {\mathop {\displaystyle \frac{1}{n_s}}} \right) }. \end{aligned}$$
(5)

The similarity between Eqs. (3) and (5) is evident, and in fact \({\widehat{N}}_{\mu } \rightarrow {\widehat{\mu }}\) in the limit when \(n_s \rightarrow \infty \).

It is relevant to add that when \(k = n_s\) we say that the module is saturated, and both \({\widehat{\mu }}\) and \({\widehat{N}}_{\mu }\) tend to infinity.

This strategy was the one employed by the AGASA collaboration (see for example Ref. [19]).

N-bin window strategy: In this strategy the event trace is divided into time windows of N bins, where N is the number of bins of a single-muon pattern (12 time-bins of \(3.125\,\)ns in the case of SiPMs of the Auger UMD). If the number of bins of the inhibition window is not an exact divider of the number of bins of the trace, the last window is actually shorter, yet still included in the computation. Then, for the j-th window, the number of occupied channels \(k_{j}\), the estimated number of muons \({\widehat{N}}_{\mu ,j}\), and the estimated average number of muons \({\widehat{\mu }}_j\) are computed using Eqs. (1),(3), and (5) repectively. The overall \({\widehat{N}}_{\mu }\) and \({\widehat{\mu }}\) are estimated from the sum of those of each window

$$\begin{aligned}{} & {} {\widehat{N}}_{\mu } = \sum _{j=1}^{n_w} {\widehat{N}}_{\mu ,j}, \end{aligned}$$
(6)
$$\begin{aligned}{} & {} {\widehat{\mu }} = \sum _{j=1}^{n_w} {\widehat{\mu }}_j, \end{aligned}$$
(7)

where j runs over the \(n_w\) number of windows of the trace.

This strategy was introduced in Ref. [23] and has been used for analyses of PMT data of the Auger UMD in Refs. [22, 24].Footnote 2

N-bin centered window strategy: This strategy originated as an attempt to solve the biases created in the N-bin window strategy (A.M. Botti, private communication, 2021), and is used in this work to enlighten the origin of said biases. It is very similar to the N-bin strategy, but it determines the position of the windows such that the center of one of those coincides with the peak of the signal.

For the purpose of the explanation, let us take the case of the 12 time-bin windows corresponding to SiPMs of the Auger UMD. The idea is that there exists at least one 12 time-bin window \(j^*\) where the number of occupied channels is maximal. If there is more than one, we take the one that starts earliest. To find it, we slide a 12 time-bin window over all the trace, computing \(k_j\) for every j-th possible window. The “centered” window is the earliest that fulfills \(k_{j^*} = \max _{j}(k_{j})\). This window determines the way to complete the partition of the trace into 12 time-bin windows. For the case of the Auger UMD, since the event signal in the trace starts typically at around \(3300\,\text {ns}\) or \(3800\,\text {ns}\) [25], we discard the first bins of the trace that do not complete a full window. The method can be generalized for other time-window widths, optionally keeping the first bins of the trace.

Having divided the trace into windows, \({\widehat{N}}_{\mu }\) and \({\widehat{\mu }}\) are computed as in Eqs. (6), and (7).

1-bin window strategy: This is the strategy developed in this work. Rather than taking the trace as a whole, or in many-bin windows, this strategy uses the complete time structure of the signal. The idea is to compute for each j-th time-bin of the trace, not only the number of occupied channels \(k_{j}\), but also the number of inhibited channels \(n_{\text {inhib},j}\). The latter is the number of channels that have a pattern match which started at an earlier time-bin. We consider these as inhibited channels because if a muon fell within the inhibition window (i.e, the single-muon pattern match) it would not be possible to measure or resolve it; effectively, inhibited channels are equivalent to dead channels. In the analogy to balls in boxes, having inhibited channels is equivalent to having less boxes. The number of non-inhibited channels is then \(n_s - n_{\text {inhib},j}\).

Furthermore, having less available (non-inhibited) channels reduces the detector area, which leads to a smaller number of detectable muons. It becomes evident that the detector area varies bin by bin. To obtain the number of muons that would be observed for a constant detector area equal to the active area, we need to multiply by a factor equal to the number of active segments \(n_s\) divided by the number of non-inhibited segments \(n_s - n_{\text {inhib},j}\). We therefore compute

$$\begin{aligned} {\widehat{\mu }}_j&= -(n_s - n_{\text {inhib},j}) \ln \left( 1 - \frac{k_{j}}{n_s - n_{\text {inhib},j}}\right) \nonumber \\&\quad \times \frac{n_s}{n_s - n_{\text {inhib},j}} \nonumber \\&= -n_s \ln \left( 1 - \frac{k_{j}}{n_s - n_{\text {inhib},j}}\right) , \end{aligned}$$
(8)

and

$$\begin{aligned} {\widehat{N}}_{\mu ,j} = \frac{\ln \left( 1 - {\mathop {\displaystyle \frac{k_{j}}{n_s - n_{\text {inhib},j}}}}\right) }{\ln \left( 1 - {\mathop {\displaystyle \frac{1}{n_s - n_{\text {inhib},j}} }}\right) } \times \frac{n_s}{n_s - n_{\text {inhib},j}}, \end{aligned}$$
(9)

for each bin of the trace. The overall \({\widehat{N}}_{\mu }\) and \({\widehat{\mu }}\) are computed as their sum over all the bins of the trace (this is, as in Eqs. (6) and (7), with the number of windows \(n_w\) being equal to the number of bins in the trace).

Table 1 summarizes the characteristics of the four strategies. In the table, we consider the trace-length (2048 time-bins) as well as the single-muon pattern length (12 time-bins) of the Auger SiPM UMD signals to calculate the number of windows \(n_w\) of each strategy.

Table 1 Summary of the characteristics of the four strategies considered in this work. \(n_w\) is the number of windows of each strategy considering the characteristics of the Auger UMD trace. The column “Centered” details whether the position of the windows is chosen such that one of those is centered in the peak of the signal

3 Simulations of the response of the underground muon detector to air-showers

3.1 Simulation of the detector

In our aim to recreate a realistic scenario, we develop an end-to-end simulation chain for the counter mode of the Auger UMD. In this section we describe the idea of how the detector works and how we simulate it, and we leave the complete technical details for the Appendix A. The model of the detector follows Refs. [25, 29]. Assuming said model, we derive an analytical solution of the detector response to one or many muons. For this purpose we neglect noise, which is anyway intrinsic to the detector and irrelevant for assessing the performance of the counting strategies. It is also relevant to add that we do not consider muons transversing two scintillator strips (commonly referred to as corner-clipping muons) as this effect constitutes an independent source of bias that can be corrected afterwards [24].

The principle of detection of the UMD of Auger is as follows. The energy of the muons that transverse the soil above the detector has to be larger than \(\sim 1\,\text {GeV}/\cos (\theta _\mu )\), where \(\theta _\mu \) is the angle between the direction of motion of the muon and the vertical direction. When such a muon interacts with the scintillator material, it produces photons that excite the wave-length shifting optic fiber of a segment, producing photons inside of it. These photons propagate through the optic fiber, and some of them reach the SiPM connected to that segment. The photons produce photo-electrons at the SiPM (with a certain efficiency) and this current is processed with the electronics, which outputs a binary signal [25, 30]. If the water-Cherenkov station paired to the muon counter triggered, the digital signals of the 64 binary channels of the module are stored as part of the Auger UMD event trace. For SiPMs, the trace is \(6.4\,\upmu \text {s}\) long with bins of \(3.125\,\text {ns}\). Typically one muon creates a binary signal of \(\sim 8\) consequtive 1s (more precisely \(7.8 \pm 1.5\)) [25]. However, to optimize the signal-to-noise ratio, the matching strategy of the Auger UMD uses a 12 time-bin inhibition window, and it consists of identifying patterns of the kind “1111xxxxxxxx”, where x can be 0 or 1 [25].

The detector simulation takes the number and impinging times of the muons as input, and outputs the event trace of the module, i.e., the binary signals of the 64 channels of the Auger UMD.

A feature of the UMD traces is that the signal does not always start at the same time-bin. This is related to the fact that the paired surface detector triggers the data acquisition in the UMD. Therefore, as a first step we determine the start-time of the signal in the Auger UMD trace by sampling the distribution of the time-delays with respect to the trigger in the paired surface detector. All muon impinging times are then taken as relative to the signal start-time.

Afterwards, we randomly assign a scintillator strip to each impinging muon, as well as an impinging position within the strip (i.e., the distance to the SiPM).

Each muon generates several photons in the optic fiber, some of which reach the SiPM and generate photo-electrons with a certain efficiency. The average number of photo-electrons that are generated in the SiPM \(\left\langle N_{\text {PE}} \right\rangle \) can be expressed as a function of the distance between the impinging position of the muon and the SiPM. We use said function, and sample the actual number of generated photo-electrons \(N_{\text {PE}}\) from a Poisson distribution of mean \(\left\langle N_{\text {PE}} \right\rangle \).

For each photo-electron corresponding to a muon, there is one common time delay that comes from the propagation through the optic fiber from the impinging point to the SiPM. But there are also additional time delays due to the scintillator and the optic fibers excitation and de-excitation. We sample each of these additional delays from exponential distributions. The resulting time of a photo-electron \(t_{\text {PE}}\) is the addition of the signal start-time, the impinging time of the muon (measured with respect to the signal start time), the propagation in the optic fiber, and the scintillator and fiber delays.

At this point, the muon number and impinging times are “translated” to a photo-electron number and arrival times at the SiPMs. We then use a model of the pulse generated by a single photo-electron at the input of the electronics. It is relevant to add that non-linearities due to pile-up in cells of the Geiger-avalanche photodiode arrays of the SiPMs are only relevant for high occupancy and are not considered here [25].

The electronics of an Auger UMD module has four elements at each of its 64 channels: a pre-amplifier, a fast shaper, a discriminator, and a Field-Programmable Gate Array (FPGA). We model the pre-amplifier as a low-pass filter, and the fast shaper as a practical differentiator. We then simply add the fast-shaper signal generated by each photo-electron within a same channel. Having this, we model the discriminator by simply imposing a threshold on the signal after the fast shaper, outputting a fixed voltage if the threshold is passed, and zero voltage otherwise. Finally, like the FPGA, we sample the signal in \(3.125\,\text {ns}\) time-intervals, with a total duration of \(6.4\,\upmu \text {s}\) (2048 samples). The binary signal of each channel is then matched to patterns of the kind “1111xxxxxxxx”, as explained in Sect. 1. Repeating the process for all the channels, we obtain the final event trace for a module, as well as the pattern matches.

Figure 2 shows the input (at SiPM), pre-amplified, after fast-shaper, and output (after discriminator and FPGA) signals as a function of time, for one simulated muon. In the input signal it is easy to distinguish the single photo-electron pulses. The pre-amplifier amplifies and inverts the input signal, which is further amplified and again inverted by the fast-shaper. Finally, the discriminator and FPGA output a digital binary signal.

Fig. 2
figure 2

Simulation of the pulse generated by one muon. The input signal (top) generated at the SiPM goes through a pre-amplifier (second), a fast shaper (third), and a discriminator and FPGA (bottom). The output signal is digitized into \(3.125\,\text {ns}\)-wide time intervals by the FPGA

Finally, Fig. 3 shows, in one module-level event, the impinging muons as a function of time, the binary traces, and the matched patterns for all active channels. In this example we can see pile-up in channels 17 and 23, where the signal of two and three impinging muons respectively is matched to only one pattern.

Fig. 3
figure 3

Simulation of the signal generated by muons of an air-shower simulated event on a UMD module. The muons (circles) impinge at a certain time (x-axis) on the different segments of the detector, which are coupled to a channel (y-axis), generating a binary signal (lines), which are then matched to a single-muon pattern (rectangles)

A validation test of the complete simulation chain can be found in Appendix B, where we compare the fraction of saturated events in simulations against the expected one as computed from the statistical models in Sect. 2.

3.2 Detector effects affecting the counting strategies

The \({\widehat{\mu }}\) and \({\widehat{N}}_{\mu }\) estimated as explained in Sect. 2 are subject to two sources of bias that are not intrinsic to the counting strategies, and not related to the pile-up either.

In first place, it is possible that one muon does not create an output signal strong or long enough such that it matches the pattern “1111xxxxxxxx”. This is an inefficiency of the detector and of the pattern matching strategy that leads to undercounting, and affects all strategies to the same extent.

In the second place, as can be seen in Fig. 2, the signal after the fast-shaper presents an undershoot. It can happen that a signal of a later muon ends up mounted on the undershoot caused by previous muons in a same channel. If the amplitude of the undershoot is large (very negative) or the amplitude of the later muon signal too small, a pattern match can be missed. The infinite window strategy is the only one insensitive to this effect, because it is enough to match the early muons in the channel to tag it as occupied during the whole trace. All other strategies are subject to undercounting due to undershoot to the same extent. This undercounting effect is due to the design of the electronics, and its impact depends also on the time resolution of the detector and on the length of the single-muon pattern.

To understand the impact of both effects in our test case (signals of SiPMs of the Auger UMD), we quantify the pattern matches lost due to “small signals” and due to undershoot. For this, in each channel we identify whether the muon signal would be matched to a pattern if it were the only muon signal in the channel. If not, then the muon is in principle lost for having a small signal. Approximately \(3.6\%\) muons would be lost in this way, with no dependence on the energy or zenith angle of the originating cosmic ray. However, if the pattern match that the muon would have generatedFootnote 3 overlaps that of other muon of the channel, we consider the muon recovered. The latter happens more often with higher muon rates, this is, for more vertical and more energetic air-showers. The net loss of muons due to small signals can be seen in the upper panel of Fig. 4. In the figure shown, we used proton initiated air-showers with the typical signals in an hexagonal array (for more details see Sect. 3.4). As expected, the net loss is smaller for higher-energy and more vertical air-showers. The net effect is below \(4\%\).

If a single muon signal matches a pattern, as if it were the only muon signal in the channel, we analyze whether that pattern match overlaps with the pattern matches of the total signal of the channel. If this is not the case, the muon is lost due to undershoot. The results are shown in the middle panel of Fig. 4. The muons lost because of the undershoot can amount from \(0.1\%\) for low-energetic, inclined air-showers, to \(3.3\%\) for high-energetic, vertical air-showers.

The total detector effects are simply the sum of the two contributions (i.e. the sum of what is displayed in the upper and middle panels of Fig. 4), and it is shown in the lower panel of Fig. 4. We can see that the dominating effect is the undershoot, thus there are more lost muons for high-energy, more vertical air-showers. The total lost muons due to detector effects range from \(2.6\%\) to \(5.0\%\), and it can reach up to \(5.3\%\) for iron-initiated air-showers.

Fig. 4
figure 4

Average percentage of missed muon counts due to signals being to small or too short (upper panel), due to undershoot (middle panel), and the sum (lower panel), as a function of the logarithmic energy and of the sine square of the zenith angle. We use proton initiated air-shower simulations with the distribution of distances of an hexagonal array

3.3 Air-shower simulations

To continue with our aim of simulating a realistic scenario, we created a library of \(\sim \! 7600\) EASs of proton and iron primaries, using EPOS-LHC [31] and UrQMD [32, 33] as high- and low-energy hadronic interaction models, respectively. The showers were generated using CORSIKA v7.7402 [34]. The logarithm of the primary energy of the showers is uniformly distributed in \(17.2 \le \log _{10}(E/\text {eV}) \le 18.4\) and the arrival directions of the showers correspond to an isotropic distribution with zenith angles in \(0^{\circ } \le \theta \le 48^{\circ }\).

We divide the simulations by primary, in \(\log _{10}(E/\text {eV})\)-bins centered at 17.3, 17.5,..., 18.3 with widths of 0.2, and in \(\sin ^2\theta \)-bins centered at 0.05, 0.15,..., 0.45 with widths of 0.10. For each primary and \((\log _{10}(E/\text {eV}), \sin ^2\theta )\)-bin, we compute an average profile of the number of muons as a function of the (logarithmic) distance to the shower plane and of the time \(\text {d}\mu /\text {d}t \!\times \! \Delta t\). In order to achieve this, we first compute the profile for each shower by retrieving, for each muon that reaches ground with sufficient energy (\(\ge 1\,\text {GeV}/\cos (\theta _\mu )\) for the Auger UMD), the distance to the shower axis on the shower plane and the time it reaches the shower plane. Then, for all showers that fall into the \((\log _{10}(E/\text {eV}), \sin ^2\theta )\)-bin, we make a weighted average of the \(\text {d}\mu /\text {d}t \!\times \! \Delta t\) profiles, where the weight of the i-th shower is its energy \(E_i\) times the cosmic ray flux at that energy \(J(E_i)\). By weighting the showers in this way we obtain the average profile corresponding to a distribution of the shower energies that follows the cosmic ray flux. We model the flux following Ref. [35].

Figure 5 shows an example of the profile \(\text {d}\mu /\text {d}t \!\times \! \Delta t\) for proton EASs with \(18.0 \le \log _{10}(E/\text {eV}) \le 18.2\) and \(27^\circ \lesssim \theta \lesssim 33^\circ \) (\(0.20 \le \sin ^2\theta \le 0.30\)).

Fig. 5
figure 5

Average number of muons per time-bin as a function of the logarithm of the distance to the shower axis (measured on the shower plane) and of the shower plane arrival time. The average corresponds to proton air-showers with \(18.0 \le \log _{10}(E/\text {eV}) \le 18.2\) and \(27^\circ \lesssim \theta \lesssim 33^\circ \) (\(0.20 \le \sin ^2\theta \le 0.30\))

3.4 End-to-end simulations

We generate the first detector-simulation set as follows: For each primary and \((\log _{10}(E/\text {eV}), \sin ^2\theta )\)-bin, we evaluate 10, 000 times the profile \(\text {d}\mu /\text {d}t \!\times \! \Delta t\) at a random logarithmic distance \(\log _{10}(r^{*}/\text {m})\) which we sample from a uniform continuous distribution \({\mathcal {U}}\{1.0, 3.5\}\). This determines the input average number of muons as a function of time \(\text {d}\mu /\text {d}t \!\times \! \Delta t \, \vert \,_{r=r^{*}}\), the integral of which is \(\mu = \mu \,(\log _{10}(r/\text {m}))\,\vert \,_{r=r^{*}}\). We then obtain the number of impinging muons \(N_{\mu }\) from sampling a Poisson distribution of mean \(\mu \). Finally, we sample the times of the \(N_{\mu }\) muons from \(\text {d}\mu /\text {d}t \!\times \! \Delta t \,\vert \,_{r=r^{*}}\). This information is the input of the detector simulation, which assigns random scintillator strips/channels to the muons, simulates the response of the electronics, and outputs the binary signals of the 64 channels, as explained in Sect. 3.1. Then we match the pattern “1111xxxxxxxx” to the binary signals. With this information, we reconstruct the estimated \({\widehat{\mu }}\) and \({\widehat{N}}_{\mu }\) with each of the four strategies presented in Sect. 2 (see Table 1).

We also generate a second detector-simulations set. This one is identical to the first one, except for the distribution of distances to the shower axis. We simulate an hexagonal array of \(750\,\text {m}\) spacing, as well as random event-core positions for the different primaries, energies, and zenith angles. Using the previously parameterized muon profiles integrated in time, \(\mu (\log _{10}(r/\text {m}))\), we can also estimate the number of muons at the detector. We then simulate triggering by requiring that the impinging number of muons is \(\ge 3\). In this way, we can obtain the distribution of the distances to the shower axis, as seen from the shower plane. We observed that the distributions of distances of a same energy are indistinguishable between different zenith angles. However, the exact distribution depends on the primary and on the energy. The latter is explained because more energetic EASs produce more muons, and therefore there are still some of them with enough energy at larger distances to the shower axis that can trigger the detector. Also, heavier primaries produce more muons than lighter primaries of the same energy and then, can trigger stations at larger distances to the shower axis. Figure 6 shows the distribution of station distances for the \(\log _{10}(E/\text {eV})\)-bins chosen in this work, for a 50–50% mixture of proton and iron, for the hexagonal array. It can be seen that the distribution first rises linearly and then falls softly with distance, as expected. The peaks of the distance distributions lie between 500 and 1000 m.

It is relevant to add that we also simulated a square array of \(750\,\text {m}\) spacing, obtaining indistinguishable results in the distribution of distances (cf. Fig. 6) with respect to the hexagonal array.

Fig. 6
figure 6

Normalized distributions of station distances to the shower axis in a simulated hexagonal array, for a 50–50% mixture of proton and iron, for zenith angles below \(48^\circ \), and for different \(\log _{10}(E/\text {eV})\)-bins of width 0.2

4 Evaluation of the counting strategies

4.1 As a function of the true and estimated number of muons

For simplicity, we present the results for \(N_{\mu }\) only, but the general behavior extends to \(\mu \). The difference is that the resolution in the estimation of \(\mu \) is also subject to the Poissonian fluctuations in \(N_{\mu }\). These are dominant when \(N_{\mu }\) is much smaller than the number of segments. In contrast, the detector segmentation is dominant when \(N_{\mu }\) is large, meaning that the resolution in the estimators of \(N_{\mu }\) and \(\mu \) is similar in that case [21].

Fig. 7
figure 7

Relative difference of the muon number estimator to the input number of muons (cf. Eq. (10)) as a function of the input number of muons, for the 1-bin (top), the infinite window (second to top), the N-bin centered (second to bottom), and the N-bin (bottom) strategies. The profiles were generated from sampling uniformly in \(\log _{10}(r/\text {m})\) the average muon profile of proton showers with \(17.8 \le \log _{10}(E/\text {eV}) \le 18.0\) and \(33^\circ \lesssim \theta \lesssim 39^\circ \) (\( 0.30 \le \sin ^2\theta \le 0.40\))

We start by defining the relative difference between the estimated and input (or true) number of muons as

$$\begin{aligned} \varepsilon = \frac{{\widehat{N}}_{\mu }-N_{\mu }}{N_{\mu }}. \end{aligned}$$
(10)

Figure 7 shows \(\varepsilon \) as a function of the incident number of muons \(N_{\mu }\), for proton showers with \(17.8 \le \log _{10}(E/\text {eV}) \le 18.0\) and \(33^\circ \lesssim \theta \lesssim 39^\circ \) (\(0.3\le \sin ^2\theta \le 0.4\)). A small black line segment marks the mean for each distribution. Modules with saturation, for which \({\widehat{N}}_{\mu }\) tends to infinity, are excluded. For reference, we expect that \(1\%\) of the modules are saturated when the number of incident muons is \(N_{\mu }=176\) (see Appendix B). The distributions start to have multiple peaks and an increasing negative bias when saturation is significant. Furthermore, it can be seen that the N-bin strategy presents a larger variance. This is due to the random placement of the signal in the partition of the trace: a set of otherwise identical binary signals \(V_{\text {out}}\) with different start times will be reconstructed as different numbers of muons simply because the signal gets partitioned differently.

Fig. 8
figure 8

Relative bias (top) and relative standard deviation (bottom) in the reconstructed number of muons as a function of the input number of muons for the four strategies considered. The detector-simulations set is the same as that of Fig. 7

Figure 8 summarizes the information of Fig. 7 presenting a comparison of the relative bias \(\langle \varepsilon \rangle \) (top panel) and the relative resolution \(\sigma (\varepsilon )\) (bottom panel) of each strategy. The error bars on the mean \(\varepsilon \) represent the standard deviation of the mean. For the case of the standard deviation of \(\varepsilon \) the error bars were computed using bootstrap. At first glance it is evident that the N-bin strategy presents a significantly larger relative bias (to negative values), and also larger standard deviation than the other strategies. Moreover, the N-bin centered, the infinite window, and the 1-bin strategies have an approximately similar performance with respect to the mean relative bias: they all have a small, mostly negative bias (within \(\pm 10\%\)) dominated by detector effects for an input of \(N_{\mu } \lesssim 200\), presenting an increasingly negative bias above that when the detector starts to saturate. In particular, the mean relative bias of the N-bin centered strategy tends to more negative values, like the N-bin strategy, because of not considering inhibited channels. The 1-bin strategy behaves like the infinite window strategy would with a smaller detector, but tends to slightly more negative values due to the effect of the undershoot. The infinite window strategy is not exempt from bias but it has the smallest. When comparing the standard deviations, we notice that the precision of the 1-bin strategy is approximately equal or greater than that of the other strategies.

The behavior of the bias as a function of the input number of muons of each strategy is similar when considering iron simulations or other \((\log _{10}(E/\text {eV}),\) \(\sin ^2\theta )\)-bins.

It is also useful to understand how the estimated number of muons is distributed with respect to the input number of muons. Figure 9 shows density histograms of the estimated against true number of muons for each of the four strategies. In general we can see that all strategies but the N-bin one distribute reasonably well around the identity (solid grey line). The N-bin strategy clearly deviates from identity. Furthermore, quantization can be noticed at large estimated values for all strategies. This is expected, and can be most easily understood taking as example the infinite window strategy: the largest non-infinite value that \({\widehat{N}}_{\mu }\) can take in the infinite window strategy is given just before saturation, when \(k=n_s -1\). From Eq. (5), this value is \({\widehat{N}}_{\mu } \sim 264\) for \(n_s=64\). The next highest possible value is given when \(k = n_s -2\), at which \({\widehat{N}}_{\mu } \sim 220\). The other possible values are given when \(k=n_s-3\), \(k=n_s-4\), ..., until \(k=0\). For the other counting strategies, there is still quantization, but the combinations allow for more possible values of \({\widehat{N}}_{\mu }\).

Fig. 9
figure 9

Histograms of the estimated number of muons as a function of the input (true) number of muons for the four counting strategies considered: the 1-bin (top), the infinite window (second to top), the N-bin centered (second to bottom), and the N-bin (bottom). A grey solid line represents the identity. The detector-simulations set is the same as that of Fig. 7

Since in real experimental data the true input number of muons is often impossible to know, it is of interest to analyze how the relative bias and the relative resolution depend on the estimated number of muons. This is displayed in Fig. 10. The figure is equivalent to Fig. 8 but plotting against the estimated number of muons instead of the input ones. Similar to Fig. 10, all strategies behave similarly except the N-bin one. The 1-bin, infinite window, and N-bin centered strategies present a small relative bias (contained within \(\pm 10\%\)) and an increasing relative standard deviation until the point in which saturation becomes more frequent. The smallest relative bias is that of the infinite window strategy, but the 1-bin strategy follows it closely. The N-bin strategy presents a behavior that is easier to understand from Fig. 9: At \({\widehat{N}}_{\mu } \sim 100\) most points satisfy \({\widehat{N}}_{\mu } < N_\mu \), causing the large negative average relative bias observed in Fig. 10. While for larger values of \({\widehat{N}}_{\mu }\) the average relative bias approaches zero, from Fig. 9 or Fig. 8, we can see that it is not likely that the true \(N_{\mu }\) maps to the estimated \({\widehat{N}}_{\mu }\).

Fig. 10
figure 10

Same as Fig. 8 but with the estimated number of muons in the x-axis

It is relevant to add that, although the mean biases of the 1-bin, N-bin centered, and infinite window strategies are small, they could be further reduced using simulations. An empirical fit to the mean value of \(\varepsilon \) as a function of \({\widehat{N}}_\mu \) could be performed, and then the fitted function could be used to correct the mean bias.

4.2 In realistic air-shower scenarios

The purpose of the analysis described in Sect. 4.1 is to understand the performance of the different strategies as a function of the input number of muons. However, in realistic data, larger values of input number of muons \(N_{\mu }\) happen with less frequency and only close to the core.

To understand how the different strategies affect the overall bias in the reconstructed number of muons for a given primary and \((\log _{10}(E/\text {eV}),\) \(\sin ^2\theta )\)-bin, we use the second detector-simulations set. Figure 11 shows the distribution of \(\varepsilon \) for 1000 input proton showers with \(17.6 \le \log _{10}(E/\text {eV}) \le 17.8\) and \( 27^\circ \lesssim \theta \lesssim 33^\circ \) (\(0.20 \le \sin ^2\theta \le 0.30\)), for the four strategies considered, for the hexagonal array. The results for other energies and angles are similar. We exclude simulated (module-level) events that would not pass the lower cut \(r>r_{\text {min}}\), where \(r_{\text {min}}\) is the furthest distance to the shower core where there is saturation for the analyzed strategy. At these energies the exclusion of these events has a negligible effect, but at larger energies it makes \(\varepsilon \) slightly more positive for all strategies. A white dashed line marks null bias. The light shaded area presents the standard deviation of \(\varepsilon \) and the colored line shows its mean. The standard deviation of the mean is contained within the colored line marking the mean. We can see that in this example the mean relative bias is mostly small, dominated by detector effects, taking a value of \(-2.5\%\) for the infinite window strategy, of \(-2.9\%\) for the 1-bin strategy, of \(-3.3\%\) for the N-bin centered strategy, and of \(-4.2\%\) for the N-bin strategy.

Fig. 11
figure 11

Distributions of \(\varepsilon \) for the four strategies considered. The width of the colored vertical line, centered at the mean, corresponds to the standard deviation of the mean, and the light shaded area is the standard deviation. A vertical white dashed line marks null bias. We exclude events that do not pass the distance cut \(r>r_{\text {min}}\) (see text for details). Each count is one reconstructed trace, which was generated from sampling r from the realistic distribution (c.f. Fig. 6), and taking as input the average muon profile of proton showers in an hexagonal array with \(17.6 \le \log _{10}(E/\text {eV}) \le 17.8\) and \( 27^\circ \lesssim \theta \lesssim 33^\circ \) (\(0.20 \le \sin ^2\theta \le 0.30\))

Fig. 12
figure 12

Mean \(\varepsilon \) as a function of the logarithmic energy and the sine square of the zenith angle, for the 1-bin (top), the infinite window (second to top), the N-bin centered (second to bottom), and the N-bin (bottom) strategies. We use proton showers in an hexagonal array with distance cuts. The distance distribution is that of Fig. 6

Figure 12 summarizes the mean \(\varepsilon \) as a function of \(\log _{10}(E/\text {eV})\) and \(\sin ^2\theta \) for all strategies, considering proton showers in an hexagonal array and including the distance cuts. We can see that for the 1-bin strategy the bias is contained within \(\pm 4.0\%\), for the infinite window within \(\pm 3.9\%\), and for the N-bin centered strategy within \(\pm 4.4\%\). The 1-bin strategy has a slightly larger bias, which is expected from having a smaller number of available segments on average. For the N-bin strategy, the bias is larger (more negative) reaching \(-5.1\%\). In general, the average biases are small because, as mentioned before, most measurements happen at larger distances to the shower axis, implying a lower number of input muons for which the biases are small. Most of the bias is caused by detector effects mentioned in Sect. 3.2. We remind the reader that the infinite window strategy is insensitive to undershoot (so it is only affected by the efficiency of the detector and pattern matching strategy), while all other strategies suffer from both effects. It is the detector effects that make all biases take negative values.

We can also add that, for iron showers, the biases are in comparison slightly larger for all strategies. This is shown in Fig. 17 in the Appendix C. The distance cut in all cases does not have a significant effect: it can only make the average bias in a \((\log _{10}(E/\text {eV}),\) \(\sin ^2\theta )\)-bin change at most by \(0.2\%\).

4.3 For large or double-bump-like signals

At first it could be thought that the biases of the N-bin strategy arise from splitting the largest part of the signal into two windows. The idea behind it is that the beginning of the matched patterns that fall into one window are mathematically treated as simultaneous, and those of consecutive windows are treated as independent. When the signal is split into two windows, the sum of the estimated muons at each window underestimates the total input number of muons. If this were indeed the problem, centering the window in the signal should be the solution. In the tested cases, the performance of the N-bin centered strategy is quite good. It has a relatively small (negative) bias, and only a larger variance than the 1-bin strategy at a large number of impinging muons. However, its relative success is actually explained because the used input signals are mostly contained within \(37.5\,\text {ns}\) (one 12 time-bin window). This makes the N-bin centered strategy effectively perform as the infinite window strategy, since almost the complete signal is contained within one window. Were the window shorter or the signal wider, the N-bin centered strategy should have larger biases, as the N-bin strategy has. To test this, we design two different input signals as shown in Fig. 13. The first one (top panel) is a log-normal

$$\begin{aligned} \frac{\text {d}\mu (t)}{\text {d}t}&=\, \Theta ((t-t_0)/\text {ns})\, \frac{A}{((t-t_0)/\text {ns})\, \sigma \, \sqrt{2 \pi }} \nonumber \\&\quad \times \exp \left( -\frac{(\ln ((t-t_0)/\text {ns}) - m)^{2}}{2\sigma ^2}\right) , \end{aligned}$$
(11)

with a shape parameter \(\sigma \approx 1\), scale parameter \(m \approx 3\), and location parameter \(t_0 \approx 0.6\,\text {ns}\), with an amplitude A equal to its integral \(\mu \approx 337\). For comparison, the scale parameter is 4 times smaller and the amplitude 25 times larger than that of an average proton shower of \(\log _{10}(E/\text {eV}) = 18.1\) and \(\theta \approx 30^\circ \) (\(\sin ^2\theta = 0.25\)). It is relevant to notice that it would be equivalent to test a signal of standard width considering narrower windows (a shorter pattern), which would correspond to another detector with other electronics. The second input signal (bottom panel) is designed to have a “double bump”, and it consists of two consecutive log-normals separated by a time interval \(\Delta t\) (equal to the difference between the two location parameters \(t_{0,2}-t_{0,1}\)) of our choice. Both log-normals have the shape and scale parameters of a proton shower of \(\log _{10}(E/\text {eV}) = 18.1\) and \(\theta \approx 30^\circ \) (\(\sin ^2\theta = 0.25\)), however the second one has an amplitude \(25\%\) smaller than the first one. In total it integrates to \(\mu \approx 300\).

Fig. 13
figure 13

Input signals used to test the strategies. On the top panel, a “wide” log-normal signal with a shape parameter \(\sigma \approx 1\), scale parameter \(m \approx 3\), and location parameter \(t_0 \approx 0.6\,\text {ns}\). On the bottom panel, two log-normals with the shape and scale parameters of a proton shower of \(\log _{10}(E/\text {eV}) = 18.1\) and \(\theta \approx 30^\circ \), and location parameters \(t_{0,1} \approx 0.6\,\text {ns}\) and \(t_{0,2} \approx 2000.6\,\text {ns}\), with the second one having an amplitude \(25\%\) smaller than the first one

Fig. 14
figure 14

Distributions of \(\varepsilon \) for each strategy, for a wide input signal (top) and a double-bump input signal (bottom). The width of the colored vertical line, centered at the mean, corresponds to the standard deviation of the mean, and the light shaded area is the standard deviation. A vertical black dashed line marks null bias. The percentage of saturated events for each strategy and input signal is indicated in each panel

We create 1048 events randomly sampling the wide signal, and 1300 randomly sampling the double-bump one. For the latter, we fix \(\Delta t\) to \(2000.000\,\text {ns}\), \(2003.125\,\text {ns}\),..., \(2037.500\,\text {ns}\), sampling 100 times each. In more detail, we sample the impinging number of muons \(N_{\mu }\) from a Poisson distribution of mean \(\mu \), and then the times of the \(N_{\mu }\) muons from the designed signals \(\text {d}\mu (t)/\text {d}t\). The distribution of \(\varepsilon \) for each strategy and for the two kinds of input signals are displayed in Fig. 14. In the first case, we can see that the best performing strategy is the infinite window, despite already being in the saturation regime, followed closely by the 1-bin strategy. In the second case, the 1-bin strategy performs the best. As already mentioned, the infinite window strategy is subject to the detector inefficiencies, but is unaffected by undershoot. It is evident that it tends to saturate much more than the other strategies, which, together with the detector inefficiency, explains its bias. On the other hand, the 1-bin strategy is subject to detector inefficiencies and also to undershoot effects. The N-bin centered and the N-bin strategies have larger biases than the 1-bin strategy in both cases, as expected. This proves that the N-bin centered strategy cannot be extended to other detectors where the muon pattern is shorter, and that it underperforms in the Auger UMD when the signal is long or when there are a significant amount of late particles.

This analysis proves that the biases of the N-bin strategy are not completely solved by centering a window at the signal peak, and that therefore the biases are not explained from the signal being split into two windows. The actual reason is that the N-bin strategy does not properly model the detector, as it does not contemplate inhibited channels. This extends to the N-bin centered strategy too.

4.4 Reconstruction of the muon signal with time resolution

The counting strategy developed in this work takes advantage of the complete time structure of the measured signal, allowing to reconstruct the time structure of the signal as seen by the detector to a single time-bin resolution.

We present in Fig. 15 an example of the input muons as a function of time, the average input number of muons as seen by the detector as a function of time, and the estimated average number of muons as a function of time, the latter using the 1-bin strategy. The input number of muons as a function of time are the average muon profile of proton showers with \(17.8 \le \log _{10}(E/\text {eV}) \le 18.0\) and \( \theta \lesssim 18^\circ \) (\(\sin ^2\theta \le 0.10\)) at \(450\,\text {m}\) from the core. The time delay between the input muons and the muons seen by the detector is expected from the propagation of the photons in the optic fiber, as well as from the scintillator and optic fiber delays.

Fig. 15
figure 15

Input number of muons (solid line), input number of muons as seen by the detector (dotted line), and reconstructed number of muons (dashed line) using the 1-bin strategy, as a function of time. The input number of muons as a function of time are the average muon profile of proton showers with \(17.8 \le \log _{10}(E/\text {eV}) \le 18.0\) and \( \theta \lesssim 18^\circ \) (\(\sin ^2\theta \le 0.10\)) at \(450\,\text {m}\) from the core. The average number of muons as seen by the detector is computed by introducing the time delays from the detector in the input muons. The shaded areas represent \(1\,\sigma \) uncertainties

The counting strategy developed in this work opens the door to studies on the temporal structure of the muon signal. This could be used to estimate the depth-of-the-shower maximum of muons [36], which is a great composition-sensitive parameter. Future work will be centered in deconvolving the detector effects in the reconstructed average muon signal, to obtain an estimate of the input muons as a function of time.

5 Summary and outlook

Segmented particle counters, or counters with sub-units in general, can be used to estimate the number of impinging particles. In doing so, the effect of pile-up needs to be accounted for. This effect occurs when two or more particles hit the same segment (or sub-unit) of the detector within a time interval so short that they cannot be individually resolved. It constitutes a source of undercounting.

In this paper we presented and compared four counting strategies that account for the pile-up effect: the simplest “infinite window”, the “N-bin” strategy, the “N-bin centered” strategy (an improved version of the N-bin strategy), and the “1-bin” strategy developed in this work. They are all based in the solution to the classical occupancy problem, or, as stated in Sect. 2, the “balls in boxes problem” (where the balls are the particles and the boxes are the segments). The main difference between the strategies is the duration of the window in which the muon pattern matches of different segments are considered simultaneous: the complete trace for the infinite window strategy, the length of the single-muon pattern for the N-bin and N-bin centered strategies, and the time resolution for the 1-bin strategy. The difference between the N-bin and N-bin centered strategies is that the position of the windows is optimized for the latter, such that the center of the output signal coincides with the center of a certain window. The key difference of the 1-bin strategy with respect to the rest is the consideration of inhibited segments.

These general counting methods find a concrete application in the muon counters of the Underground Muon Detector of the Pierre Auger Observatory. We thus took the latter as our study case, to test and compare the different counting strategies.

We showed that for typical time structures of the muon signal in a detector like the Auger UMD, all strategies but the N-bin one perform well. For all strategies but the latter, the mean bias is contained within \(\pm 10\%\) as long as saturation is not significant. At high input number of muons, the standard deviation of the estimated number of muons of the 1-bin strategy is the smallest and the one of the N-bin strategy the largest. We also observed that the average bias of each strategy for every \((\log _{10}(E/\text {eV}),\) \(\sin ^2\theta )\)-bin for typical data are small (within \(\pm 6\%\)), but that they are larger (more negative) for the N-bin strategy. Most of the bias is actually caused by detector effects, due to the signal undershoot and the detector and pattern matching strategy efficiencies.

When taking an input signal with a wider time structure or with a double-bump-like signal, we observed that the 1-bin and infinite window strategies perform the best. That analysis proved that the biases found in the N-bin strategy are inherent to the method, which does not take into account the inhibited channels as such. The N-bin centered strategy has the same design problem.

Lastly, we showed that we can reconstruct the time structure of the muon signal as seen by the detector to a single time-bin resolution using the 1-bin strategy. No other known strategy offers such resolution. This opens the door to new studies of the temporal structure of the muon component. Such studies can be key for composition analyses.

Our analyses lead to the conclusion that the counting strategy developed in this work is generally as good or better than the other strategies. It only has a slightly larger bias than the infinite window one, but unlike the latter, it can be used to infer the muon time structure as seen by the detector to a single time-bin resolution.

Finally, the counting strategy developed in this work could be possibly applied for counting photons produced in liquid scintillators with photo-multiplier tubes (PMTs), a typical layout of neutrino experiments. As mentioned in Sect. 1, the strategy is only useful when the processing of the PMT signals is performed applying a discrimination threshold (counter mode), and not by analyzing the amplitude or charge of the signal (integrator mode). In such context, the estimated number of scintillation photons produced in a neutrino event can be used to estimate the energy of the neutrino (see for example Ref. [37]). More precisely, the counting strategy could be applied to each set of PMTs lying equidistant to the interaction vertex, where the expected scintillation photon rate is the same. In spherical detectors, these set of PMTs lie in rings that correspond to the intersection of spheres centered in the vertex with the greater spherical array of PMTs. This would be the case, for example, of the Sudbury Neutrino Observatory + (SNO+) [38], and of the Jiangmen Underground Neutrino Observatory (JUNO) [39]. In cylindrical detectors, the group of PMTs which expect equal rate would follow more complex curves determined by the intersection of spheres centered at the vertex with the cylindrical array.