ournal of C osmology and A stroparticle hysics J Online triggers for supernova and pre-supernova neutrino detection with cryogenic detectors

. Supernovae (SNe) are among the most energetic events in the universe still far from being fully understood. An early and prompt detection of neutrinos is a one-time opportunity for the realization of the ﬁrst multi-messenger observation of these events. In this work, we present the prospects of detecting neutrinos produced before (pre-SN) and during a SN while running an advanced cryogenic detector. Recent advances in the cryogenic detector technique and the discovery of coherent elastic neutrino-nucleus scattering oﬀer a wealth of opportunities in neutrino detection. The combination of the excellent energy resolution of this experimental technique, with the high cross section of this detection channel and its equal sensitivity to all neutrino ﬂavors, enables the realization of highly sensitive neutrino telescopes of the size of a few tens of cm, as the newly proposed RES-NOVA experiment. We present a detailed study on the detection promptness of pre-SN and SN neutrino signals, with direct comparisons among diﬀerent classes of test statistics. While the well-established Poisson test oﬀers in general best performance under optimal conditions, the nonparametric Recursive Product of Spacing statistical test (RPS) is more robust for triggering astrophysical neutrino signals with no speciﬁc prior knowledge. Based on our statistical tests the RES-NOVA experiment is able to identify SN neutrino signals at a 15 kpc distance with 95% of success rate, and pre-SN signal as far as 450 pc with a pre-warn time of the order of 10 s. These results demonstrate the potential of RPS for the identiﬁcation of neutrino signals and the physics reach of the RES-NOVA experiment.


Introduction
The era of neutrino astronomy started in 1987 when neutrinos from the first extra-galactic source were detected [1]. This was the renowned SN1987A, which produced in total about 25 events in different detectors around the world [2]. Only 30 years later, a second source was identified TXS-0506+056 [3,4]. This was a Blazar, and it marked the birth of multi-messenger astronomy, thanks to the detection of its electromagnetic counterpart. Having the possibility to predict when and where the next high-energy cosmic event will take place, it will be a major breakthrough, because it may lead to the Holy Grail of multi-messenger astronomy: the simultaneous detection of neutrinos, electromagnetic radiation and gravitational waves. Supernovae (SNe), which are among the most energetic events in the Universe, are interconnected with many aspects of astroparticle physics and astronomy. In fact, when massive stars (> 8 M ) become SNe almost their entire binding energy is released as neutrinos [5]. These high intensity neutrino fluxes are one of the seed for the nucleosynthesis of heavy elements, at the same time the remnants of the explosions can act as accelerator for Ultra-High-Energy cosmic rays, but they can also trigger stellar formation [6]. The detection of neutrinos is key in this framework for two reasons: first, they are direct probes of the central engine of the SN and they are thought to be responsible for the stellar explosion; second, they can provide an early alert of the forthcoming event. Actually, neutrinos are emitted prior to the gravitational collapse determining the SN event, anticipating it by minutes or even days [7]. These "pre-Supernova" neutrinos are produced at the late stage of Si burning and give insight into processes in the deep interior of massive stars prior to their deaths [8]. When these neutrinos are observed, they can anticipate the explosion as early as a few hours or days [9], enabling the preparation of all available detection techniques for all the emission components -1 -

