Skip to content

Commit 292d0db

Browse files
Merge branch 'master' into dependabot/cargo/lz4_flex-0.11.6
2 parents 2c3e659 + a87ce7b commit 292d0db

35 files changed

+314
-101
lines changed

.github/actions/cache-test-data/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ runs:
1010
uses: actions/cache@v4
1111
with:
1212
path: test-data
13-
key: test-data-v23
13+
key: test-data-v24
1414
- name: Download test data if cache miss
1515
if: steps.cache.outputs.cache-hit != 'true'
1616
run: |

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Added
11+
12+
- added an actual implementation of `pineappl_grid_metadata` and
13+
`pineappl_grid_set_metadata` in the APIs
14+
15+
### Fixed
16+
17+
- fixed a bug in the Newton's convergence method by raising the maximum number
18+
of iteration
19+
- fixed a bug in the implementation of `pineappl_channels_add` of the Fortran
20+
API
21+
22+
### Changed
23+
24+
- raised MSRV to 1.94.0
25+
1026
## [1.3.3] - 01/03/2026
1127

1228
## Added

CONTRIBUTING.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ increasing the MSRV make sure to set it everywhere to the same value:
3232
- in all Github workflows (`.github/workflows/`)
3333
- in `.readthedocs.yml` update the value of the `rust` field and make sure
3434
[RTD supports it](https://docs.readthedocs.io/en/stable/config-file/v2.html#build-tools-rust)
35-
- in `make_release.sh` update the `cargo msrv` call
3635
4. commit the previous changes and push them *after* the container created by
3736
step 2 is ready
3837

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ edition = "2021"
2121
keywords = ["high-energy-physics", "physics"]
2222
license = "GPL-3.0-or-later"
2323
repository = "https://github.com/NNPDF/pineappl"
24-
rust-version = "1.80.1"
24+
rust-version = "1.94.0"
2525
version = "1.3.3"
2626

2727
[workspace.lints.clippy]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[![codecov](https://codecov.io/gh/NNPDF/pineappl/branch/master/graph/badge.svg)](https://codecov.io/gh/NNPDF/pineappl)
33
[![Documentation](https://docs.rs/pineappl/badge.svg)](https://docs.rs/pineappl)
44
[![crates.io](https://img.shields.io/crates/v/pineappl.svg)](https://crates.io/crates/pineappl)
5-
[![MSRV](https://img.shields.io/badge/Rust-1.80+-lightgray.svg)](docs/installation.md)
5+
[![MSRV](https://img.shields.io/badge/Rust-1.94+-lightgray.svg)](docs/installation.md)
66

77
# What is PineAPPL?
88

docs/README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ Here is an alphabetically ordered list of all documentation:
1212
- [CLI reference](cli-reference.md): a reference for all parameters of the CLI.
1313
- [Changelog](../CHANGELOG.md): a list of additions and changes for all
1414
released and unreleased versions of PineAPPL.
15-
- [Grid repository](https://github.com/NNPDF/pineapplgrids/): pre-computed grids
16-
for specific experimental setups.
1715
- [Installation](installation.md): installation instructions.
1816
- [Madgraph5_aMC@NLO](mg5_aMC.md): how to create PineAPPL grids with
1917
[Madgraph5_aMC@NLO](https://launchpad.net/mg5amcnlo/).
@@ -31,8 +29,13 @@ Here is an alphabetically ordered list of all documentation:
3129

3230
### Code examples
3331

34-
Another way to learn using the APIs is to have a look/modify the
35-
[examples](../examples/).
32+
Another way to learn using the APIs is to have a look/modify the examples:
33+
34+
- [C and C++](../examples/cpp/)
35+
- [Object-oriented C++](../examples/object-oriented-cpp/)
36+
- [Fortran](../examples/fortran/)
37+
- [Python](../examples/python/)
38+
- [Madgraph5_aMC@NLO](../examples/mg5amcnlo/)
3639

3740
## Developer documentation
3841

docs/cli-reference.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ where `N` must be the exponent of the strong coupling (denoted with `as`) and
2929
example, in Drell–Yan lepton-pair production `a2,a2as1` selects the leading
3030
order (`a2`) and the next-to-leading order QCD (`a2as1`).
3131

32-
## `PDFSET`: Specifying PDF members or entire PDF sets
32+
## `CONV_FUNS`: Specifying PDF members or entire PDF sets
3333

34-
The parameter `PDFSET` that appears for all convolutional-type subcommands
34+
The parameter `CONV_FUNS` that appears for all convolutional-type subcommands
3535
(`channels`, `convolve`, etc.) must be one of the following strings:
3636

3737
- `setname/member`: In this case `setname` must be a valid [LHAPDF] set name
@@ -50,10 +50,10 @@ The parameter `PDFSET` that appears for all convolutional-type subcommands
5050
`CT18NNLO` and `14001` corresponds to `CT18NNLO/1`.
5151

5252
If an entire PDF set must be given for the calculation of PDF uncertainties,
53-
that means for for `pdfunc`, `plot` or `pull`, the member selection using `/0`,
53+
that means for `uncert`, `plot` or `pull`, the member selection using `/0`,
5454
`/1` can be used to show specific members instead of the central prediction.
55-
For instance `pineappl pdfunc ... NNPDF40_nnlo_as_01180` calculates the central
56-
value using the average over all replicas, whereas `pineappl pdfunc ...
55+
For instance `pineappl uncert ... NNPDF40_nnlo_as_01180` calculates the central
56+
value using the average over all replicas, whereas `pineappl uncert ...
5757
NNPDF40_nnlo_as_01180/0` uses the zeroth member. This is especially useful to
5858
show different replicas in plots.
5959

@@ -63,9 +63,9 @@ multiple PDF sets. For example, `NNPDF31_nnlo_as_0118_luxqed=NNPDF31luxQED`
6363
instructs to use the the PDF set `NNPDF31_nnlo_as_0118_luxqed`, but it would be
6464
called `NNPDF31luxQED`.
6565

66-
## `REMAPPING`: Remapping parameter specification
66+
## `LIMITS`: Remapping parameter specification
6767

68-
This section specifies the `REMAPPING` parameter of `pineappl remap`.
68+
This section specifies the `LIMITS` parameter of `pineappl write --set-bins`.
6969

7070
### Motivation
7171

@@ -77,7 +77,7 @@ For performance/simplicity reasons most Monte Carlo generators neither support
7777
*during generation*. To work around this problem a grid with a one-dimensional
7878
distribution with equally-sized bins can be generated instead, and afterwards
7979
the bins can be 'remapped' to an N-dimensional distribution using the limits
80-
specified with the `REMAPPING` string.
80+
specified with the `LIMITS` string.
8181

8282
### Reference
8383

@@ -114,8 +114,8 @@ The remapping string uses the following special characters to achieve this
114114

115115
Finally note that the differential cross sections are calculated using the bin
116116
sizes (the product of bin widths of each dimension) given by the remapping
117-
string. The option `--ignore-obs-norm` can be used to remove certain dimensions
118-
from the bin size determination, for example `'0,10,20;0,2,4' --ignore-obs-norm
117+
string. The option `--div-bin-norm-dims` can be used to remove certain dimensions
118+
from the bin size determination, for example `'0,10,20;0,2,4' --div-bin-norm-dims
119119
1` will normalize the bins with a size of `2` because the first dimension (with
120120
index `1`) will be ignored
121121

docs/cli-tutorial.md

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Now that you've got a grid, you can perform a convolution with a PDF set:
3434
We chose to use the default CT18 PDF set for this tutorial, because it's the
3535
shortest to type. If you get an error that reads
3636

37-
error: Invalid value for '<PDFSETS>...': The PDF set `CT18NNLO` was not found
37+
error: Invalid value for '<CONV_FUNS>...': The PDF set `CT18NNLO` was not found
3838

3939
install the PDF set with LHAPDF, or use a different PDF set—the numbers won't
4040
matter for the sake of the tutorial. If the command was successful, you should
@@ -122,22 +122,25 @@ following:
122122

123123
Convolutes a PineAPPL grid with a PDF set
124124

125-
Usage: pineappl convolve [OPTIONS] <INPUT> <PDFSETS>...
125+
Usage: pineappl convolve [OPTIONS] <INPUT> <CONV_FUNS>...
126126

127127
Arguments:
128-
<INPUT> Path of the input grid
129-
<PDFSETS>... LHAPDF id(s) or name of the PDF set(s)
128+
<INPUT> Path of the input grid
129+
<CONV_FUNS>... LHAPDF id(s) or name of the PDF set(s)
130130

131131
Options:
132132
-b, --bins <BINS> Selects a subset of bins
133133
-i, --integrated Show integrated numbers (without bin widths) instead of differential ones
134134
-o, --orders <ORDERS> Select orders manually
135+
--xir <XIR> Set the variation of the renormalization scale [default: 1.0]
136+
--xif <XIF> Set the variation of the factorization scale [default: 1.0]
137+
--xia <XIA> Set the variation of the fragmentation scale [default: 1.0]
135138
--digits-abs <ABS> Set the number of fractional digits shown for absolute numbers [default: 7]
136139
--digits-rel <REL> Set the number of fractional digits shown for relative numbers [default: 2]
137140
-h, --help Print help
138141

139142
This explains that `pineappl convolve` needs at least two arguments, the first
140-
being the grid file, denoted as `<INPUT>` and a second argument `<PDFSETS>`,
143+
being the grid file, denoted as `<INPUT>` and a second argument `<CONV_FUNS>`,
141144
which determines the PDF set. Note that this argument has three dots, `...`,
142145
meaning that you're allowed to pass multiple PDF sets, in which case `pineappl`
143146
will perform the convolution with each PDF set, such that you can compare them
@@ -379,32 +382,33 @@ install the set first) as the PDF set:
379382

380383
Let's calculate the scale and PDF uncertainties for our grid:
381384

382-
pineappl uncert --pdf --scale-env=7 LHCB_WP_7TEV.pineappl.lz4 NNPDF31_nnlo_as_0118_luxqed
385+
pineappl uncert --conv-fun --scale-env=7 LHCB_WP_7TEV.pineappl.lz4 NNPDF31_nnlo_as_0118_luxqed
383386

384387
This will show a table very similar to `pineappl convolve`:
385388

386-
b etal dsig/detal PDF central PDF 7pt-svar (env)
387-
[] [pb] [%] [%]
388-
-+----+----+-----------+-----------+-----+----+-------+-------
389-
0 2 2.25 7.7651327e2 7.7650499e2 -1.01 1.01 -3.69 2.64
390-
1 2.25 2.5 7.1011428e2 7.1008027e2 -1.01 1.01 -3.67 2.69
391-
2 2.5 2.75 6.1683947e2 6.1679433e2 -1.01 1.01 -3.67 2.76
392-
3 2.75 3 4.9791036e2 4.9786461e2 -1.03 1.03 -3.64 2.78
393-
4 3 3.25 3.7016249e2 3.7012355e2 -1.07 1.07 -3.60 2.80
394-
5 3.25 3.5 2.5055318e2 2.5052366e2 -1.13 1.13 -3.55 2.81
395-
6 3.5 4 1.1746882e2 1.1745148e2 -1.33 1.33 -3.48 2.80
396-
7 4 4.5 2.8023753e1 2.8018010e1 -4.05 4.05 -3.40 2.74
389+
b etal dsig/detal NNPDF31_nnlo_as_0118_luxqed 7pt-svar (env)
390+
[] [pb] [pb] [%] [%] [%]
391+
-+----+----+-----------+-----------+--------+--------+-------+-------
392+
0 2 2.25 7.7651327e2 7.7650499e2 -1.01 1.01 -3.69 2.64
393+
1 2.25 2.5 7.1011428e2 7.1008027e2 -1.01 1.01 -3.67 2.69
394+
2 2.5 2.75 6.1683947e2 6.1679433e2 -1.01 1.01 -3.67 2.76
395+
3 2.75 3 4.9791036e2 4.9786461e2 -1.03 1.03 -3.64 2.78
396+
4 3 3.25 3.7016249e2 3.7012355e2 -1.07 1.07 -3.60 2.80
397+
5 3.25 3.5 2.5055318e2 2.5052366e2 -1.13 1.13 -3.55 2.81
398+
6 3.5 4 1.1746882e2 1.1745148e2 -1.33 1.33 -3.48 2.80
399+
7 4 4.5 2.8023753e1 2.8018010e1 -4.05 4.05 -3.40 2.74
397400

398401
The first three columns are exactly the one that `pineappl convolve` shows. The
399-
next columns are the PDF central predictions, and negative and positive PDF
400-
uncertainties. These uncertainties are calculated using LHAPDF, so `pineappl`
401-
always uses the correct algorithm no matter what type of PDF sets you use:
402-
Hessian, Monte Carlo, etc. Note that we've chosen a PDF set with Monte Carlo
403-
replicas which means that the results shown in `dsig/detal` and `PDF central`
404-
aren't exactly the same. The first number is calculated from the zeroth replica
405-
of the set and the second number is the average of all replicas (except the
406-
zeroth). You'll notice that the PDF uncertainties are symmetric, which will not
407-
necessarily be the case with Hessian PDF sets, for instance.
402+
next columns are the convolution function's central predictions, and negative
403+
and positive uncertainties. These uncertainties are calculated using LHAPDF, so
404+
`pineappl` always uses the correct algorithm no matter what type of convolution
405+
functions you use: Hessian, Monte Carlo, etc. Note that we've chosen a PDF set
406+
with Monte Carlo replicas which means that the results shown in `dsig/detal` and
407+
the central prediction aren't exactly the same. The first number is calculated
408+
from the zeroth replica of the set and the second number is the average of all
409+
replicas (except the zeroth). You'll notice that the PDF uncertainties are
410+
symmetric, which will not necessarily be the case with Hessian PDF sets, for
411+
instance.
408412

409413
The two remaining columns show the scale-variation uncertainty which is
410414
estimated from taking the envelope of a 7-point scale variation. By changing

docs/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ already installed, make sure it is recent enough:
251251

252252
cargo --version
253253

254-
This should show a version that is at least 1.80.1. If you do not have `cargo`
254+
This should show a version that is at least 1.94.0. If you do not have `cargo`
255255
or if it is too old, go to <https://www.rust-lang.org/tools/install> and follow
256256
the instructions there.
257257

docs/metadata.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,19 @@ be read indiviually with `pineappl read --get <KEY> <GRID>`, and `pineappl read
66

77
## Known keys
88

9-
- `arxiv`
10-
- `description`
11-
- `hepdata`
12-
- `inspire`
13-
- `results`
14-
- `results_pdf`
9+
- `arxiv`: the arXiv identifier of the experimental measurement.
10+
- `description`: a short description of the process.
11+
- `hepdata`: the Digital Object Identifier (DOI) of the experimental data.
12+
- `initial_state_1`, `initial_state_2`: PDG Monte Carlo IDs of the initial-state hadrons.
13+
- `inspire`: the INSPIRE-HEP identifier of the experimental measurement.
14+
- `lumi_id_types`: the type of partonic luminosity identifiers used.
15+
- `mg5amc_repo`, `mg5amc_revno`: MadGraph5_aMC@NLO repository URL and revision number.
16+
- `nnpdf_id`: the NNPDF identifier of the dataset.
17+
- `pineappl_gitversion`: the version of PineAPPL used to generate the grid.
18+
- `results`: a table comparing PineAPPL results with the original Monte Carlo.
19+
- `results_pdf`: the PDF set used for the comparison in `results`.
20+
- `runcard`: the runcard used to generate the grid.
21+
- `runcard_gitversion`: the version of the runcard used.
1522

1623
## CLI-recognized keys
1724

@@ -53,5 +60,7 @@ Ratios are denoted using `/`, and powers are denoted using `^2`
5360
These should contain the equivalent of `x1_label` with (La)TeX commands. If
5461
symbols from math mode are used, they must be enclosed with `$`.
5562

56-
- `x1_label_tex`
63+
- `x1_label_tex` (and `x2_label_tex`, etc.)
5764
- `y_label_tex`
65+
- `y_unit`: used to append the unit to the y-axis label using the `siunitx` package syntax.
66+
- `x1_unit` (and `x2_unit`, etc.): used to append the unit to the x-axis label.

0 commit comments

Comments
 (0)