Skip to content

Commit ea9411e

Browse files
committed
Polishing the code + doc
1 parent aa7c97b commit ea9411e

File tree

4 files changed

+464
-168
lines changed

4 files changed

+464
-168
lines changed

doc/sphinx/source/references.bib

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,3 +749,14 @@ @article{Barontini:2023vmr
749749
pages = "109061",
750750
year = "2024"
751751
}
752+
@article{Ball:2025xtj,
753+
author = "Ball, Richard D. and Chiefa, Amedeo and Stegeman, Roy",
754+
title = "{Parton distributions with higher twist and jet power corrections}",
755+
eprint = "2511.14387",
756+
archivePrefix = "arXiv",
757+
primaryClass = "hep-ph",
758+
reportNumber = "Edinburgh 2025/29",
759+
journal = "Eur. Phys. J. C",
760+
month = "11",
761+
year = "2025"
762+
}

doc/sphinx/source/vp/theorycov/index.rst

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
.. _vptheorycov-index:
2-
2+
33
The `theorycovariance` module
44
===============================
55

6-
The ``theorycovariance`` module deals with constructing, testing and
6+
The ``theorycovariance`` module deals with constructing, testing and
77
outputting theory covariance matrices (covmats). Primarily, it is concerned
88
with scale variation covariance matrices used to model missing higher order
99
uncertainties. See the `short
@@ -27,10 +27,10 @@ Summary
2727
the NNLO-NLO shift
2828

2929
- Theoretical covariance matrices are built according to the various prescriptions
30-
in :ref:`prescrips`.
31-
32-
- The prescription must be one of 3(f, r) point, 5(bar) point, 7(original) point or 9 point, see :ref:`definitions <prescrips>`.
33-
You can specify this using ``point_prescription: "x point"`` in the runcard. The translation of this flag
30+
in :ref:`prescrips`.
31+
32+
- The prescription must be one of 3(f, r) point, 5(bar) point, 7(original) point or 9 point, see :ref:`definitions <prescrips>`.
33+
You can specify this using ``point_prescription: "x point"`` in the runcard. The translation of this flag
3434
into the relevant ``theoryids`` is handled by the ``scalevariations`` module in ``validphys``.
3535

3636
- As input you need theories for the relevant scale combinations which
@@ -45,16 +45,16 @@ Summary
4545

4646
- Renormalisation scales should be correlated within each
4747
process type. These process types are categorised as {DIS CC, DIS NC,
48-
Drell-Yan, Jets, Top}.
48+
Drell-Yan, Jets, Top}.
4949

5050
- :ref:`Outputs <thcov_outputs>` includes tables and heat plots of theoretical and combined
5151
(theoretical + experimental) covariance matrices, comparisons of
5252
theoretical and experimental errors, and plots and tables of
5353
:math:`\chi^2` values.
5454

55-
- Various :ref:`testing <vptheorycov-tests>` outputs also exist, including tables of eigenvalues,
55+
- Various :ref:`testing <vptheorycov-tests>` outputs also exist, including tables of eigenvalues,
5656
plots of eigenvectors and shift vs theory comparisons.
57-
57+
5858

5959
More information
6060
-----------------
@@ -64,5 +64,6 @@ More information
6464
./runcard_layout.rst
6565
./outputs.rst
6666
./point_prescrip.rst
67+
./power_corrections.rst
6768
./tests.rst
6869
./examples.rst
Lines changed: 238 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,238 @@
1+
.. _vptheorycov-pc:
2+
3+
Power corrections
4+
=================
5+
6+
Power corrections (also referred to as higher twist corrections for DIS-like
7+
processes) model contributions from non-perturbative effects that scale as
8+
inverse powers of the hard scale. They are implemented in the
9+
``theorycovariance`` module and can be included as a theory covariance matrix in
10+
a fit. Power corrections for jets and higher twists for DIS data have been
11+
determined in :cite:p:`Ball:2025xtj`, based on NNPDF4.0, where the reader can
12+
find further details on the methodology and phenomenological implications.
13+
14+
The implementation is in
15+
`higher_twist_functions.py <https://github.com/NNPDF/nnpdf/tree/master/validphys2/src/validphys/theorycovariance/higher_twist_functions.py>`_
16+
and
17+
`construction.py <https://github.com/NNPDF/nnpdf/tree/master/validphys2/src/validphys/theorycovariance/construction.py>`_.
18+
19+
20+
Overview
21+
--------
22+
23+
In NNPDF, power corrections modify theoretical predictions by introducing multiplicative
24+
shifts. For a generic observable :math:`O`, the corrected prediction is
25+
26+
.. math:: O \to O \times (1 + \mathrm{PC}),
27+
28+
where :math:`\mathrm{PC}` is the power correction. The shift to the prediction
29+
is therefore
30+
31+
.. math:: \Delta O = O \times \mathrm{PC}.
32+
33+
Different functional forms for the power correction are used depending on the
34+
process type:
35+
36+
- **DIS** (neutral current and charged current): the correction depends on
37+
Bjorken-:math:`x` and :math:`Q^2`, and scales as :math:`1/Q^2`.
38+
- **Single-inclusive jets**: the correction depends on rapidity and transverse
39+
momentum :math:`p_T`, and scales as :math:`1/p_T`.
40+
- **Dijets**: the correction depends on a rapidity variable and the dijet
41+
invariant mass :math:`m_{jj}`, and scales as :math:`1/m_{jj}`.
42+
43+
44+
Parametrisation
45+
---------------
46+
47+
Power corrections are parametrised using a piecewise-linear interpolation
48+
between a set of nodes. The node positions (``nodes``) and the function values
49+
at each node (``yshift``) are specified in the runcard.
50+
51+
The interpolation is constructed as a sum of triangular basis functions: each
52+
node :math:`i` is associated with a triangle that peaks at the node position
53+
with value ``yshift[i]`` and drops linearly to zero at the two neighbouring
54+
nodes. The resulting function is continuous and piecewise-linear.
55+
56+
For DIS processes, the nodes are placed in Bjorken-:math:`x` and the power
57+
correction for a data point at :math:`(x, Q^2)` is
58+
59+
.. math:: \mathrm{PC}(x, Q^2) = \frac{h(x)}{Q^2},
60+
61+
where :math:`h(x)` is the piecewise-linear interpolation.
62+
63+
For jet processes, the nodes are placed in rapidity and the correction at
64+
:math:`(y, p_T)` is
65+
66+
.. math:: \mathrm{PC}(y, p_T) = \frac{h(y)}{p_T}.
67+
68+
For dijets, the same functional form is used but the suppression scale is the
69+
dijet invariant mass :math:`m_{jj}`.
70+
71+
72+
Dataset routing
73+
---------------
74+
75+
Each dataset is mapped to one or more power correction parameter keys via the
76+
function ``get_pc_type``. The mapping depends on the process type and dataset
77+
name:
78+
79+
.. list-table::
80+
:header-rows: 1
81+
:widths: 30 30 40
82+
83+
* - Process type
84+
- PC type key
85+
- Datasets
86+
* - DIS NC (proton :math:`F_2`)
87+
- ``f2p``
88+
- SLAC, BCDMS proton :math:`F_2`; NMC, HERA :math:`\sigma_{\mathrm{red}}`
89+
* - DIS NC (deuteron :math:`F_2`)
90+
- ``f2d``
91+
- SLAC, BCDMS deuteron :math:`F_2`
92+
* - DIS NC (NMC ratio :math:`F_2^d / F_2^p`)
93+
- ``(f2p, f2d)``
94+
- NMC ratio dataset
95+
* - DIS CC
96+
- ``dis_cc``
97+
- CHORUS, NuTeV, HERA CC
98+
* - Jets
99+
- ``Hj``
100+
- Single-inclusive jet datasets
101+
* - Dijets (ATLAS)
102+
- ``H2j_ATLAS``
103+
- ATLAS dijet datasets (falls back to ``H2j`` if key absent)
104+
* - Dijets (CMS)
105+
- ``H2j_CMS``
106+
- CMS dijet datasets (falls back to ``H2j`` if key absent)
107+
108+
109+
Special case: NMC ratio
110+
~~~~~~~~~~~~~~~~~~~~~~~~
111+
112+
The NMC ratio dataset :math:`F_2^d / F_2^p` receives contributions from both
113+
the proton and deuteron power corrections. The corrected ratio is
114+
115+
.. math::
116+
117+
\frac{F_2^d}{F_2^p} \to \frac{F_2^d \,(1 + \mathrm{PC}_d)}{F_2^p \,(1 + \mathrm{PC}_p)},
118+
119+
and the shift is
120+
121+
.. math::
122+
123+
\Delta\!\left(\frac{F_2^d}{F_2^p}\right) = \frac{F_2^d}{F_2^p} \,
124+
\frac{\mathrm{PC}_d - \mathrm{PC}_p}{1 + \mathrm{PC}_p}.
125+
126+
127+
Covariance matrix construction
128+
------------------------------
129+
130+
The theory covariance matrix is constructed from the shifts :math:`\Delta O` by
131+
taking outer products. For each combination of power correction parameters, a
132+
shift vector is computed per dataset. The sub-matrix between datasets :math:`i`
133+
and :math:`j` is then
134+
135+
.. math::
136+
137+
S_{ij} = \sum_k \Delta_i^{(k)} \otimes \Delta_j^{(k)},
138+
139+
where :math:`k` runs over all parameter combinations (one non-zero ``yshift``
140+
entry at a time, with all others set to zero). This corresponds to the
141+
``covmat_power_corrections`` function in ``construction.py``.
142+
143+
144+
Runcard configuration
145+
---------------------
146+
147+
Power corrections are included via the ``theorycovmatconfig`` section of the
148+
runcard. The key ``"power corrections"`` must be added to the
149+
``point_prescriptions`` list, alongside any scale variation prescriptions.
150+
151+
The following keys are used:
152+
153+
- ``pc_parameters``: a dictionary mapping PC type keys to their parametrisation
154+
(``yshift`` and ``nodes`` arrays). The length of ``yshift`` must match the
155+
length of ``nodes``.
156+
- ``pc_included_procs``: list of process types to which power corrections
157+
are applied (e.g. ``["DIS NC", "DIS CC", "JETS", "DIJET"]``).
158+
- ``pc_excluded_exps``: list of dataset names to exclude from power corrections
159+
even if their process type is included.
160+
- ``pdf``: the PDF used for computing the theory predictions that enter the
161+
multiplicative shifts.
162+
163+
Example
164+
~~~~~~~
165+
166+
.. code:: yaml
167+
168+
theorycovmatconfig:
169+
point_prescriptions: ["9 point", "power corrections"]
170+
pc_parameters:
171+
f2p:
172+
yshift: [0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.0]
173+
nodes: [0.0, 0.001, 0.01, 0.1, 0.3, 0.5, 0.7, 0.9, 1.0]
174+
f2d:
175+
yshift: [0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.0]
176+
nodes: [0.0, 0.001, 0.01, 0.1, 0.3, 0.5, 0.7, 0.9, 1.0]
177+
dis_cc:
178+
yshift: [0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.0]
179+
nodes: [0.0, 0.001, 0.01, 0.1, 0.3, 0.5, 0.7, 0.9, 1.0]
180+
Hj:
181+
yshift: [2.0, 2.0, 2.0, 2.0, 2.0, 2.0]
182+
nodes: [0.25, 0.75, 1.25, 1.75, 2.25, 2.75]
183+
H2j_ATLAS:
184+
yshift: [2.0, 2.0, 2.0, 2.0, 2.0, 2.0]
185+
nodes: [0.25, 0.75, 1.25, 1.75, 2.25, 2.75]
186+
H2j_CMS:
187+
yshift: [2.0, 2.0, 2.0, 2.0, 2.0]
188+
nodes: [0.25, 0.75, 1.25, 1.75, 2.25]
189+
pc_included_procs: ["JETS", "DIJET", "DIS NC", "DIS CC"]
190+
pc_excluded_exps:
191+
- HERA_NC_318GEV_EAVG_CHARM-SIGMARED
192+
- HERA_NC_318GEV_EAVG_BOTTOM-SIGMARED
193+
pdf: NNPDF40_nnlo_as_01180
194+
use_thcovmat_in_fitting: true
195+
use_thcovmat_in_sampling: true
196+
197+
.. warning::
198+
The lengths of ``yshift`` and ``nodes`` must be equal for each PC type.
199+
A mismatch will raise an error at initialisation time.
200+
201+
.. note::
202+
Power corrections can be combined with scale variation prescriptions.
203+
Both contributions are summed into a single theory covariance matrix.
204+
See the tutorial on :ref:`including a theory covmat in a fit <thcov_tutorial>`.
205+
206+
207+
Module reference
208+
----------------
209+
210+
``higher_twist_functions.py`` provides the following public functions:
211+
212+
- ``get_pc_type(exp_name, process_type, experiment, pc_dict)``:
213+
determines which PC type key(s) apply to a given dataset.
214+
- ``linear_bin_function(a, y_shift, bin_edges)``:
215+
evaluates the piecewise-linear triangular interpolation at points ``a``.
216+
- ``dis_pc_func(delta_h, nodes, x, Q2)``:
217+
computes the DIS power correction :math:`h(x)/Q^2`.
218+
- ``jets_pc_func(delta_h, nodes, pT, rap)``:
219+
computes the jet power correction :math:`h(y)/p_T`.
220+
- ``mult_dis_pc(nodes, x, q2, dataset_sp, pdf)``:
221+
returns a function that computes the multiplicative DIS shift given node values.
222+
- ``mult_dis_ratio_pc(p_nodes, d_nodes, x, q2, dataset_sp, pdf)``:
223+
returns a function that computes the shift for the :math:`F_2^d/F_2^p` ratio.
224+
- ``mult_jet_pc(nodes, pT, rap, dataset_sp, pdf)``:
225+
returns a function that computes the multiplicative jet shift given node values.
226+
- ``construct_pars_combs(parameters_dict)``:
227+
builds the list of one-at-a-time parameter combinations used to construct
228+
the covariance matrix.
229+
- ``compute_deltas_pc(dataset_sp, pdf, pc_dict)``:
230+
computes the full set of shifts for a single dataset.
231+
232+
``construction.py`` provides:
233+
234+
- ``covmat_power_corrections(deltas1, deltas2)``:
235+
computes the theory covariance sub-matrix between two datasets from their
236+
shift dictionaries.
237+
- ``covs_pt_prescrip_pc(combine_by_type, point_prescription, pdf, pc_parameters, pc_included_procs, pc_excluded_exps)``:
238+
assembles the full power correction covariance matrix across all datasets.

0 commit comments

Comments
 (0)