JCAP10(2022)024
of the event, namely gravitational waves, electromagnetic components, and neutrinos. For this reason these are usually defined as pre-Supernova (pre-SN) neutrinos. In this work we will focus on a relatively small detector, if compared to other currently running neutrino observatories, that can identify these neutrinos tens of seconds before the occurrence of the SN event.
Currently, pre-SN neutrinos were never observed. The challenge in detecting them is two-fold: the first reason concerns the low rate of SN events, especially the galactic ones. Second, compared to conventional SN neutrino emission, pre-SN neutrinos have lower average energies (< 5 MeV, whereas for an SN event 10 MeV). Furthermore, flux intensities are many orders of magnitude lower, even when considering nearby events ( 1 kpc). However, the chances of observing these weak signals are still not null because the galactic SN rate is not uniform throughout the Milky Way [10]. Especially if we look at all six historically recorded galactic SNe, they all occurred at distances < 3 kpc from us [11]. This represents about 20% of the galactic rate, although this region represents only 4% of the area of the galactic disk. This demonstrates that the Earth is in a very active region of the Milky Way [12], and it is likely that the next SN event will occur in our vicinity. In addition, the latest technological advancements and the upgrade of detectors currently operating with advanced signal discrimination capabilities have also enhanced their sensitivity to such weak signals. In this framework, the recent Super-Kamiokande upgrade [13] with Gd will enable a more efficient discrimination of inverse-beta decay events [13] enhancing its sensitivity to the pre-SN signal [13]. Moreover, the recent discovery of Coherent Elastic neutrino-Nucleus scattering (CEνNS) [14] has broadened the perspectives of observing this signal using a neutral current channel. In fact, as noted in [15], CEνNS is an ideal channel for the detection of pre-SN neutrinos given: its high cross section, 10 3 times higher than the inverse beta decay (IBD) one, equal sensitivity to all neutrino flavors and lack of a kinematic energy threshold, so that also neutrinos with energies lower than 1.8 MeV can be detected [16].
Among the different experimental techniques which can exploit CEνNS for studying the properties of neutrino sources, cryogenic calorimetric detectors are the most promising ones. In fact, they demonstrated to achieve ultra-low energy thresholds and precise energy reconstruction [17] (no energy quenching), which is relevant for the detection of low energy nuclear recoils induced by neutrino scattering via CEνNS. In addition, in recent years the scalability of this technology to large volume arrays was also demonstrated [18], as well as the flexibility in operating different target materials [19][20][21][22][23][24][25].
In this manuscript we will review the methods for detecting neutrinos from the late Si burning stage of stars with cryogenic detectors. The main focus of this work will be a study of the expected neutrino signal induced in different target materials (i.e., PbWO 4 , CaWO 4 and Ge) with demonstrated promising features as cryogenic particle detectors. We will also investigate advanced statistical trigger methods for a prompt online detection of CC-SN neutrinos. Finally, we will show the potential of the previously discussed online triggers for the specific case of pre-SN neutrinos, with the aim of providing multi-messenger alert to the scientific community before the SN event occurrence.

Pre-and Supernova neutrinos
Two types of emissions drive the production of pre-SN neutrinos: thermal pair processes and nuclear weak processes [26]. The following reactions fall within the first class of emissions: e − -e + annihilation, plasmon decay, neutrino bremsstrahlung and photoprocesses. Depending on the progenitor star's mass, density and temperature, the rate of the different processes may   Figure 1. Characteristics of the pre-Supernova neutrino emission from a progenitor star with 15 M mass placed at 160 pc (same distance as Betelgeuse [29]). The model considered is [26].
vary. For massive stars with mass > 8 M , the main reaction channel is pair annihilation [8]. All these processes produce (anti-)neutrino of all flavors (ν x /ν x , for x = µ, τ ). The second type of neutrino emission, which becomes dominant just before the core-collapse [27,28] (about 400 s before the core-collapse), are nuclear weak processes such as: electron-capture, β − /β + -decay and positron captures. These are the main source of ν e /ν e , which make the largest fraction of the pre-SN neutrino emission. Clearly, the neutrino flux intensity and average energies increase for all flavors as the time of the collapse approaches. In fact, the core temperature and density increases yielding to neutrino of higher energies. The relevance of nuclear weak processes is visible in figure 1, where at 400 s before the collapse when electron-captures become the dominant reaction. There, the average energy and flux intensity of ν e increase at a higher pace than all the other flavors, leading to a pre-SN neutrino flux composed primarily by ν e . Some structures are also visible in the time profile of the pre-SN neutrino emissions, like at 10 5 s which corresponds to the transition between the O and the Si burning stages. A detailed discussion of all the processes that steer the evolution of neutrinos can be found in [26][27][28].
Pre-SN neutrino fluxes are expected to be weaker than the signal produced during a SN event. As shown in figure 1, at about 100 s prior the core-collapse the total flux intensity is about 10 10 ν/cm 2 /s, while assuming the neutrino source at a distance of 160 pc. The same progenitor star would produce a neutrino flux with an intensity of 10 16 ν/cm 2 /s during the -3 -

JCAP10(2022)024
core-collapse of SNe (CC-SNe). State-of-the-art detectors have masses of O(10 kton) [30] that enable the possible detection of these feeble neutrino signals. The golden channel for their detection is IBD, but this is still not the ideal channel given the limited cross-section (σ IBD ∼ 10 −41 cm 2 for 10 MeV neutrinos), and the kinematic threshold allows the detection of only the higher energy tail of the neutrino thermal distribution. Very few events are expected to be detected even when the source is in the vicinity of Earth, O(200 pc). CEνNS might offer the opportunity to overcome the limitation of the present technology, due to its high sensitivity [15] to the entire spectrum of pre-SN emission. Depending on the type of target material, a cross section as high as 10 −38 cm 2 for 10 MeV neutrinos can be achieved. A not exhaustive list of SN candidates [7] that might enable the detection of pre-SN neutrinos contains: Antares (150 pc), Betelgeuse (160 pc), -Pegasi (210 pc), π-Puppis (250 pc), σ-Canis Majoris (340 pc), NS Puppis (520 pc), CE Tauri (550 pc) and 3 Ceti (640 pc).
Similar arguments apply to the detection of CC-SN neutrinos, but the achievable sensitivities do not differ much between conventional technologies and the one based on CEνNS. This is due to the increase of the average neutrino energies above the critical threshold of 1.8 MeV. However, CEνNS detectors offer the unique possibility of detecting with high statistics the ν x /ν x component.

