Skip to content

Reimplement Atlas Z0 8 TeV HIMASS#2206

Merged
scarlehoff merged 10 commits into
masterfrom
reimplement_ATLAS_Z0_8TEV_HIMASS
Jan 21, 2025
Merged

Reimplement Atlas Z0 8 TeV HIMASS#2206
scarlehoff merged 10 commits into
masterfrom
reimplement_ATLAS_Z0_8TEV_HIMASS

Conversation

@comane
Copy link
Copy Markdown
Member

@comane comane commented Nov 9, 2024

(this branch) https://vp.nnpdf.science/_LpEXpBCT86YesZeTaCKSQ==
(master) https://vp.nnpdf.science/zmrjDp_ySRqdDZTmW8MQDA==

The new covariance matrix does not coincide with the old one, however they are extremely close to each other.
The suspected reason for this is numerical precision:

  1. There are small, possibly numerical, differences between the central values. Since all the uncertainties are MULT this affects the uncertainties.

  2. In the old implementation stat was treated as ADD, however it is MULT (this does not affect the systematics covmat)

from validphys.api import API
import numpy as np

name_ds = "ATLAS_Z0_8TEV_HIMASS_M-Y"
inp1 = {"dataset_input": {"dataset": f"{name_ds}"}, "theoryid": 40_000_000, "use_cuts": "internal", "t0pdfset": "NNPDF40_nnlo_as_01180", "use_t0": True}

inp2 = {"dataset_input": {"dataset": f"{name_ds}", "variant": "legacy"}, "theoryid": 40_000_000, "use_cuts": "internal", "t0pdfset": "NNPDF40_nnlo_as_01180", "use_t0": True}

covmat2 = API.covmat_from_systematics(**inp2)

covmat1 = API.covmat_from_systematics(**inp1)

relative_difference = np.abs(covmat1 - covmat2) / np.maximum(np.abs(covmat1), np.abs(covmat2))

print(np.max(relative_difference))
0.0835

CHi2 comparison

API.central_chi2(**{**inp1, "pdf": "NNPDF40_nnlo_as_01180"})
53.937

API.central_chi2(**{**inp2, "pdf": "NNPDF40_nnlo_as_01180"})
53.836

ATLASLUMI12:
description: ATLASLUMI12
treatment: MULT
type: SPECIAL
Copy link
Copy Markdown
Member

@scarlehoff scarlehoff Nov 12, 2024

Choose a reason for hiding this comment

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

I'm confused about the keyword SPECIAL here.
We have the CORR and UNCORR as variables that are correlated within a dataset, and then type: <some name>, variables that should be correlated between dataset within an experiment*.

For instance, in this case ATLASLUMI12. If you put SPECIAL it will be correlated with other stuff called SPECIAL. But you want to use SPECIAL also for the 13 TeV ones which would be wrong? (I think ATLASLUMI12 is 8 TeV looking at where it appears.

Is there something I'm missing?

*and we cannot correlate between experiments here because the assumption of an experiment-diagonal covmat is hardcoded in a bunch of places. Luckily there's now a PR sort of dealing with that.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

*and we cannot correlate between experiments here because the assumption of an experiment-diagonal covmat is hardcoded in a bunch of places. Luckily there's now a PR sort of dealing with that.

Just out of curiosity, which PR is dealing / dealt with that?

@scarlehoff scarlehoff mentioned this pull request Dec 6, 2024
5 tasks
@comane comane force-pushed the reimplement_ATLAS_Z0_8TEV_HIMASS branch from c9d5b91 to b20b500 Compare December 8, 2024 12:15
@comane comane requested a review from t7phy December 8, 2024 12:18
@comane
Copy link
Copy Markdown
Member Author

comane commented Dec 8, 2024

It looks like tests are failing because stat uncertainties are always supposed to be ADD.
For this datasets, however, this is not the case.

Since having ADD or MULT makes no difference we might just want to put it back to ADD

@t7phy
Copy link
Copy Markdown
Collaborator

t7phy commented Dec 9, 2024

hey @comane! I will review the 2 PRs in the next few days

@t7phy
Copy link
Copy Markdown
Collaborator

t7phy commented Dec 15, 2024

@comane given that the test fails because of the type being MULT for stat, I would personally just rename the stat uncertainty to something else, like stat_mult, and add a comment in the filter explaining the reason that the code expects stat to be ADD but this is an exception, etc. etc. instead of putting it as ADD even when it should be MULT. this would ensure the data implementation is consistent, covmat would remain the same and the tests should pass I assume.
this is just a suggestion, feel free to take your call here, other than that, everything seems fine and this can be merged.

@comane comane force-pushed the reimplement_ATLAS_Z0_8TEV_HIMASS branch from b20b500 to 0f4c4f0 Compare January 15, 2025 13:48
@scarlehoff scarlehoff merged commit d133a14 into master Jan 21, 2025
@scarlehoff scarlehoff deleted the reimplement_ATLAS_Z0_8TEV_HIMASS branch January 21, 2025 11:01

if 'asymerror' in e:
# the errors are actually symmetric.
values.append(float(e['asymerror']['plus'][:-1]) * cv / 100.0)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hi @comane, I landed here after I wondered how the experimental covmat gets constructed in validphys. When the experimentalists don't provide a covmat, we use the breakdown of systematics to construct it as follows
image

In general, the off diagonal components can have either sign in a covariance matrix, and so we should have that s_{i, corr} can either be positive or negative. But when we go on hepdata, typically all values we use for s_{i, corr} are actually positive! The experimentalists only give the size of s_{i, corr}, so any information on the sign is lost. Are we sure in that case the covmat can be constructed this way?

In this line selected here I noticed that the error you extract from hepdata is negative, is this done on purpose?

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants