From 9755d1df9494b25cb8d0d050981ef264dafa3664 Mon Sep 17 00:00:00 2001 From: Sofia Calgaro Date: Fri, 14 Feb 2025 17:51:31 +0100 Subject: [PATCH] small docs fixes --- docs/src/api.md | 8 ++------ docs/src/config.md | 2 ++ docs/src/index.md | 1 + docs/src/inputs.md | 2 ++ docs/src/likelihood.md | 16 +++++++++------- docs/src/toys.md | 2 ++ docs/src/tutorial.md | 2 ++ 7 files changed, 20 insertions(+), 13 deletions(-) diff --git a/docs/src/api.md b/docs/src/api.md index 53cdf29..acec033 100644 --- a/docs/src/api.md +++ b/docs/src/api.md @@ -1,14 +1,10 @@ # API -## Functions and macros - ```@index -Pages = ["internal_api.md"] -Order = [:macro, :function] +Pages = ["api.md"] +Order = [:function] ``` -## Documentation - ### analysis.jl ```@docs ZeroNuFit.Analysis.retrieve_real_fit_results diff --git a/docs/src/config.md b/docs/src/config.md index de5d51d..d019908 100644 --- a/docs/src/config.md +++ b/docs/src/config.md @@ -1,3 +1,5 @@ +# Configuration file + Table of contents: ```@contents diff --git a/docs/src/index.md b/docs/src/index.md index ae2e21c..03cce13 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -20,6 +20,7 @@ Pages = [ "inputs.md", "toys.md", "tutorial.md", + "api.md", ] Depth = 1 ``` diff --git a/docs/src/inputs.md b/docs/src/inputs.md index 5d6eecf..723d408 100644 --- a/docs/src/inputs.md +++ b/docs/src/inputs.md @@ -1,3 +1,5 @@ +# Partitions and events + The fit takes in inputs two files in JSON format (for a full customization of the fit), which paths have to be specified in the `config.json` file. Table of contents: diff --git a/docs/src/likelihood.md b/docs/src/likelihood.md index c646f2d..a4c5c24 100644 --- a/docs/src/likelihood.md +++ b/docs/src/likelihood.md @@ -1,3 +1,5 @@ +# Likelihood implementation + Table of contents: ```@contents @@ -10,12 +12,12 @@ The implemented unbinned Likelihood function reads as: ```math \begin{aligned} - \mathcal{L}(\Gamma) = \prod_k \bigg[ \textrm{Pois}(s_k+b_k) \bigg[ \prod_{i_k=1}^{N_k} \frac{1}{s_k + b_k} \left( b_k\cdot p_{\rm b}(E) + s_{\rm k}\cdot p_{\rm s}(E) \right) \bigg] \bigg] + \mathcal{L}(\Gamma,\, \boldsymbol{BI},\,\boldsymbol{\theta}|D) = \prod_k \bigg[ \textrm{Pois}(s_k+b_k) \bigg[ \prod_{i_k=1}^{N_k} \frac{1}{s_k + b_k} \left( b_k\cdot p_{\rm b}(E) + s_{\rm k}\cdot p_{\rm s}(E) \right) \bigg] \bigg] \end{aligned} ``` +where $\Gamma$ is the signal rate, BI is the background index, $\boldsymbol{\theta}$ are the nuisance parameters, and $D$ are the observed data. Here, the first product runs over the number of partitions _k_ ($N_{\rm p}$ partitions in total) and the second over the events _i_ in a given partition ($N_{\rm k}$ events in total). - In case no events are found in a given partition _k_, the above Likelihood expression simplifies into ```math @@ -46,7 +48,7 @@ Taking $x=Q_{\beta\beta} - \Delta_{\rm k}$, the signal energy distribution for e \end{aligned} ``` -Alternatively, the signal energy distribution can also be shaped as a Gaussian with a tail at low energies (e.g. for MAJORANA DEMONSTRATOR), +Alternatively, the signal energy distribution can also be shaped as a Gaussian with a tail at low energies (e.g. for MAJORANA DEMONSTRATOR data), ```math \begin{aligned} @@ -68,7 +70,7 @@ and ```math \begin{aligned} -s_{\rm k} = \frac{\text{ln}\,2\,\mathcal{N}_{\rm A}}{m_{\rm 76}} \cdot (\varepsilon_{\rm k} + \alpha \cdot \sigma_{\varepsilon_{\rm k}}) \cdot \mathcal{E}_{\rm k} \cdot \Gamma +s_{\rm k} = \frac{\text{ln}\,2\cdot \mathcal{N}_{\rm A}}{m_{\rm 76}} \cdot (\varepsilon_{\rm k} + \alpha \cdot \sigma_{\varepsilon_{\rm k}}) \cdot \mathcal{E}_{\rm k} \cdot \Gamma \end{aligned} ``` @@ -86,10 +88,10 @@ We defined our "log Likelihood" ($LL$) as: \end{aligned} ``` -The sum over all partitions $k$ was separated in a sum over partitions containing an event $i$ ($j$) and in a sum over partitions with no events ($l$). +The sum over all partitions $k$ was separated in a sum over partitions containing an event $i$ with energy $E_{\rm i}$ (sum with index $j$) and in a sum over partitions with no events (sum with index $l$). -## Free parameter priors +## Prior terms Different free prameters can be identified within the framework: - signal, $\Gamma$ @@ -140,7 +142,7 @@ The above products, then, can be expressed again as \end{aligned} ``` -### Marginalization and posterior distributions +### Posterior distributions and marginalization The combined posterior probability density function is calculated according to Bayes’ theorem as: diff --git a/docs/src/toys.md b/docs/src/toys.md index 6602131..483df1c 100644 --- a/docs/src/toys.md +++ b/docs/src/toys.md @@ -1,3 +1,5 @@ +# Generating toys + Table of contents: ```@contents diff --git a/docs/src/tutorial.md b/docs/src/tutorial.md index fd76298..eb43543 100644 --- a/docs/src/tutorial.md +++ b/docs/src/tutorial.md @@ -1,3 +1,5 @@ +# Tutorial + The aim of this tutorial consists in building proper config JSON files in order to run a neutrinoless double-beta decay analysis over GERDA and MAJORANA DEMONSTRATO (MJD) published data. Additional info on the meaning of input parameters can be found under the "Configuration file" section, and for input files under the "Partitions and events" section.