Pre-Supernova and Supernova neutrino detection with cryogenic detectors
Cryogenic calorimeters are ideal devices for the detection of low energy nuclear recoils. Details on the working principle of cryogenic detectors can be found in the following references [31][32][33]. This technology was demonstrated to be effective, especially in direct Dark Matter (DM) experiments, where the expected signals are nuclear recoils with very low energies 1 keV range [34], the same type of signature expected from CEνNS interactions.
The most relevant aspects for the study of CEνNS interactions of SN neutrinos concern the achievement of low-energy detector thresholds O(100 eV) and the background level in the region of interest (RoI) O( 1 c/keV/kg/d).
Despite their relatively slow time response, their modular operation makes them particularly appealing when dealing with high count rates, compared to monolithic detectors [35]. This last case corresponds to Supernova event occurring near the earth.

Signal expectation
For our sensitivity studies on the detection of the feeble pre-SN neutrino signal with cryogenic detectors, we consider three target materials: PbWO 4 , CaWO 4 and Ge. Each of these compounds has shown to achieve excellent detector performance. In fact, leading limits in the DM-regular matter interaction parameter space are established with these materials. CaWO 4 and Ge crystals are operated as cryogenic detectors for the search of DM by the CRESST [36,37] and SuperCDMS/Edelweiss experiments [38,39], respectively. They achieved leading detector energy thresholds, as low as 30 eV [36] and low-background in the RoI, about 1 c/keV/kg/d [40]. PbWO 4 is also a very promising candidate for our studies as widely discussed in [41]. This crystal is expected to reach outstanding background level when produced from archaeological Pb [42]. The RES-NOVA experiment [35] is planning to operate these crystals, and interesting results have already been achieved in terms of the energy threshold and background level [43,44]. All of these compounds cover a wide range of target The different recoil spectra colors are produced by pre-SN signal at different times anticipating the SN core-collapse. The SN is assumed to be at 160 pc (same distance as Betelgeuse [29]). Data are taken from [26]. masses, allowing exploration of neutrino-nucleus interactions with a broad variety of nuclear species, as well as investigation of beyond the standard model physics [45].
The detector responses to the pre-SN neutrino signals shown in figure 1 are represented in figure 2. These are the recoil spectra produced by neutrino interactions via CEνNS. These are computed multiplying the number of target nuclei, N target , for the total neutrino energy spectrum at time t ttc (time to collapse) φ(E ν , t ttc ), and for the cross-section, dσ CEνNS /E R . These quantities are then integrated over the different neutrino energies: The differential scattering cross section of CEνNS interactions is as follows: where θ W is the Weinberg angle, 1 Z and N are the proton and neutron numbers of the target nucleus, m N the mass of the target nucleus, E R the energy recoil of the target nucleus, E ν the neutrino energy and f (q) is the form factor. The latter term describes the coherency of the process as a function of the transferred momentum q = √ 2m N E R . The experimentally most relevant dependence of eq. (3.2) is N 2 , favoring the use of target material with large neutron number. In this context, Pb-based detectors have a great potential.
As discussed also in section 2, the intensity of the neutrino flux increases as the time to the collapse approaches. This is shown in figure 2 by the higher interaction rate as the collapse approaches. In addition, the higher-energy end of the recoil spectra shifts to higher energies, as a result of the increasing average neutrino energies. In the same figure, the characteristic features of the CEνNS process are also recognizable: • Target nuclei with a higher neutron number lead to higher interactions rates: • Lighter target nuclei have higher energy recoils: Er max Ge > Er max CaWO 4 > Er max PbWO 4 . Experiments that wish to detect pre-SN neutrinos at earlier times need to operate large volume detectors, at the ton scale, and they need to operate in ultra-low-background conditions and low-energy threshold. In figure 3, the instantaneous interaction rate is shown for different target materials and different thresholds. This is calculated by integrating each recoil spectra of figure 2 between the detector energy threshold (300 eV, 30 eV and 1 eV) and 50 keV. To anticipate a SN event through the detection of pre-SN neutrinos, background counting rate in the RoI of < 10 −2 cts/ton/keV/s is needed, as well as an energy threshold 1 keV. In the following, we will consider only PbWO 4 crystals as target material, given that this ensures the highest neutrino counting rate among the candidate compounds, and thus it enables to provide longer pre-warn time for SN events. The RES-NOVA experiment, which aims to deploy an advanced neutrino telescope, is planning to use an array of PbWO 4 crystals produced from archaeological Pb, with a total active volume of only (60 cm) 3 (equivalent to 1.8 tons). RES-NOVA plans to achieve a background level of about 10 −3 cts/ton/keV/s in RoI for the detection of pre-and CC-SN neutrinos, while operating in anti-coincidence mode [35].
The RoI, that will be considered in the following, for the detection of pre-SN neutrinos with PbWO 4 detectors lies between 1 eV and 4 keV. We are assuming an optimistic case of achieving 1 eV of energy threshold, for defining a benchmark best case scenario, which allows the detection of pre-SN neutinos with a pre-warn time of > O(10 s). For the RES-NOVA experiment, the expected background rate in this RoI is 0.018 cts·s −1 (2.5·10 −3 cts/ton/keV/s × 1.8 tons × 4 keV). This is the value that will be adopted for our sensitivity studies on pre-SN neutrinos.
The expected signal produced from a CC-SN in a cryogenic PbWO 4 detector was already presented in other works. For the sake of simplicity, we invite the reader to look at figure 5 of ref. [41]. There the RoI extends from the detector energy threshold, assumed at 1 keV, up to 40 keV. In this case, we decide to consider a more realistic energy threshold, as a very optimistic one (e.g. 1 eV) will not significantly improve the expected neutrino signal amplitude. For CC-SN neutrino events in the [1,40] keV RoI we consider a background rate of 0.18 cts·s −1 (2.5·10 −3 cts/ton/keV/s × 1.8 tons × 40 keV).

Background considerations
In the following sections, we will develop a trigger for the live detection of signals from CC-SN, failed CC-SN and pre-SN neutrinos. The background clearly plays a crucial role in the identification of a positive signal. It has to be pointed out that, in a real setup, especially when dealing with low-background experiments, the radioactive backgrounds are difficult to assess exactly and do show a time dependence that we do not account for. Uncertainties on these spoil the application of simple Poisson statistics for the determination of expected rates and the confidence on them. Furthermore, not all backgrounds can be attributed to radiogenic origin. An example of this comes from the CRESST experiment, where it is observed that there are time periods (minutes of duration) where the trigger rates are substantially higher than the standard operating conditions [36,46], due to instabilities of the cryogenic system. The cryogenic technique that we investigate in this work is well optimized for DM searches, where all these issues can be addressed in off-line analysis [47]. The application of such technology for the live and prompt detection of transient signals of astrophysical origin must not rely on human analysis and therefore must be fully automated and robust against such kinds of disturbances.
For what concerns the radioactive background, the best possible estimation for the background rate r bkg is its direct measurement and monitoring once the experiment is set in operation: the background rate can be extracted from a selection of collected data using Monte Carlo methods, and once an estimate is available, it can be used to define the parameters of the analysis, as we discuss in section 5. The situation is more complicated when dealing with the other sources and because of that, in the following we will present other test statistics beyond Poisson counting.

Early identification of neutrino signals
The next galactic SN will bring information on physics processes that cannot be studied in any terrestrial experiment, and the elusive rate of such an event makes this information extremely valuable. For the first time in history, technologies to detect neutrinos, gravitational waves, and electromagnetic radiation from SN events are in place. It is of uttermost importance to record all possible data in the best quality, and to do so, the SN event needs to be detected as early as possible.
The Supernova Early Warning System (SNEWS) is an international group of neutrino sensitive experiments aiming at providing the astronomical community with an early alerts for SN events. Being able of combining the signal from experiments sited at different locations on the globe brings several advantages. Firstly, it allows to increase the detection sensitivity, especially for weak signals coming from distant SNe. Secondly, it suppresses the Poissonian background fluctuations combining signals from experiments located at different laboratories, so that backgrounds are uncorrelated.
A multi-messenger observing strategy is key to fully exploit the wealth of information carried away by neutrinos. The neutrino emission starts before the core's collapse even begins, meaning that neutrinos can provide an early warning signal. Knowing when and possibly where to anticipate the signal dramatically improves detection prospects. During the stellar collapse of the core, the neutrino emission is accompanied by the emission of GWs. As discussed in [7], the arrival time of the neutrinos can also act as a trigger for SN, increasing the sensitivity of GW experiments. In addition, an early detection of neutrinos, and possibly pre-SN neutrinos, can anticipate the electromagnetic burst by several minutes or days [7].

Time response in cryogenic particle detectors
In cryogenic detectors, particle interactions cause a temperature increase in the sensitive volume that is measured by means of a thermometer. Best sensitivities at low energies are achieved with TES (Transition Edge Sensors), where a superconductor is kept in an intermediate state between the normal conducting and the superconducting regime and the excellent sensitivity is determined by the steepness of the resistance value as a function of the temperature [31]. The temperature rise induces a measurable variation of the TES resistance, which is related to the energy deposited in the absorber.
The development of thermal signals in TESs [48] directly depends on the specific geometry and layout of the sensor. A thermal pulse of a few keV of energy on a hundreds gram absorber develops over a time scale of about 500 ms [49]. This parameter is particularly important when designing an online trigger, especially when detecting SN neutrinos. To achieve maximum sensitivity at trigger level, the detector datastream is fed through a non-causal matched filter [50]. The non-causality of the filter requires a software processing in Fourier domain that, in order to avoid Gibbs distortion [51], needs to process signals that are of duration twice as long at the signal itself. This extra-duration is, in fact, simply a set of extra digitized samples, half of them before the signal and half past the signal. This effectively introduces a delay of half duration of the original signal, and the time between the actual occurrence of the (single) particle interaction and its identification is, at minimum, of about 750 ms. The time development of signals in cryogenic detectors is rather long compared with other technologies (e.g. PMT in liquid scintillator). However, the high modularity of these detectors enable to reduce to a negligible level the detector dead-time caused by pile-up events. More details on the effect of pile-up of neutrino events in a cryogenic neutrino telescope can be found in [35]. There the sensitivity of the RES-NOVA experiment is discussed for the case of high-intensity neutrino signals (e.g. nearby SNe) and for weak signals (e.g. far away SNe).

Statistical tools and data processing
This section discusses approaches for building a triggering system to detect transient events -such as SNe -based on the real-time data stream of a neutrino detector. Detected signal events are interspersed with background events that, for now, we will consider to be distributed according to a fixed-rate Poisson process, of which we know the true rate. The top panel of figure 4 shows an example of the expected count rate in a RES-NOVA like detector for neutrinos from a SN at a distance of 10 kpc, together with the uniform expectation of background events. The middle panel show how an example data stream could look like, generated from random variates of the expected count rate. We want to find a statistical method that can deliver a yes/no answer in near real time to decide whether there was a SN signal present in the data. The false alarm rate (FAR) (i.e., type i error rate) -as an external constraint to our system -can on average be no below 1 per week, as required for participation in SNEWS [30].
A standard way to analyze such time series data is to use fixed or variable length windows in time, and reduce the task at hand to decide whether the events inside a window exceed the expected Poisson count from the background rate. If the background rate is exactly known, and the windows are non-overlapping, the threshold for a given FAR can be directly calculated from the Poisson distribution. Since such a configuration depends on the location of the time window edges, often overlapping windows are used. For 50% overlapping windows, approximations for the calculation of the p-value can be used. Such overlapping time window  Poisson tests represent the current state-of-the-art, as used, for example, in [53]. Alternative approaches have been proposed, for example, with dynamic time windows [54]. The bottom panel of figure 4 shows the Poisson p-values for 1 s, 50% overlapping windows for our example, and a threshold value that results in a FAR of 1 per 15 days. This type of system has a few parameters, including the background rate r bkg that can be estimated from background-only data, and the window configuration. There is a balance between choosing the window size ω large enough so that most of the signal is contained within the window and at the same time small enough so that signal events will not be washed out by an additional background contribution. The refresh rate, i.e., how often is a window analyzed, is another parameter of choice. For a refresh rate of 1/ω we have the configuration of non-overlapping windows, and 2/ω would correspond to the 50% overlap. Since we want to have the freedom to explore more complicated window choices, and later also different statistical tests, we first introduce a simulation based method to calculate critical values for a desired FAR.

Computation of critical values
Given a custom test that operates at a certain refresh rate, we can calculate a test statistic value T S, which for example could be the Poisson p-value itself. However, for overlapping windows this quantity T S can no longer be interpreted as the p-value of the test, and its JCAP10(2022)024 distribution is in general unknown. To make a statistical statement about T S we need to know, or rather estimate, its cumulative distribution F T S .
The estimation F T S can be obtained using simulated data, producing values of T S for the detection of neutrinos with a predetermined rate of the background-only scenario. The simulation cannot be done with independent simulations, since this would remove the important correlations of successive values of T S in consecutive time windows. Therefore, we simulate an extended run of the experiment and collect the values of T S in a serial fashion, at least for time scales of the order of a day and below.
Since we are interested in using F T S to construct very low FAR thresholds for our analysis, we need a good approximation of its distribution for extreme values. This means in practice that we need to simulate and analyse a very long run of our experiment to produce enough statistics. In our simulations, we simulate between 25 and 100 years of background data.
Since the dataset modelling F T S was obtained through simulations, it means that it is completely dependent on the setup of the simulated experiment, namely the background rate r bkg , the refresh time t r , the window size ω and the definition of the test statistics T S. If any of the simulation parameters are changed, the dataset needs to be recalculated. Out of the parameters listed above only one of them will not be specified by us during the real operation of the experiment, and that is the background rate r bkg . The estimation of this parameter is discussed in detail in section 3.2, but for now we can assume that it is known using a nominal value of r bkg = 0.18 cts/s. Finally, given a model of F T S and a false alarm interval τ false , expressed in seconds just like the refresh time, we can derive the corresponding threshold value T S * for the trigger: This threshold estimation holds for any possible test T S that can be used to implement a trigger and is how the thresholds are calculated for all the test statistics we considered.

