NNPDF / pinefarm

Generate PineAPPL grids from PineCards
https://pinefarm.readthedocs.io
GNU General Public License v3.0
1 stars 0 forks source link

Add support for PDFs other than protons #10

Open cschwan opened 2 years ago

cschwan commented 2 years ago

Anything other than protons yields a wrong convolution:

https://github.com/NNPDF/runcards/blob/master/runcardsrunner/table.py#L33-L35

This should read out the metadata initial_state_1 and initial_state_2 and call Grid::convolute_with_two if the initial states are different.

cschwan commented 2 years ago

It seems the problem is more complicated than I initially thought. For the CDF measurements (proton + anti-proton) the table that displayed at the end shows wrong results for PineAPPL, although the lines shown above should be correct.

alecandido commented 2 years ago

Wait, I don't understand: in ŧable.py we're only calling convolute_with_one (never convolute_with_two) and initial_state_1 and initial_state_2 are never accessed.

So, unless you're testing a locally upgraded version, I still believe the OP is right, and we should first try in that direction. Isn't it? (if the grid have not been conjugated in place of the PDF)

cschwan commented 2 years ago

@AleCandido CDF measurements should be working (proton + anti-protons) should be working, but what I see is they don't. Could you try to reproduce that behaviour? Try the CDF_WMASS branch and pick any distribution and reduce the statistics so that it runs faster.

alecandido commented 2 years ago

I'll do, definitely, but according to me the problem is really in the convolution: https://github.com/NNPDF/runcards/blob/b4da9bb8ddee30ed56d5ae38d81fae9450b81286/runcardsrunner/table.py#L33-L35

As you see, pineappl_results are only computed using convolute_with_one, and the information about initial states is hard-coded in the 2212. So there is really no chance to get a correct prediction (unless you transformed the grid to convolute with two initial protons).

cschwan commented 2 years ago

I think I found the culprit: https://github.com/N3PDF/pineappl/commit/64a1b30c96f0b5e5ddac34aa7fa830652ca83940.

cschwan commented 2 years ago

Commit bb3fb45fd640482a61f9f64b7773c601bb5dcea8 should fix the problem.