-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into reimplement_ATLAS_Z0_7TEV_49FB_HIMASS
- Loading branch information
Showing
18 changed files
with
7,979 additions
and
363 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
nnpdf_data/nnpdf_data/commondata/ATLAS_WJ_8TEV/data_WM-PT.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
data_central: | ||
- 1631.4 | ||
- 4037.95 | ||
- 2096.5 | ||
- 835.16 | ||
- 364.545 | ||
- 1.71450500e+02 | ||
- 86.63615 | ||
- 46.0402 | ||
- 20.23555 | ||
- 7.2515 | ||
- 2.977525 | ||
- 1.335755 | ||
- 0.62122 | ||
- 0.33252 | ||
- 0.121998 | ||
- 2.82787000e-02 |
17 changes: 17 additions & 0 deletions
17
nnpdf_data/nnpdf_data/commondata/ATLAS_WJ_8TEV/data_WP-PT.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
data_central: | ||
- 2345.065 | ||
- 5664.1 | ||
- 2970.07 | ||
- 1213.885 | ||
- 5.35680000e+02 | ||
- 255.967 | ||
- 133.531 | ||
- 73.187 | ||
- 3.35522500e+01 | ||
- 12.4881 | ||
- 5.3465 | ||
- 2.52222 | ||
- 1.242785 | ||
- 0.69372 | ||
- 3.00397000e-01 | ||
- 7.71570000e-02 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
''' | ||
Filter script for ATLAS_WJ_8TEV | ||
Log: | ||
- Central data and kinematics implemented from hepdata | ||
- Central data and kinematics checked with legacy: passed | ||
- The bin values in `uncertainties_legacy_WX-PT.yaml` and `uncertainties_legacy_WX-PT_sys_ATLAS.yaml` | ||
are exactly the same (checked with notebook). The difference between | ||
these two variants is in the definition of the uncertainties. See notebook for | ||
differences. | ||
- For the treatment of systematic uncertainties, refer to https://arxiv.org/pdf/2112.11266. | ||
There are 50 sources of CORRELATED systematic uncertainty. | ||
29 / 11 / 2024 | ||
- Implemented uncertaintiy definitions | ||
- Construction of the uncertainty file is still missing. Remember that | ||
for the symmetrised case you account for the shifts. | ||
- Xq2 is missing (?) | ||
''' | ||
|
||
import logging | ||
|
||
from filter_utils import Extractor | ||
import numpy as np | ||
import yaml | ||
|
||
logging.basicConfig(level=logging.INFO, format='[%(levelname)s] %(message)s') | ||
|
||
|
||
def check_dat_with_legacy(observable, rtol=1e-03): | ||
""" | ||
Same as `check_unc_with_legacy`, but for central data points. | ||
""" | ||
logging.info( | ||
f"Comparing the new central data implementation with the legacy version for {observable} using rtol = {rtol}." | ||
) | ||
|
||
with open('./data_' + observable + '.yaml', 'r') as file: | ||
new_data = yaml.safe_load(file) | ||
|
||
with open('./data_legacy_' + observable + '.yaml', 'r') as file: | ||
legacy_data = yaml.safe_load(file) | ||
|
||
for i, (new_val, legacy_val) in enumerate( | ||
zip(new_data['data_central'], legacy_data['data_central']) | ||
): | ||
try: | ||
assert np.allclose(new_val, legacy_val, rtol=rtol) | ||
except AssertionError as e: | ||
logging.warning(f"Inconsistency, {new_val} != {legacy_val} in bin: {i+1}") | ||
|
||
|
||
if __name__ == "__main__": | ||
ATLAS_WP_8TEV_PT = Extractor("./metadata.yaml", "WP-PT") | ||
_, _, _ = ATLAS_WP_8TEV_PT.generate_data(variant='default', save_to_yaml=True) | ||
# _, _, _ = ATLAS_WP_8TEV_PT.generate_data(variant='CMS_prescription', save_to_yaml=True) | ||
|
||
ATLAS_WM_8TEV_PT = Extractor("./metadata.yaml", "WM-PT") | ||
_, _, _ = ATLAS_WM_8TEV_PT.generate_data(variant='default', save_to_yaml=True) | ||
# _, _, _ = ATLAS_WM_8TEV_PT.generate_data(variant='CMS_prescription', save_to_yaml=True) | ||
|
||
# check_dat_with_legacy('WP-PT', rtol=1e-4) | ||
# check_dat_with_legacy('WM-PT', rtol=1e-4) |
Oops, something went wrong.