Search for low mass dark matter in DarkSide-50: the bayesian network approach

We present a novel approach for the search of dark matter in the DarkSide-50 experiment, relying on Bayesian Networks. This method incorporates the detector response model into the likelihood function, explicitly maintaining the connection with the quantity of interest. No assumptions about the linearity of the problem or the shape of the probability distribution functions are required, and there is no need to morph signal and background spectra as a function of nuisance parameters. By expressing the problem in terms of Bayesian Networks, we have developed an inference algorithm based on a Markov Chain Monte Carlo to calculate the posterior probability. A clever description of the detector response model in terms of parametric matrices allows us to study the impact of systematic variations of any parameter on the final results. Our approach not only provides the desired information on the parameter of interest, but also potential constraints on the response model. Our results are consistent with recent published analyses and further refine the parameters of the detector response model.

The frontiers of physics are often explored conducting experiments at the limit of the detector sensitivity.In such a circumstance it is extremely important to control and correctly evaluate the effect of systematic uncertainties.This is particularly relevant when hints of a new signal are sought in event samples contaminated by a significant background that might amplify the impact of systematic effects and thus dilute the relevance of the observation.The search for dark matter candidates with direct detection experiments is one of such cases where a very rare and feeble signal is searched for in a huge background of events, mostly induced by cosmic-rays and natural radioactivity.In this scenario, robust results in arXiv:2302.01830v2[hep-ex] 26 Apr 2023 terms of projected experimental sensitivities, as well as exclusion limits, or hints of new physics are only achieved after a deep understanding of all relevant experimental effects.
In the past decade, a number of experiments have been searching for dark matter with masses in the range of a few GeV/c 2 and below, pushing the sensitivity to their experimental limit in terms of total exposure and energy threshold.The current status of the art is led by experiments exploting scintillation light and ionization charge [1][2][3][4][5][6] or heat [7,8].In particular, the DarkSide-50 (DS-50) experiment [5,6], a large volume dual phase argon Time Projection Chamber, has set the strongest constraint on the spin-independent cross section for dark matter masses below 3.6 GeV/c 2 .
In the search for very rare phenomena, the optimal strategy is to identify and reject all background events while retaining a significant fraction of signal events.In this ideal case, often referred to as zero-background search, a handful of candidate events is enough to claim a discovery.More commonly, it is not possible to efficiently separate signal from background events and a different strategy is needed.A refined data analysis has to be put in place to compute the probability that the observed candidate events are due to new physics.Such analyses are based on the so called likelihood function that provides a parametric model for the probability to make an observation assuming certain hypotheses.A detailed and sound description of detector effects and background sources has to go in the likelihood before possible discrepancies observed in the data can be ascribed to new phenomena.
The likelihood function typically depends on a number of parameters, some of which, called parameters of interest, represent the physics quantities relevant for the measurements, some others, called nuisance parameters, encode the detector response and the background properties.Although the likelihood function is at the basis of the inferential processes both in the Bayesian and Frequentist approaches, the impact of the nuisance parameters on the parameters of interest is treated very differently.
In the Frequentist case, the likelihood function is maximised and an approximated dependence of the parameter of interest on the nuisance parameters is obtained through the so called profiling procedure1 [9].However, the dependence of the parameter of interest on these parameters is in general non-linear, and very complicated.For these reasons, analysis approaches based on the profiling of the likelihood of the experiment, valid under linearity, symmetry, or "Gaussianity" assumptions [10], might not be able to reproduce in an accurate way the propagated uncertainties on the parameter of interest.
In the Bayesian approach, a joint posterior probability density function (pdf ) for all parameters is constructed from the likelihood function and the prior pdf.
The impact of systematic uncertainties on the parameters of interest is obtained by integrating (marginalising) the posterior pdf over the nuisance parameters.This procedure is straightforward and well motivated by probability theory.The main criticism to the Bayesian method related to the intrinsic 'subjective' nature of these prior pdf s is not relevant in this case, since the pdf s for the nuisance parameters are normally determined by ancillary measurements.
Independently of the inferential approach, the construction of the likelihood function tailored on the specificity of the measurement is a challenging task.Given the complexity of the detector response and the diverse origin of the background sources, the likelihood function is often sampled with Monte Carlo (MC) simulations.Expected differential event rates are constructed as a function of some relevant observables in the form of histograms of events.These histograms, known as templates, are an approximation of the pdf s for the observables given some specific set of parameters describing the experiment.Different configurations are explored by computing new templates from MC simulations run with different sets of parameters.Given the typical size of millions of events needed to produce accurate templates, this procedure is very time-consuming.To overcome this limitation, a few points in the parameter space are chosen as representative of the systematic variations with respect to the best model.New templates are derived from the computed ones by linear interpolation or more advanced morphing techniques [11].
This work shows that, under certain circumstances, the likelihood function can be expressed as an analytical or semi-analytical function of the relevant parameters, making it unnecessary to run large MC simulations to account for systematic effects.A similar approach, not cast in the Bayesian inference language, has been presented in Ref. [12][13][14].Alternative analyses incorporating machine learning techniques have been showcased in Ref. [15,16].In addition, our paper describes a new technique based on probabilistic graphical models, also known as Bayesian Networks (BN) [17][18][19][20], to take into account systematic uncertainties.In a BN the probabilistic relations between the physical quantities and the observations are evident, and the dependence on detector effects and background contributions is made explicit, allowing for reasoning about causes and effects within the model [21][22][23][24][25][26][27].To our knowledge, this approach has first been proposed for parametric inference in presence of data points affected by systematic uncertainties in Ref. [28], and later used to describe the Bayesian unfolding in Ref. [29].
This technique has the advantage over the widely used profiling methods to be exact in terms of uncertainty propagation [30], to not rely on template morphing, and to properly take into account cross correlations between parameters and phase space regions.In addition, if the physical parameters describing the detector response model and constrained by calibrations are retained as parameters inside the likelihood function, this method gives the possibility of verifying the goodness of the calibrations and, a posteriori, further constrains the detector response model.
The rest of this article proceeds as follow.In Sec. 2 we describe the BN method and its implementation for an oversimplified DM direct detection experiment.The method is applied to the low mass DM analysis of the DarkSide-50 (DS-50) experiment.The description of the experimental setup and the data-set employed in this study is contained in Sec. 3.
Section 4 describes the detector response model and the implementation via the BN method.In Sec. 5 we show the DS-50 likelihood, while in Sec.6 we describe the technical implementation.Finally, in Sec. 7, we illustrate the results of this method in terms of sensitivity and exclusion limits for the low mass DM analysis, exploiting both the nuclear recoil (NR) and Migdal effect (ME) [31] signals.The ME signal has been recently studied in Ref. [32][33][34][35][36][37][38][39][40][41][42][43][44][45], and exploited in the search for light DM in Ref. [6,8,[46][47][48][49][50]. Being these signals a combination of NR and electronic recoil (ER) energy releases, we also test the simultaneously handling of the detector calibrations of the two channels.We obtain comparable sensitivity with respect to the recent published analysis [6].We also show that making the likelihood explicitly dependent on the detector parameters gives us a much better control over the systematic effects and allows improving the knowledge on the detector response parameters exploiting the new data.In Sec. 8 we draw our conclusions.

Graphical method for Bayesian inference
According to the Bayesian Networks method, the probability density function of a collection of random variables can be represented by a network made of arrows and nodes where: 1. the nodes represent the variables; 2. a solid arrow between two nodes represents a probabilistic link between the two variables; 3. a dashed arrow between two nodes represents a deterministic link between the two variables; 4. a gray node indicates the corresponding variable has been observed.
To briefly illustrate the method, let us take as an example the search for a rare process in presence of a background contribution [51,52].This is typically described by a Poisson likelihood, defined as where x is the observed datum, λ is the intensity of the Poisson process, λ B regulates the intensity of the background contribution, and λ S represents the signal strength parameter we want to determine.Figure 1 shows the BN for this simple measurement.We are interested in inferring p(λ S |x), namely the pdf of λ S , conditioned to the observation of the node x.In other words, looking at the BN of Fig. 1, we want to determine how the information obtained with the observation of the node x propagates backwards in the network to the parameter of interest λ S .In this sense, the Bayesian inferential process can be regarded as an information flow from the observed nodes to the parameters of interest.Once we draw the network, we determine the relations represented by each of the links, and we fix the observed nodes, the rules of probability allow determining the pdf of the unobserved nodes conditioned to the measured data p(λ S , λ B , λ|x), also called the posterior pdf, or simply the posterior.If we are only interested in λ S , we can obtain the posterior p(λ S |x) integrating over the nuisance parameters' space.

Implementation for dark matter direct detection experiments
For this work, we consider the dual phase noble liquid TPC approach to search for DM exploiting the ionization channel only [53][54][55][56].Simplifying as much as possible, the experiment consists in counting the number of detected events in the active volume as a function of the measured amount of detectable quanta produced during the primary event.The number of detectable quanta is in turn a measurement of the energy of the recoiling target particle.Finally, a histogram of the observed spectrum is obtained.In order to put constraints on the possible DM signal contribution to the observed spectrum, two main ingredients are needed: 1. a detector response model describing how the kinetic energy transferred to the target particles is translated into the number of detectable quanta measured by the experimental apparatus.According to the type of experiment, the target material, and the readout system, this response model can also be highly non-linear, and the parameters regulating it are usually constrained by a set of preliminary calibration measurements.2. a background model describing the relevant background contributing to the final observed spectrum.
These two models allow computing the expected spectrum starting from the theoretical background and signal spectra.
The common way to implement these two models for the analysis is via a toy MC approach, in which the final expected spectrum and its ±σ (standard deviation) variations are computed before the fit.During the fit, a morphing procedure is used to take into account possible variations of the spectral shape.According to this approach, a new set of nuisance parameters is used; the number of these newly added parameters and their correlations are chosen on the basis of ad hoc and case dependent prescriptions, while their physical interpretations in terms of physical systematic parameters is often lost.In other words, due to the re-parameterization of the likelihood, the post fit results can not easily be interpreted in terms of the original physical parameters describing the systematic effects.
We developed a method to compute the final expected spectrum as an analytical function of the theoretical spectrum and the experimental parameters.In-deed, the probability to measure a certain number N q of detectable quanta given a certain kinetic recoil energy E and a certain set of experimental parameters θ, can be decomposed as where N (0) q is the originally produced number of detectable quanta, namely the number of detectable quanta before applying other detector related effects such as response non linearity, efficiency, or resolution.Since we have the possibility of computing these two pdfs analytically and since the spectra we are dealing with can be treated as vectors, we can express the final expected spectrum S f in i as the following linear combination of the theoretical spectrum S th k : where These two matrices could depend on the background source or on the readout channel.The ability to compute the entries of M 1 and M 2 , called the smearing matrices, allows us to obtain the final expected spectrum via Eq.(3) and to perform the fit on the observed one by means of linear algebra operations.Figure 2 (top) shows the Bayesian network describing all the process.In particular, S (0) j is the intermediate spectrum after applying only the M 1 matrix; the dots indicate possible preliminary calibration measurements constraining θ; the boxes in different gray intensities represent the fact that there are many copies of that portion of the network, one for each background or signal component; x i indicates the number of observed events in the i-th bin, while λ i is the Poisson expected value in the i-th bin; λ S and λ B are normalization parameters regulating the intensity of the signal and the background contributions, respectively.Once the BN is constructed, one can use it in a twofold way.Topdown, going from the parameters of the model to the observation, it can be used to simulate events by sampling for example with a Markov Chain Monte Carlo (MCMC); or bottom-up, going from the observation to the parameters of the model, it can be used to perform the inference and measure the parameter of interest.As an example of this method, Fig. 2 (bottom) shows graphically an intermediate node of the BN during the sampling phase, namely a possible background expected spectrum (S f in i ) for different configurations of the θ parameters (gray lines).In addition, the green curve corresponds to the best calibration values of θ obtained a posteriori after a fit to a background only observation.From this figure, it is clear that each set of calibration parameters produces a background template that cannot be parametrized with simply a normalization and shape variation without losing the correlation among bins.

The DarkSide-50 experiment
The DS-50 experiment exploits a dual-phase liquid argon (LAr) time projection chamber (TPC), operated in Italy at the INFN's Laboratori Nazionali del Gran Sasso (LNGS).Two measurable interactions can be observed in the 46.4±0.7 kg active target: light from scintillation in the liquid (S1) and ionization electrons.A 200 V/cm electric field in the LAr volume drifts the ionization electrons up to the gas pocket, where they are extracted by an electric field of 2.8 kV/cm into the gas phase, producing a secondary pulse of light (S2) by electroluminescence.The ultraviolet photons from the S1 and S2 signals are converted by a tetraphenyl butadiene wavelength shifter that covers the internal surface of the TPC into visible radiation.Two arrays of 19 3-in photomultipliers (PMTs), located above the anode and below the cadhode, detect these photons.The TPC is enclosed in a stainless steel cryostat and lies inside a 30 t boron-loaded liquid scintillator veto equipped with 110 8-in PMTs, in order to actively reject neutrons.This is surrounded by a 1 kt ultra-pure water Cherenkov veto with 80 PMTs that acts as a cosmic muon veto and as a passive shield against external backgrounds.Further details on the detector can be found in Ref. [53,[57][58][59][60].

Event selection
This analysis uses the full DS-50 exposure of E DS = 653.1 live-days, from December 12, 2015 to February 24, 2018.The event selection is exactly the same as the one used for the recent DS-50 publications on the search for low-mass DM [5,6] and it is described in details in Ref. [5].We define the region of interest (ROI) as where the ionization response is calibrated [61] and backgrounds are well-understood [5].This corresponds to the NR(ER) energy range [0.06, 21] keV er ([0.64, 393] keV nr ), matching to the number of electron range N e within [4,170].Below 4e − , a non-negligible contribution to the background model of spurious electrons captured by impurities along and re-emitted with a delay is present.This analysis considers only single scatter events with a single S2 pulse, except for 'echoes' (pulses induced by one or more e − extracted from the cathode from S1 or S2 photons via photoelectric effect).Several quality cuts based on S2 / S1 and on the topological distribution and the time profile of the S2 signal are implemented.These cuts reject events with overlapping pulses [5].Additional cuts are applied in order to remove events with an anomalous start time, associ-ated to random coincidences between very low S1 and S2 pulses from the anode, alpha particles emitted near the TPC walls, whose S1 photons induce S2 pulses by extracting electrons from the cathode, and spurious S2 pulses, induced by electrons captured by impurities.After the quality and selection cuts, the final data-set results in an exposure of 12202 ± 180 kg d.

Background model
The ROI is dominated by internal backgrounds, such as the 85 Kr and 39 Ar decays occurring in the LAr fiducial volume, and external backgrounds, including radiation from contaminants in the PMTs and stainlesssteel cryostat.Additional negligible backgrounds originate from radiogenic and cosmogenic neutrons, and coherent elastic neutrino-nucleus scattering from solar and atmospheric neutrinos.The spectral shapes of the internal backgrounds take into account recent calculations of atomic exchange and screening effects, validated on measured 63 Ni and 241 Pu spectra down to 200 eV [62,63].From 0 eV to 200 eV a linear uncertainty on such corrections ranging from 25% to 0% is assumed.Other systematics on the spectral shape come from the ionization response, modeled via Monte Carlo simulations [61], and subdominantly from the uncertainty on the Q-value [64].The external background model is based on simulations of each material component as measured during the material screening campaign.The input for the simulation are given by these measurements and the associated uncertainties, after the correction because of the decrease activity due to the elapsed time at the dataset date.A more detailed description on the background models can be found in Ref. [5].

DarkSide-50 response model
The detector calibration and its response has been performed in Ref. [61] for both ER and NR energy deposits.
The ionization yield of an ER or a NR, denoted by the symbol Q y , is defined as the average number of ion-electron pairs surviving recombination per unit of energy.The two models describing the ionization yields, validated and constrained by the calibration measurements [61], are a modified version of the Thomas-Imel box model for the ER [65] and the Bezrukov model for the NR [66].The ER ionization yield is given by where E er is the energy of the ER, and a 0 = 2.41±0.58,a 1 = 21.0 ± 2.2, a 2 = 0.11 ± 0.03, and a 3 = 1.71 ± 0.08 are the parameters of the model constrained during the calibration measurements [61]. 2 The NR ionization yield is given by where E nr is the NR energy, and f (C N R box , E nr ) and N i (f B , E nr ) are two analytical functions of the energy and of C N R box = (8.05±0.15)V/cmand f B = (0.67±0.02) [61], which are in turn the two parameters of the model constrained during the calibration measurements.
The ionization response to ER (NR) is measured down to 180 eV er (500 eV nr ), corresponding to ∼ 9 (3) ionization electrons, respectively.The ionization response to both ER and NR is the lowest threshold ever reached in liquid argon.These results are obtained by fitting the specific ER and NR ionization models to 241 Am 9 Be and 241 Am 13 C neutron sources data, βdecay data of 39 Ar, and electron captures of 37 Ar obtained during the DS-50 calibration campaign, and by external datasets from the SCENE [67] and ARIS [68]experiments.

The Bayesian Network method for DarkSide-50
In this section we discuss the implementation of the BN method for the DS-50 response model.In particular, we describe how to keep the dependence on the calibration parameters up to the final N e − spectrum, where N e − is the number of reconstructed primary electrons.
The detector response can be schematized in the following consecutive steps: 1. conversion of the deposited energy to a certain number of detectable quanta (e.g.number of primary electrons) produced during the interaction; 2. detection efficiency or non linearity effects that depend on the position of the events inside the TPC; 3. resolution effects of the photodetectors (e.g.PMTs); 4. effects induced by trigger and analysis event selection.
All these steps contribute to distorting the original theoretical energy spectrum into a different observed one.

From energy deposit to reconstructed electrons after recombination
The incoming particles interacting with the active volume inside the TPC can produce an ER or a NR.In terms of detector response, the difference in the deposited energy between the two cases lies in the production mechanisms of detectable quanta.This dependence is described by the ionization yield of an ER or a NR.The average number of primary ionization electrons produced is given by where k denotes the ER or NR process, E k is the energy deposited in the process k, Q k y is the k ionization yield per unit of energy and θ cal = {a 0 , a 1 , a 2 , a 3 , C N R box , f B } is the complete list of calibration parameters that regulates the ER or NR yield functions.The production of an ion-electron pair surviving recombination is a stochastic process, and it can be represented by a binomial process.The maximum number of electrons that can be produced at a given energy E N R can be estimated as where w = (19.5 ± 1.0) eV is the liquid argon average work function [69].It follows that the probability that a certain amount of energy is released in the TPC in the form of an ion-electron pair can be estimated, using Eq. ( 7), as As a result, the probability of having produced a certain number N e − of ion-electron pairs is given by the binomial distribution where The probability of having a certain number N e − of primary ionization electrons can be represented as where and F is the Fano factor [70].In this way the statistical fluctuations of the number of produced detectable quanta for ERs are implemented as normal fluctuations.The expected spectrum in N e − after recombination can be computed from the probabilities in Eqs.(10) and (12).Defining x th j as the energy of the j-th bin and y th j the content of the j-th bin of the histogram of the theoretical ER or NR spectrum, we introduce the probability matrix M 1 as where N i e − is the number of primary ionization electrons in the expected spectrum.As a consequence, the expected spectrum S N e − i can be computed as the product of the M 1 matrix and the theoretical spectrum where we have omitted the ER and N R indices to simplify the notation.
The M 1 probability matrix has some important properties.It is not a square matrix, and, since the total probability is one, the sum of the columns of the matrix is equal to unity What is remarkable is that the M 1 matrix as defined in Eq. ( 13) explicitly depends on the calibration parameters, and thus their uncertainties play the role of the systematic uncertainties of our experiment.Taking into account these parameters directly inside the likelihood, would allow treating the systematic uncertainties in a very clean and straightforward way, without using multi-templates methods to propagate them.This will be clearer and more explicit in the next sections, where the analysis will be described in detail.
A different way to proceed must be considered for the Migdal effect because electrons both in the NR and ER channels are produced.Therefore, the total number of electrons produced in a single event is the sum of the electrons released by the NR and those released by the ER.The probability of releasing primary ionization electrons, given a NR with energy E nr and a Migdal emission depositing an energy E er , is given by where we did not report the dependence on θ cal for shortness of notation.In the above equation, which is valid assuming no interference between the two energy releases during recombination, we can identify p( i−k,l , see Eq. ( 13), and p(E nr = x th j , E er = x th l ) is the double differential Migdal rate normalized to unity.Making the indices explicit, we obtain where R indicates the normalized double differential Migdal rate, satisfying the condition The Migdal expected spectrum S N e − ,M ig i after recombination is simply obtained by substituting the normalized double differential Migdal rate in Eq. 17 with the original one.

Detector effects: efficiency, radial corrections, and PMT response
The two main effects that play a sizable role in the reduction of the S2 signal yield are the so-called radial correction and electron lifetime efficiency [61].The former effect can be parameterized as an efficiency factor depending only on the radial position of the event.The latter is instead due to the electron lifetime inside the TPC, namely the probability that an ionization electron is captured by electro-negative impurities in the liquid chamber.This is a small effect that depends mainly on the distance between the event and the liquid-gas interface, and therefore on the event depth inside the TPC.
Since we are dealing with energy spectra where the information on the position of the events has been integrated out, we simulate the theoretical spectra retaining the energy and 3D position information.As a consequence, we have access to the position and the related total correction factor of each event.We use this information to numerically compute the pdf to have a certain correction ch src in a given event.This pdf depends on the PMT channel and on the background/signal source spatial features.The result of this procedure is a set of numerical functions (one per source and PMT channel) over which we integrate to get the full convoluted effect.These pdf s depend only on the theoretical spectra, and do not depend on the calibration parameters.They can be therefore computed once before the final MCMC integration, and used as an input for the analysis.
An additional effect due to the PMT channel corrections has to be taken into account.In fact, the contributions from the various PMT channels are not simply summed up in the data spectrum.The PMT response has been equalized to the central PMT.As a consequence, we need to apply the same correction when implementing the detector response model to be compared with data.This correction is a simple multiplicative factor r ch in the PMT energy response that depends on the PMT channel.
Finally, the PMT resolution effect can be treated as a Gaussian smearing effect, similar to the ER Fano fluctuations of Eq. (12).We can therefore express the probability that an event from the source src in the PMT channel ch is detected to have N f e − = i extracted electrons having originally produced N (0) e − = j electrons surviving recombination as where µ = ch src r ch j, σ = S ch src r ch j, b w is the width of the bins of the final observed N e − histogram, ch src is the overall correction factor and p( ch src ) is its pdf as computed by means of the Monte Carlo.Furthermore, N (x|µ, σ) is the normal pdf with mean µ and variance σ, r ch is the channel correction factor, and S = 0.27 is a width factor that has been determined during the calibration.We then define a set of matrices such that we can compute the final expected N e − spectrum S f ch,src in the PMT channel ch induced by the source src as The M 2 matrix depends only on the channel corrections, on the width factor S and, by means of the pdf, on the theoretical spectra.These quantities do not depend on the calibration parameters θ cal .They can be computed once before the final MCMC integration, and used as an input for the analysis.This gives great benefits in terms of performance, because it means that, unlike the two M 1 matrices, M 2 does not need to be computed at each step of the MCMC algorithm.
In conclusion, once we have S f ch,src , we can obtain the final expected spectrum S f ER,N R by summing over all the PMT channels and over all the sources We validated the new NR and ER response model on the implementation of code used for the calibration, for the published DS-50 and for the Migdal analyses [5,6,61], and based on a toy MC simulation of the detector response.

Likelihood and parameters
In the following, we assume a bin-by-bin Poisson likelihood defined as where x i denotes the number of events in the data spectrum in the i-th bin, θ indicates generically all the parameters of the fit -i.e. the calibrations, the signal rate, and the background rates.In the case under consideration, λ i (θ) is given by This parametrization of λ is an extension to the one exploited in Ref. [39] to include the detector response model.Here S src i represent the expected background Fig. 3 Bayesian network for the DS-50 low-mass analysis: the node x i is the observed number of events in the i-th bin; λ i is the intensity of the Poisson process in the i-th bin; the gray box contains the nodes and connections that are repeated over the total number of bins N bins ; the dots represent the portion of the network implementing the detector response model in the form of the two smearing matrices M 1 and M 2 ; besides σ DM , which is directly related to r S in our case, all the nodes outside the gray box are the free parameters of the likelihood, as described in Sec. 5.
and signal spectra for the total exposure E DS as a result of the detector response, see Eq. ( 22).The variables r B,src are proportional to the rate of the internal and external background components.Since, for simplicity, the background spectra are normalized to the DS-50 exposure, they are normalized such that r B,src = 1 corresponds to the case in which the exposure is equal to the DS-50 exposure.
The parameter r S is proportional to the signal rate with a flat prior.The signal spectra are normalized to the DS-50 exposure and computed for σ DM SI = 10 −38 cm 2 .Therefore, r S = 1 corresponds to σ DM SI = 10 −38 cm 2 .The total exposure is denoted by E and E DS is the DS-50 exposure of the analyzed dataset.The uncertainty on the exposure is implemented with a normal prior with a 1.5% standard deviation [5].The various S src i spectra are in turn functions of a possibly different subsets of parameters encoding various aspects of the detector response and background model, and spectrum-specific uncertainties.
The complete likelihood is represented as a Bayesian Network in Fig. 3.As we discussed in Sec. 2, this representation makes clear the structure of Eq. ( 23)- (24) and the dependence of the spectra on the various nuisance parameters.In the following, we give a detailed description of its implementation.

Signal spectra
The signal spectra are explicitly described with two contributions: one due to NR interactions (S NR ), and another one describing the Migdal effect (S Mig ).The nuclear recoil contribution is derived assuming the Standard Halo Model with a DM escape velocity v esc = 544 km/s, the local standard at rest velocity v 0 = 238 km/s, v Earth = 232 km/s, and the DM density ρ DM = 0.3 GeV/c 2 /cm 3 [71].The Migdal effect contribution to the signal spectra has been computed as in Ref. [6] exploiting the Migdal probabilities computed in Ref. [33].
Figure 4 shows the signal spectra for DM masses of 4.5 GeV/c 2 (blue), 1.1 GeV/c 2 (orange) and 0.42 GeV/c 2 (green), for σ SI DM = 10 −38 cm 2 .The solid curves show only the NR contribution, while the dashed ones only the Migdal effect.
We are not considering any theoretical systematic uncertainty on the signal spectra, nevertheless they could be easily implemented as additional nuisance parameters.

Background spectra
The background contributions described in Sec.3.2 and shown in Fig. 5 are separated in four main spectra, two internal induced by 39 Ar and 85 Kr, and two external produced by the materials of the PMT and the cryostat.They are denoted respectively with S Ar , S Kr , S PMT , and S cryo .The relative normalizations have been determined by dedicated measurements and Monte Carlo simulations, as described in Ref. [5].Their systematic uncertainties are implemented as a normal prior centered in 1 and with a 14% ( 39 Ar), 4.7% ( 85 Kr), 12.6% (PMT) and 6.6% (cryostat) standard deviation., respectively.The Q-value uncertainties are implemented as two Gaussian parameters regulating the 39 Ar and 85 Kr spectra, with the intensity dependent on the energy.Specifically, the energy spectrum, for k = 39 Ar, 85 Kr, is given by: where y k,(0) th (E er ) is the central theoretical spectrum, r(E er ) is the relative uncertainty due to the uncertainty on the Q-value, Θ is the Heaviside function, and σ k scr and σ k Q are both controlled by a standardized normal pdf N (0, 1) as prior function.

Spectra dependence on the detector response parameters
Both the signal and the background spectra depend on θ cal which represents the calibration parameters.The result of the calibration measurements [61] are implemented as a multivariate normal prior.
Eq. ( 22) allows us to compute for any specific detector response configuration (identified by a choice of the parameters θ cal ) the associated background and signal spectra.In this section, we give some examples on how the spectra change as a function of θ cal and show how our implementation is substantially different from constructing average spectra with the corresponding ±σ variations.
Figure 6 shows the effect of sampling from the prior pdf of the nuisance parameters onto the signal and the 39 Ar spectra.We chose the 39 Ar as a representative background.We show only 30 different randomly selected spectra to keep the plot readable.We stress that these spectra are not chosen on the basis of their shapes.The bottom part of each sub-figure shows the relative difference with respect to the spectrum obtained keeping all nuisance parameters to the central value of their prior (nominal spectrum).From these figures, it is visible how the nuisance parameters have a non-trivial effect on the spectra: (1) overall as well as in specific bins there is a sizable difference with respect to the reference spectrum; (2) more importantly, there is a significant shape difference, possibly with more than one crossing.
At any given value of N e we can construct the pdf of the expected number of events and compute the expected value and the ±σ intervals.From these values we can construct the average spectrum (solid pink curve), and the ±σ (dash-dotted pink curve).Given the nonlinearity of the problem, in general the envelope spectra are different from those computed with the corresponding choice of the θ cal parameters.Sizable differences are clearly visible both in total event yield and in shape, especially for the signal spectrum.In addition, the envelope spectrum loses part of the bin-bin correlations, and it may represent a spectrum which does not correspond to any specific configuration θcal of the detector response.The method presented here naturally takes into account the correlations between the θ cal parameters, 3 and the correlation between different spectra induced by the θ cal parameters.
The right plots of Fig. 6 show four different signal and 39 Ar spectra that manifest large differences with respect to the nominal spectrum (black curve).For each of these spectra, the bottom plot shows the nuisance parameters pulls with respect to their prior expected values.Although these configurations are not very likely, 2 σ variations in the parameters' value have a substantial impact on the spectrum, inducing effects as large as doubling the event yield in certain bins.
The implementation in the signal and background models of the systematic variation of the detector response described in this section is the key element for the correct uncertainty propagation in the fit results.

Fitting procedure and code implementation
The fit samples from the space of possible detector response models, computes the corresponding spectra both for the signal and backgrounds, tries to fit the observed spectrum, and finally weights the result by the probability of the specific response model sampled.In this way the average model and the corresponding uncertainty are computed from the pdf of the model that fits the observed spectra.
The posterior of all the parameters is sampled by means of the Metropolis-Hastings MCMC algorithm, as implemented in BAT [72,73].The BAT package is a set of C++ libraries implementing statistical tools for Bayesian analyses, that has been largely used in experimental and phenomenological analyses.
Since the mathematics behind each single step of the chain -i.e.how the calibration parameters are connected to the final spectra -is mostly linear algebra, this part of the code has been implemented on GPUs by means of the CUDA libraries [74].A generic implementation of this method is provided in a public GitHub repository [75].
In all the following analyses, we used the standard BAT tools to guarantee that the Markov chains are stable and accurate.In particular, the convergence is obtained by means of the BAT pre-run phase that assures by tuning the Metropolis-Hastings MCMC parameters that all the parallel chains converge to the same region of the parameters' phase space with an optimal Metropolis-Hastings MC rejection rate.In order to achieve the required statistical accuracy, the sampling is performed by means of 12 parallel MCMC chains, for a total number of steps equal to 1.2 × 10 6 .
From the implementation point of view, the background model or background-plus-signal model are implemented as an extension of the BAT BCModel class.The likelihood and the priors are customized following the prescriptions of the previous sections, and the linear algebra implemented in CUDA.The inputs of the fit, i.e. the theoretical spectra and the M 2 smearing matrices, are read at the constructor level.The GPU preliminary operations are also performed once inside the constructor, to optimize the sampling procedure.A complete fit, including also the prerun phase, takes 4.8h (40min for prerun) with 12 treads on an Intel Xeon Silver 4216 CPU (2.1 GHz) and a Nvidia GeForce RTX 3090 GPU.This roughly corresponds to a sampling rate of 6.8 Hz per chain.  3Ar background (right) spectra obtained by randomly selecting 30 points from the nuisance parameters pdf, the bottom plots show the relative difference with the spectrum obtained with the nominal parameter values (black solid line) and the average (pink solid curve) ±σ envelopes (pink dashed lines) calculated bin by bin.(Right) Four different signal (left) and 39 Ar background spectra (right) showing significant shape differences with respect to the nominal spectrum, which is also shown; the bottom plot shows the nuisance parameters pulls for each of the spectra selected above.

Results
We compute the upper bound for the DM signal as the 90% Credible Interval (C.I.).This is defined as the value of σ DM SI (m DM ) corresponding to the 90% quantile of the marginalized posterior pdf for r S .
In order to avoid possible biases coming from using data, we performed a blind analysis based on a pseudo-dataset.This dataset has been generated from the expected background template, the so-called Asimov dataset, which is plotted in Fig. 5.
If not specified otherwise, all the fits are performed in the full N e − = [4, 170] range.Below N e − = 4, the data are indeed dominated by correlated events, mostly due to the contamination of spurious electrons [5].On the other hand, the upper threshold is chosen as the maximum point at which the detector response calibrations have been validated, namely N e − = 170 [61].
The binning of the observed spectrum is denser (0.25 N e − binning) in the N e − < 20 region with respect to the higher N e − region (1 N e − binning).Since the DM signal is exponentially falling, having a denser binning in the low N e − region has a beneficial 5 -10% impact on the sensitivity in the whole mass region explored by our analysis.

Impact of the systematic uncertainties on the limit
As a first study, we investigate the impact of the systematic uncertainties on the final limit.For simplicity, we focus on a single DM mass value m DM = 4.5 GeV/c 2 , in which the Migdal effect contribution to the signal spectrum is negligible.We arranged the nuisance parameters in the following 3 groups 1. group CAL: a 0 , a 1 , a 2 , a 3 , C N R box , f B , which represent the calibration parameters; 2. group TH: σ Ar,Kr scr , σ Ar,Kr Q , which represent systematic uncertainties on the theoretical background spectra; 3. group NORM: E, r B,src , which represent the systematic uncertainties on the normalization of the background spectra.We therefore performed 6 fits, with the following assumptions: 1. all the systematic parameters are free; 2. the group CAL is free, while all the other parameters are fixed to their expected values; 3. the group NORM+TH are free, while all the other parameters are fixed to their expected values; 4. the group TH is free, while all the other parameters are fixed to their expected values; 5. the group NORM is free, while all the other parameters are fixed to their expected values; for m DM = 4.5 GeV/c 2 using the expected pseudo-dataset and fixing different groups of systematic parameters, see text.
6. all the systematic parameters are fixed to their expected values.This corresponds to a statistic-only fit, with r S as the only active parameter.
The results in terms of the sensitivity to the DM crosssection are given in Table 1.
There are two relevant differences between our innovative implementation and the published one.First of all the published approach computes the sensitivity as the frequentist 90% C.L., while here we perform the analysis in the Bayesian approach, and we quote the 90% quantile of the posterior pdf of the signal strength parameter r S [10].Even if the two quantities aim at expressing the experimental sensitivity, they are conceptually different, and are defined in totally different ways.However, when operating with the same inputs, they should give numerically comparable results.In addition, when we look at the posterior of r S , we are integrating over all the nuisance parameter space, while the published approach is based on the profiling of the likelihood.If the likelihood is Gaussian the marginalization and the profiling give the same result.On the other hand, in the general case in which the Gaussian assumption is not valid, the profiling procedure typically returns underestimated propagated uncertainties, and as a consequence stronger limits [76].
We find that the impact of the systematic uncertainties on the calibration parameters has the same size as the impact of all the other systematic parameters, including the parameters regulating the normalization of the background and the theoretical uncertainties on the input spectra, and therefore the correct propagation of their uncertainty is relevant in the final result.For completeness, we report in Fig. 10 in A the full multidimensional posterior pdf s of the complete fit, in which all the systematic parameters are not fixed.
As a further crosscheck we also studied the dependence of the parameters' mean and standard uncertainty of the posterior pdf s as a function of the DM mass m DM : none of the parameters shows a strong correlation with the DM mass, demonstrating the stability of the fitting procedure.
7.2 Impact of the high N e − data points on the limit and the calibration parameters In this subsection we show the impact of choosing different N e − windows on the calibration parameters' posterior pdf s, and, as a consequence, on the upper limit on the DM cross-section.Since the priors on the calibration parameters correspond to the constraints from the calibration, the differences between priors and posteriors tell us that the data give additional information with respect to the calibration measurements.A better knowledge on the calibration parameters allows obtaining a limit less affected by the systematic uncertainties -see the "None" result of Tab. 1.In order to investigate this effect, we decided to perform a fit to the expected pseudo-dataset in the regions N e − = [4,30] and N e − = [4,170].The long high N e − tail provides better constraints on the calibration parameters.
In Fig. 7 we show the results of two background plus signal fits on the pseudo-dataset performed in the regions N e − = [4,30] and N e − = [4, 170] (orange and blue shaded histograms, respectively) with respect to the prior pdf (gray dashed line), assuming a DM mass m DM = 4.5 GeV/c 2 .The figure shows how the width of the calibration parameters' posteriors are smaller in the N e − = [4,170] case rather than both in the prior and the N e − = [4,30] cases.In particular, the posterior pdf s of the ER group are more constrained than the prior pdf s.This behavior does not depend on possible features in the data, since this study is performed on Asimov pseudo-dataset.On the other hand, the posterior pdf s of the NR group are similar to their priors.This is expected since in the pseudo-dataset there is no injected signal and the NR signal is relevant only in the first few bins.As a consequence, the larger dataset does not give additional information on the calibration parameters with respect to the calibration measurements.For this reason we obtain the best sensitivity in the N e − = [4,170]  In summary, in this new implementation of the Bayesian approach we complement the calibration results by further constraining some of its parameters, thus reducing their uncertainties by a factor of ∼ 2. We can directly benefit from this improvement by having a stronger bound on the signal and being able to justify it in terms of a better knowledge of the calibration parameters.

Background-only fit on data
We perform a background-only fit on the data: the best fit (top) and the correspondent normalized residuals (bottom) are reported in Fig. 8.The figure shows that the background model describes the observed data without noticeable deviations or excesses.The behavior of the residual is satisfactory and their distribution over all the data points is consistent with the expectation of a standard normal pdf.
In terms of posterior pdf on the fit parameters, no significant deviation from the prior distribution (the results of the calibration measurements) is observed.In Fig. 12 in B we report the full multidimensional posterior of the fit.

Expected and observed limit of the DarkSide-50 experiment
Figure 9 shows the 90% C.I. expected sensitivity on the DM cross-section σ DM SI as a function of the DM mass (pink dashed line), using the Asimov (background only) dataset of Fig. 5.
The observed limit is shown as a red solid line in Fig. 9.It is computed as the 90% C.I. bound on the DM cross-section σ DM SI as a function of the DM mass using the full DS-50 dataset.
No relevant deviations with respect to the expected sensitivity are observed.We performed the study of the behavior of the posterior pdf of the nuisance parameters as a function of the mass of the DM candidate, obtaining similar results, reported in A.

Conclusions
In this work, we illustrated a novel technique, based on Bayesian Networks, to explicitly include the detector response model in the likelihood function of a measurement.This approach has the advantage with respect to the more conventional profile likelihood methods to not assume "Gaussianity" of the pdf s nor linearity of the problem, to not rely on any signal or background spectrum morphing, and to keep the dependence of the parameter of interest on the response model parameters.In this way, the result of the analysis is not only the measurement of the parameter of interest, but also a possible constraint on the response model.We deployed this method to the search for low mass dark matter with the DS-50 experiment and showed that we obtain consistent results with the recently published analysis [5], and we further constrain the parameters of the detector response model.
In the first sections of this work we introduced the Bayesian Networks approach to the description of a multidimensional pdf s.Such a method gives a clear picture of the connections between the different variables involved in the problem, allowing to identify groups of variable that decouple for the rest the problem.Figure 3 describes the entire likelihood of the measurement and shows the role of the various parameters and the information flow from one another.The description of the problem in terms of BN allowed us to develop an inference algorithm based on a Markov Chain Monte Carlo (MCMC) to compute the posterior probability.This probability is constrained on the observed data, while retaining the dependence on each single parameter.A clever description of the detector response model in terms of parametric matrices allows the exploration of the impact of systematic variations of any parameter onto the final results.The proposed treatment significantly improves the understanding of the interplay between calibrations and spectra, as we elaborated in Sec.4.2 and as it is visible in Fig. 6.In addition, we provide a further insight on the systematic uncertainties induced by the detector model, and, using the additional constraining power of the analyzed data, reduce the uncertainty on several parameters of the detector model.This version of the article has been accepted for publication, after peer review but is not the Version of Record and does not reflect post-acceptance improvements, or any corrections.The Version of Record is available online at http://dx.doi.org/10.1140/epjc/s10052-023-11410-4.

A Expected joint posterior pdf
In Fig. 10 we report the joint posterior pdf of the fit on the expected pseudo-dataset assuming a DM mass m χ = 4.5 GeV/c 2 , and the evolution of the posterior pdf s as a function of the mass is reported in Fig. 11.

B Background only joint posterior pdf
In Fig. 12 we report joint posterior pdf of the background only fit on the DS-50 observed dataset.

Fig. 1
Fig. 1 Bayesian network for a Poisson process with intensity λ and observed number of events x.The intensity λ is in turn the sum of a signal contribution λ S and a background contribution λ B , and thus the links connecting λ S and λ B to λ are deterministic.The dots denote a possible additional portion of the network representing previous measurements, e.g. during calibration, of λ B .The inferential process is an information flow (gray dotted arrow) from the observed node x, denoted in gray, to the parameter of interest λ S .

Fig. 2
Fig. 2 Left: Bayesian network for a prototypical dual phase TPC DM direct detection experiment.The node x i is the observed number of events in the i-th bin; λ i is the intensity of the Poisson process in the i-th bin; λ S and λ B regulate the strength of the signal and the background contributions, respectively; the boxes in different gray intensities represent the different contributions from all the relevant background or signal sources; θ are the parameters describing the detector response model; the dots indicate possible preliminary calibration measurements of θ; M 1 and M 2 are defined in Eq. (4).Right: a possible background expected spectrum (S f in i ) for different configurations of the θ parameters (gray lines).The green curve corresponds to the best calibration fit values of θ.

Fig. 4
Fig. 4 Signal events in the N e − = [4, 50] range assuming the DS-50 exposure.The colors represent different DM masses for the NR (solid) and Migdal (dashed) processes.

Fig. 5
Fig. 5 The so-called Asimov dataset, namely the expected background (blue line) in the N e − = [4, 170] range, assuming the DS-50 exposure.The different colored lines represent the expected contributions from the different background sources.The spectra have a 0.25 N e − binning for N e − < 20 and a 1 N e − elsewhere, see text.

The 39
Ar and the 85 Kr background spectra are affected by screening effects and Q-value uncertainties parametrized with σ Ar,Kr scr and σ Ar,KrQ

Fig. 6 (
Fig.6(Left) Signal (left)39 Ar background (right) spectra obtained by randomly selecting 30 points from the nuisance parameters pdf, the bottom plots show the relative difference with the spectrum obtained with the nominal parameter values (black solid line) and the average (pink solid curve) ±σ envelopes (pink dashed lines) calculated bin by bin.(Right) Four different signal (left) and39 Ar background spectra (right) showing significant shape differences with respect to the nominal spectrum, which is also shown; the bottom plot shows the nuisance parameters pulls for each of the spectra selected above.

Fig. 7
Fig. 7 Posterior pdf s obtained by fitting in different energy ranges a pseudo-dataset with the full background plus signal model assuming a DM mass m DM = 4.5 GeV/c 2 .The blue shaded histograms correspond to the N e − = [4, 30] window, the orange shaded histograms correspond to the N e − = [4, 170] window, and the gray dashed line are the prior pdf of each parameter.

Fig. 8
Fig. 8 Top: Best fit (orange line) to the observed dataset (blue points) of the DS-50 experiment.Bottom: Normalized residual (blue points) with respect to the best fit.

Fig. 9
Fig. 9 The 90% C.I. observed limit on the DM cross-section σ DM SI as a function of the DM mass (red solid line) with the inclusion of the Migdal effect for the final DS-50 exposure of 12202 ± 180 kg d.The blue line is the frequentist 90% C.L. from the XENON1T Migdal search[2], the blue dashed-dot line is the one from the XENON1T NR search[3], the green line is the one by the CRESST-III experiment[77], the orange line is the one by the PandaX-4T experiment[4], the black line is the one by the CDEX experiment[8,78], and the purple line is the one from the 2018 DS-50 pure NR analysis[1].The pink dashed line is the expected sensitivity.
ANR-18-IDEX-0001), from the São Paulo Research Foundation (FAPESP) (Grant No. 2016/09084-0), from the Interdisciplinary Scientific and Educational School of Moscow University "Fundamental and Applied Space Research", from the Program of the Ministry of Education and Science of the Russian Federation for higher education establishments, project No. FZWG-2020-0032 (2019-1569), from IRAP As-troCeNT funded by FNP from ERDF, and from the Science and Technology Facilities Council, United Kingdom.I. Albuquerque is partially supported by the Brazilian Research Council (CNPq).This project has received funding from the European Union's Horizon 2020 research and innovation pro-gram under grant agreement No 952480.Isotopes used in this research were supplied by the United States Department of Energy Office of Science by the Isotope Program in the Office of Nuclear Physics.

Fig. 10
Fig. 10 Graphical representation of the joint posterior pdf of the fit on the expected pseudo-dataset assuming a DM mass m χ = 4.5 GeV/c 2 .The plots on the diagonal of the figure are the uni-dimensional pdf of each single parameter obtained by marginalizing on all the others.The bi-dimensional pdf s in the bottom-left corner of the figure give the joint pdf s of each pair of parameters obtained by marginalizing on the others.The plots show also the credible regions at 68%, 95%, 99.7% probability as solid contour lines.The correlation coefficients are given in the upper-right corner of the figure.

Fig. 11
Fig.11Evolution of the posterior pdf s as a function of the DM mass.The blue points represent the mean of the posterior pdf and their uncertainty bar is the correspondent standard deviation.In each plot, the gray solid line is the mean of the prior pdf, while the two gray dashed lines correspond to the standard deviation of the prior pdf.

Table 1
Upper bound results on σ DM SI