Skip to content

Conversation

@Radonirinaunimi
Copy link
Member

@Radonirinaunimi Radonirinaunimi commented Mar 18, 2025

In order to perform fewer runs with MATRIX, predictions for $\pm y_{t \bar{t}}$ can be extracted from $|y_{t \bar{t}}|$. The following script does so by performing the following operations:

  • extract the negative rapidity bins and divide the observable predictions by 2
  • extract the positive rapidity bins and divide the observable predictions by 2
  • re-order the negative rapidity bin predictions to conform with the commondata
  • merge the two Grids such that predictions are given by $\left\lbrace -y_{t \bar{t}}, +y_{t \bar{t}} \right\rbrace$

TODO:

  • run pre-commit hooks
  • add checks/tests
  • support different versions of PineAPPL
  • add as pinefarm module (?) - deprecates 3rd point

@jacoterh
Copy link

The pre-commit complains?

pass


class TestReverseBins:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't add it here - regardless if it will (already) become a proper pinefarm module or no. This lives just as well in the place where it belongs: tests/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving the tests part into tests/ is indeed a good idea regardless. Right now I don't have any time at all but will do so as soon as I have some.

required=True,
help="Name of the output Grid (w/o the extension `pineappl.lz4`).",
)
def main(grid_path: str, output_name: str) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to test the CLI as well? since there are a series of commands

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that'd be added along with an additional test for modify_grids.

@jacoterh
Copy link

jacoterh commented Apr 28, 2025

Hi @Radonirinaunimi, this works great! One comment, while using this script I noticed that the normalisation given by norm is off by a factor 2, which is probably a result of dividing all predictions by 2.

pineappl read --bins <grid.pineappl.lz.4>

gives

b top pair rapidity        norm       
-+--------+--------+------------------
0     -2.5     -1.3                2.4
1     -1.3     -0.9                0.8
2     -0.9     -0.6 0.6000000000000001
3     -0.6     -0.3                0.6
4     -0.3       -0                0.6
5        0      0.3                0.6
6      0.3      0.6                0.6
7      0.6      0.9 0.6000000000000001
8      0.9      1.3                0.8
9      1.3      2.5                2.4

and as you can see norm does not match the bin width. Also there is a minus sign in front of the 0 in bin number 4. Do you think the script can be modified to fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants