Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reimplement ATLAS_WPWM_7TEV_46FB #2202

Merged
merged 14 commits into from
Dec 6, 2024
Merged

Conversation

ecole41
Copy link
Collaborator

@ecole41 ecole41 commented Nov 8, 2024

This pull request introduces a new filtering module for the ATLAS WPMP 7TeV 47FB dataset, along with several supporting utility functions and updates to various data files. The most important changes include the addition of filtering functions, utility functions for data extraction, and updates to metadata and raw data files.

Old vs New Data Comparison

https://vp.nnpdf.science/GCCc3EPrTr-G7SgQBTeTbA==/

Compatibility Checks

from validphys.api import API
import numpy as np
 
inp1 = {"dataset_input": {"dataset": "ATLASWRAP11CC"}, "theoryid": 40_000_000, "use_cuts": "internal", "t0pdfset": "NNPDF40_nnlo_as_01180", "use_t0": True}
inp2 = {"dataset_input": {"dataset": "ATLASWRAP11CC", "variant": "legacy"}, "theoryid": 40_000_000, "use_cuts": "internal", "t0pdfset": "NNPDF40_nnlo_as_01180", "use_t0": True}
 
covmat1 = API.covmat_from_systematics(**inp1)
covmat2 = API.covmat_from_systematics(**inp2)
 
t0_covmat1 = API.t0_covmat_from_systematics(**inp1)
t0_covmat2 = API.t0_covmat_from_systematics(**inp2)

result = np.all(np.isclose(covmat1, covmat2))
result_2 = np.all(np.isclose(t0_covmat1, t0_covmat2))

print('covmat', result)
print('t0_covmat', result_2)

Out:
LHAPDF 6.5.4 loading [/Users/ellacole/miniconda3/envs/nnpdf_dev/share/LHAPDF/NNPDF40_nnlo_as_01180/NNPDF40_nnlo_as_01180_0000.dat](https://file+.vscode-resource.vscode-cdn.net/Users/ellacole/miniconda3/envs/nnpdf_dev/share/LHAPDF/NNPDF40_nnlo_as_01180/NNPDF40_nnlo_as_01180_0000.dat)
NNPDF40_nnlo_as_01180 PDF set, member #0, version 1; LHAPDF ID = 331100
covmat True
t0_covmat True

@ecole41 ecole41 requested review from scarlehoff and comane November 8, 2024 11:18
@ecole41 ecole41 changed the title Reimplement ATLAS_WPWM_7TEV_46FB [WIP] Reimplement ATLAS_WPWM_7TEV_46FB Nov 8, 2024
@ecole41
Copy link
Collaborator Author

ecole41 commented Nov 9, 2024

Compatability Checks:

from validphys.api import API
import numpy as np
import os

def check_theory_exists(theory_id):
    theory_path = f"/Users/ellacole/miniconda3/envs/nnpdf_dev/share/NNPDF/theories/theory_{theory_id}"
    return os.path.exists(theory_path)

theory_id = 708 


if check_theory_exists(theory_id):
    inp1 = {"dataset_input": {"dataset": "ATLASWRAP11CC"}, "theoryid": theory_id, "use_cuts": "internal"}
    inp2 = {"dataset_input": {"dataset": "ATLASWRAP11CC", "variant": "legacy"}, "theoryid": theory_id, "use_cuts": "internal"}
    covmat1 = API.covmat_from_systematics(**inp1)
    covmat2 = API.covmat_from_systematics(**inp2)
    
    result = np.isclose(covmat1, covmat2)
    print(result)
else:
    print(f"Theory {theory_id} not found. ")

Out:
[[ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]]
    

@comane
Copy link
Member

comane commented Nov 9, 2024

Compatability Checks:

from validphys.api import API
import numpy as np
import os

def check_theory_exists(theory_id):
    theory_path = f"/Users/ellacole/miniconda3/envs/nnpdf_dev/share/NNPDF/theories/theory_{theory_id}"
    return os.path.exists(theory_path)

theory_id = 708 


if check_theory_exists(theory_id):
    inp1 = {"dataset_input": {"dataset": "ATLASWRAP11CC"}, "theoryid": theory_id, "use_cuts": "internal"}
    inp2 = {"dataset_input": {"dataset": "ATLASWRAP11CC", "variant": "legacy"}, "theoryid": theory_id, "use_cuts": "internal"}
    covmat1 = API.covmat_from_systematics(**inp1)
    covmat2 = API.covmat_from_systematics(**inp2)
    
    result = np.isclose(covmat1, covmat2)
    print(result)
else:
    print(f"Theory {theory_id} not found. ")

Out:
[[ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]
 [ True  True  True  True  True  True  True  True  True  True  True  True
   True  True  True  True  True  True  True  True  True  True]]
    

Hi @ecole41, thanks this is very nice!
Can you please include a t0-covariance matrix check too?
This can be done as it is done in the code below

from validphys.api import API
import numpy as np
 
inp1 = {"dataset_input": {"dataset": f"{new_implementation}"}, "theoryid": 40_000_000, "use_cuts": "internal", "t0pdfset": "NNPDF40_nnlo_as_01180", "use_t0": True}
inp2 = {"dataset_input": {"dataset": f"{old_implementation}", "variant": "legacy"}, "theoryid": 40_000_000, "use_cuts": "internal", "t0pdfset": "NNPDF40_nnlo_as_01180", "use_t0": True}
 
covmat1 = API.covmat_from_systematics(**inp1)
covmat2 = API.covmat_from_systematics(**inp2)
 
t0_covmat1 = API.t0_covmat_from_systematics(**inp1)
t0_covmat2 = API.t0_covmat_from_systematics(**inp2)
 
np.all(np.isclose(covmat1, covmat2))
np.all(np.isclose(t0_covmat1, t0_covmat2))

@ecole41
Copy link
Collaborator Author

ecole41 commented Nov 13, 2024

covariance

from validphys.api import API
import numpy as np
 
inp1 = {"dataset_input": {"dataset": "ATLASWRAP11CC"}, "theoryid": 40_000_000, "use_cuts": "internal", "t0pdfset": "NNPDF40_nnlo_as_01180", "use_t0": True}
inp2 = {"dataset_input": {"dataset": "ATLASWRAP11CC", "variant": "legacy"}, "theoryid": 40_000_000, "use_cuts": "internal", "t0pdfset": "NNPDF40_nnlo_as_01180", "use_t0": True}
 
covmat1 = API.covmat_from_systematics(**inp1)
covmat2 = API.covmat_from_systematics(**inp2)
 
t0_covmat1 = API.t0_covmat_from_systematics(**inp1)
t0_covmat2 = API.t0_covmat_from_systematics(**inp2)

result = np.all(np.isclose(covmat1, covmat2))
result_2 = np.all(np.isclose(t0_covmat1, t0_covmat2))

print('covmat', result)
print('t0_covmat', result_2)

Out:
LHAPDF 6.5.4 loading [/Users/ellacole/miniconda3/envs/nnpdf_dev/share/LHAPDF/NNPDF40_nnlo_as_01180/NNPDF40_nnlo_as_01180_0000.dat](https://file+.vscode-resource.vscode-cdn.net/Users/ellacole/miniconda3/envs/nnpdf_dev/share/LHAPDF/NNPDF40_nnlo_as_01180/NNPDF40_nnlo_as_01180_0000.dat)
NNPDF40_nnlo_as_01180 PDF set, member #0, version 1; LHAPDF ID = 331100
covmat True
t0_covmat True

Copy link
Member

@scarlehoff scarlehoff left a comment

Choose a reason for hiding this comment

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

This seems ok and ready to merge up to the UNCORR.1 bug, however you have to fix the conflicts with master.

In this case, what you added to commondataparser.py and process_options.py was already added to master in the meantime I believe so the easiest thing would be to rebase by picking up only the changes to the ATLAS_WMWP... folder

@scarlehoff scarlehoff changed the title [WIP] Reimplement ATLAS_WPWM_7TEV_46FB Reimplement ATLAS_WPWM_7TEV_46FB Dec 5, 2024
@scarlehoff
Copy link
Member

The failing tests is because of changes in reportengine. If you merge from master and solve the conflicts (as I say above, the easiest thing is to absorb directly the stuff from master) it should be fine.

"SINGLETOP": ("$y$", "$m_t^2 (GeV^2)$", "$\\sqrt{s} (GeV)$"),
"DY_MLL": ("$M_{ll} (GeV)$", "$M_{ll}^2 (GeV^2)$", "$\\sqrt{s} (GeV)$"),
"DY_W_ETA": ("$abs_\\eta$", "$M_W^2 (GeV^2)$", "$\\sqrt{s} (GeV)$"),
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am not sure if this is a correct edit, the first kinematic is abs_eta for this specific dataset but I am not sure for other DY_W_ETA processes

Copy link
Member

Choose a reason for hiding this comment

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

This whole thing will go away soon as soon as all datasets are ported since the labels are taken from the metadata, so it's not important.

@scarlehoff scarlehoff merged commit 92f9fdb into master Dec 6, 2024
6 checks passed
@scarlehoff scarlehoff deleted the reimplement_ATLAS_WPWM_7TEV_46FB branch December 6, 2024 15:29
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.

3 participants