Trigger evaluation and comparison
Given a specific setup of the experimental parameters t r , ω, and T S, we can assess the efficiency of the trigger by evaluating the success rate when it comes to trigger activation in the presence of signal events. In order to test this, we will simulate experiments in which we inject events that follow a possible model distribution of neutrinos after a SN explosion, as shown in figure 4. In this we present results pertaining to a small selection of neutrino flare models, although the number of proposed models is abundant in literature and unknown in reality [6].
The number of neutrino events λ sig will be determined by the distance of the SN and after repeating these experiments a large number of times, we can estimate the fraction of successful trigger activations (i.e. 1−type ii error). Figure 5 shows the maximum distance to achieve a 95% rate of success for different choices of the window size parameter ω, as a function of the time after the explosion. The refresh time t r is kept constant at 0.5 s, an indicative value that matches the expected overall throughput of the raw data processing rate as discussed in section 4.1.
Examining figure 5 we notice that around one second after the SN explosion the trigger starts to activate with a sharp turn on due to SN neutrinos. For very short windows, not all signal can be contained inside the window and the curve dies down rapidly again. For larger windows, further distances can be probed, since more of the signal can contribute to the statistic inside a window. For windows that are too large, however, more background  events are being picked up that deteriorate the performance again. So there is an optimal window size, for the example in figure 5 this lies at around 5 s.

Non-parametric tests as alternatives to Poisson
In the case of an optimal choice of window size and known background rate, the Poisson test will, in general, perform well. We have not found any alternative test outperforming an optimized Poisson test. However, the Poisson test relies on the fact that the background rate is known or can be reliably estimated from the data. This may not always be the case, or the background rate can even fluctuate. Furthermore, considering different signals of various time scales and shapes, or even a priori unknown transient signals, we want to explore alternatives to the Poisson test.
We investigate non-parametric tests as a viable alternative to, or used in combination with, Poisson. Non-parameteric tests are widely used in the scientific community for assessing the goodness-of-fit of a specific distribution given data, and to give an example one of the most widely known tests is the Kolmogorov-Smirnov (KS) [55,56] test. In our application, the null hypothesis is events only from background, resulting in a flat, i.e. uniform, distribution.
Non-parametric tests follow different strategies to compute test statistic values and the associated p-values, and can be broadly be categorized into tests based on the empirical distribution ("EDF" statistics), and tests based on the spacings between samples ("spacings" statsitics) [57,58]. The former includes the KS test, and for example also the Anderson-Darling (AD) [59] test, while the latter includes for example tests such as those discussed in refs. [60][61][62], or the more recent RPS test [58].
The KS and AD tests -both being EDF statistics -are very similar, since they compare the empirical distribution of events against the expected cumulative distribution. AD in contrast to KS includes a weighting factor which causes it to be most sensitive to signals located at the extrema of the analysis window. The RPS test on the other hand takes into account the spacings between consecutive events, specifically their product, in order to identify clusters of closely spaced events in the analysis window. Given an initial list of ordered events it is possible to recursively construct layers of events by considering the midpoints of a previous layer and sum up the contributions (the product of spacings) from each layer. The detailed definition of the RPS test and its implementation are described in [58] with a Python package available. 2 The pseudo code illustrating the RPS implementation is shown in algorithm 1.
In our study, we have evaluated several such statistical tests, and compare below the best performing tests of each category. To compare and evaluate the performance of different tests, we consider a simulated experiment with a background rate of r bkg = 0.18 cts/s, signal expectation of λ sig = 29.65 cts at a reference distance of 10 kpc and a refresh time t r = 0.5 s. We inspect the sensitivity of analysis windows of various sizes and perform a first screening by filtering for the SNe farthest detected at the 95% success rate. To guarantee a fair comparison, the trigger thresholds for each test were evaluated in the same way as the one for the Poisson test, i.e., simulating an extended run of the experiment assuming a known background rate. For comparisons across different tests, we condense the information given by success rate curves as in figure 5 into a single number corresponding to the maximum distance that can be explored at the set success rate of 95% for a given test and window size. The results comparing the sensitivity through a selection of tests are shown in figure 6. In particular we show here the best performing test based on the rate (Poisson), the EDF (KS) and spacings (RPS). As we can see, for short analysis windows, the Poisson test outperforms the others, but as we increase the window size, the KS and RPS tests become more sensitive and yield better results. Looking at the furthest distance probed by each test for any given window size, the Poisson test appears to be the most sensitive, with the RPS test as a close second. Out of the test statistics we studied, the Poisson and the RPS tests excelled due to their sensitivity, and in the following section we will show that for nonoptimal signal shape, window size, or background rate choices, RPS can in fact outperform Poisson.

Application to prompt detection of SN neutrino emission
Following the previous example of CC-SN neutrino detection, after analyzing different window sizes ω and different test statistics, the best choice in terms of the farthest successfully detected SN signal from the one shown in figure 4 is a window of 5 s analyzed with the Poisson test. The signal distribution used in this example is just one possible signal that we would like to detect with our experiment. A very short list of possible SN models is available in [63], where 30 models are presented with time distributions spanning from 0.5 s to 15.4 s. When selecting the correct analysis scheme, i.e., the window sizes and tests to use, we should also study the robustness of our choice against multiple models. As an example, we consider an alternative 2 https://pypi.org/project/spacings/. signal distribution, modelling a neutrino burst coming from a failed CC-SN event that results in the formation of a black hole, as depicted in the right panel of figure 7. These models are 1D hydrodynamical simulations performed by the Garching group [52]. They are the same adopted in [41] and named LS220 and failed-SN fast, and they refer to progenitor stars with 27 M and 40 M , respectively. In the latter case, the signal strength that is seen by the detector is λ sig = 16.39 cts, weaker than the one induced by the CC-SN LS220 model and this will result in shorter distances that can be probed by the detector. We repeat the same analysis previously described, namely, estimating the maximum distance at which we can reliably detect a neutrino burst with a 95% success rate, while at the same time considering different values of the background rate, to account for possibly higher background levels in our experiment. We analyze both the CC-SN and the failed CC-SN signals shown in figure 7 using both the Poisson test and the RPS test, and the results of this study are shown in figure 8. Looking at these results, we notice that for both signals, as the background rate increases, the 95% detection horizon starts to decrease. Given a fixed background rate, we notice that, while using the Poisson test, it is possible to achieve the furthest detection only for a select few analysis windows, while the horizon probed via the RPS test appears to be much more robust to changes of the window size, an effect that is particularly visible in the case of the failed CC-SN signal. If we have detailed knowledge of the background affecting our experiment at any given time, and especially if we knew the time distributions of all the signals we might detect, then we could select the best combination of test statistic and window sizes. Looking at the results of figure 8 it would appear that the Poisson test is the most sensitive, provided that we have detailed knowledge of both the background and the signal. Although there are lists of different possible signals, in order to maximize the detection of all signals we might run a dedicate analysis for each proposed model. Such an approach would translate in running a multitude of parallel analysis streams, each with their own optimized window size for a given background rate. Our objective is to integrate our analysis with the SNEWS alert system; thus, we must curtail the FAR of our final analysis. If we were to use independent analysis windows, then the FAR of each analysis stream would have to decrease proportionally to the total number of windows, which would discourage having too many of them. Additionally, such an approach may well not be the best suited one when we consider the sensitivity of our analysis to unknown signals whose model was not considered during the development of the analysis scheme. Furthermore, during the operation of our experiment, the background may realistically experience fluctuations in time, which could affect the sensitivity  of the analysis windows. In order to limit the number of analysis windows we might need, and in order to retain good sensitivity against background fluctuations or with respect to unknown signals, we consider using few analysis streams, each with their own window size and using either the Poisson test or the RPS test. To gauge the potential and shortcomings of either test, we can test the sensitivity of the analyses optimized against a known signal with a known background against another signal distribution at different background levels. We present the results of this study in figure 9. If we consider a CC-SN signal and a nominal background rate of 0.18 cts/s, we can select one of the best window size for each test, i.e., the window sizes that allow the detection of the furthest sources. Once we have selected one such window for each test, we increase the background rate and estimate the new horizon with 95% trigger success. These results are reported in figure 9 (top-left) where we notice that both horizons are decreasing, as expected, while the Poisson one remains dominant. If instead of the CC-SN signal we try to detect the failed CC-SN signal, while retaining the CC-SN-optimized windows, in figure 9 (top-right) we see that the horizon delivered by the RPS windows is roughly the same as the Poisson one for the nominal background rate and for higher backgrounds it becomes the better one, meaning that the RPS analysis proves to be more sensitive to narrower than expected signals compared to the Poisson analysis. If we repeat the same analysis, this time optimizing with respect to the failed CC-SN signal and then testing against the CC-SN one, we notice that both analysis are equally sensitive to the latter signal.
These results, coupled with the overall picture presented in figure 8, show that the RPS analysis can be more sensitive that the Poisson one when considering different signal distributions, as in a real-case scenario, especially when the detector operates in high background conditions.

Triggers for pre-SN neutrinos
In the previous section, we described in detail our analysis scheme and the methods involved in estimating both the background neutrino rate and the threshold for a trigger system, using a combination of different test statistics. The examples we showed above presented the results for the detection of neutrinos produced shortly after the relevant event occurred, such as neutrino flares coming from SN explosions or BH formations. Here, we study the sensitivity -14 -JCAP10(2022)024 Figure 8. Maximum distance probed at 95% success rate for different background rates and window sizes. The refresh time is kept constant at 0.5 s. The white corners in the bottom row plots are due to the high total event expectation surpassing 10 3 , which is currently the upper limit when it comes to the parametrization of the RPS test. of our experiment when it comes to the detection of neutrinos preceding a SN explosion. The time distribution of these precursor neutrinos is shown in figure 3, where we clearly notice that this signal is increasing exponentially as the SN explosion approaches.
When dealing with pre-SN neutrinos, the effective background rate we can estimate after the energy cuts is much smaller than the CC-SN case. For the purpose of the next example, we will consider a background rate r bkg = 0.018 cts/s, while the neutrinos rate coming from the signal distribution is λ sig ≈ 154 cts at the reference distance of 160 pc. Although the expected signal count is indeed quite high for these precursor neutrinos we notice that they are mostly concentrated close to the explosion, given the highly exponential behavior of the distributions shown in figure 3.
As before, we can estimate the maximum distance of an SN explosion that would activate our trigger 95% of times. Since we find ourselves in deep Poisson regime when considering the combined background and signal event counts, we present only the results reported in figure 10, which shows a selection of the best analysis windows combined with the Poisson test.
For the pre-SN neutrinos, we have the option to optimize our analysis either towards the early detection of close sources, using short analysis windows (∼ 15 s), or towards the detection of the furthest achievable sources, using longer analysis windows (∼ 70 s). These two cases are shown in the left and right panels of figure 10 respectively. Although the shorter window sizes are able to push the horizon slightly further, we notice that the horizon increases as we approach the SN explosion, making small gains less attractive. Looking at figure 10, we can state that our experiment is capable of detecting precursor neutrinos up to ∼ 15 s before   the explosion with a success rate of 95% at a distance of about 160 pc, approximately the distance at which Betelgeuse is located. Looking at the maximum probed distance, we notice that we are able to foretell a SN explosion circa 450 pc away up to a few seconds before its occurrence. The next galactic SN will be an exceptional occasion to study the physics of these poorly understood fascinating phenomena, with exciting prospects in astronomy, astroparticle, and particle physics. As of today, the technology to detect the gamma, gravitational waves, and neutrino signals emitted by such events is in place.
The coherent elastic neutrino-nucleus scattering is a very appealing detection channel, due to its large interaction cross-section and equal sensitivity to all neutrino flavours, for CC-SN neutrinos are supposed to populate roughly equally all the leptonic families.
In this work we have investigated the potential of low-threshold cryogenic particle detectors to detect the neutrino signal emitted prior the CC-SN event, and introduced a general framework to define the parameters of an online trigger for the detection of pre-SN and CC-SN neutrinos in the context of an international networks, such as SNEWS.
We have also discussed the advantages of non-parametric test statistics for the application in a real-case scenario, where the details of the sought-for signal are unknown and not all the experimental conditions are fully under control. We have proved that RPS can outperform the widely utilized Poisson counting, when no specific prior is considered.
The application of this newly developed algorithm demonstrated the capability of the cm-sized RES-NOVA experiment to detect CC-SNe as far as 15 kpc with a 95% success rate (and 20 kpc with 50% success rate). This result underestimates previous calculations of the sensitivity of RES-NOVA to CC-SNe [35,41]. The discrepancy is due to the fact that in the present work, we investigate the live detection of CC-SN and failed CC-SN neutrinos without any knowledge of the onset time of the SN signal. This approach, which is more realistic, accounts for large background fluctuations that may mimic the SN signal while running the detector for long periods of time (type I and type II error). On the contrary, in the previous works based on maximum likelihood analyses, the sensitivity was evaluated knowing when there was a positive signal in the simulated data (type II error only). This is equivalent to consider the experiment "on" for only short time periods and, consequently, with limited background fluctuations. The investigation carried out in this work is an exhaustive study of what a real-world experiment of such kind can achieve on its own.
Finally, we show that RES-NOVA can detect the feeble signal from pre-SN neutrinos at distances up to 450 pc and anticipate the occurrence of CC-SN up to O(10 s), when a very low detector energy threshold is achieved.