-
Notifications
You must be signed in to change notification settings - Fork 14
CMS_Z0J_13TEV #2360
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
Closed
Closed
CMS_Z0J_13TEV #2360
Changes from 3 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
3925642
Implementation of the CMS 13 TeV Z pT data set
enocera 7725ed7
Added rawdata files
enocera 51e39e7
Corrected inconsistency in variable name
enocera 67af04c
Corrected mass range; renamed data set; removed sqrts
enocera d9f4050
Added rule to remove region potentially sensitive to resummation effe…
enocera 7784748
Implementation of the CMS 13 TeV Z pT data set
enocera be71306
Added rawdata files
enocera eb0f946
Corrected inconsistency in variable name
enocera 485bbde
Corrected mass range; renamed data set; removed sqrts
enocera d775d15
Added rule to remove region potentially sensitive to resummation effe…
enocera adf38e8
Temporary return to the square of the mass
enocera 14ef816
Fixed cnflicts - returned to square of the mass
enocera 5d7873a
Implementation of the CMS 13 TeV Z pT data set
enocera 4bc8cf9
Added rawdata files
enocera 75c81a4
Corrected inconsistency in variable name
enocera 8d0991d
Corrected mass range; renamed data set; removed sqrts
enocera 5dd4bbc
Added rule to remove region potentially sensitive to resummation effe…
enocera 2870a1b
Temporary return to the square of the mass
enocera cf784a0
Implementation of the CMS 13 TeV Z pT data set
enocera ff25e94
Added rawdata files
enocera 329dd29
Corrected inconsistency in variable name
enocera 32d854e
Corrected mass range; renamed data set; removed sqrts
enocera 30872fb
fixed process variables
scarlehoff fa407ba
Rebased
enocera 2f06831
Updated LHC ZpT data 13 TeV. CMS: removed useless small pT bins; upda…
enocera 0ba8b04
Corrected kinematic values ATLAS_Z0J_13TEV
enocera 926dcf3
Merge branch 'master' into CMS_Z0J_13TEV
enocera 386b117
Added correlation variants fro ATLAS 13 ZpT 13 TeV
enocera a334f63
Added split of ZpT data sets according to different processes. Adde u…
enocera File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
96 changes: 96 additions & 0 deletions
96
nnpdf_data/nnpdf_data/commondata/CMS_Z0J_13TEV_PT/data.yaml
This file contains hidden or 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,96 @@ | ||
| data_central: | ||
| - 0.74187 | ||
| - 1.6828 | ||
| - 1.8444 | ||
| - 1.7141 | ||
| - 1.5243 | ||
| - 1.329 | ||
| - 1.1897 | ||
| - 0.99489 | ||
| - 0.75792 | ||
| - 0.49533 | ||
| - 0.26635 | ||
| - 0.12569 | ||
| - 0.046018 | ||
| - 0.0091988 | ||
| - 0.0011748 | ||
| - 3.5385e-05 | ||
| - 8.5535 | ||
| - 23.064 | ||
| - 32.092 | ||
| - 36.51 | ||
| - 37.237 | ||
| - 36.608 | ||
| - 34.621 | ||
| - 32.542 | ||
| - 30.324 | ||
| - 28.162 | ||
| - 25.957 | ||
| - 24.036 | ||
| - 22.098 | ||
| - 20.7 | ||
| - 18.4 | ||
| - 15.824 | ||
| - 13.912 | ||
| - 12.011 | ||
| - 10.329 | ||
| - 8.5419 | ||
| - 7.0432 | ||
| - 5.547 | ||
| - 4.2406 | ||
| - 3.0556 | ||
| - 1.9436 | ||
| - 1.0362 | ||
| - 0.40703 | ||
| - 0.14152 | ||
| - 0.059995 | ||
| - 0.032086 | ||
| - 0.018046 | ||
| - 0.0090947 | ||
| - 0.0040887 | ||
| - 0.0019895 | ||
| - 0.0010353 | ||
| - 0.0005749 | ||
| - 8.2356e-05 | ||
| - 0.33161 | ||
| - 0.74306 | ||
| - 0.81127 | ||
| - 0.75465 | ||
| - 0.67379 | ||
| - 0.59073 | ||
| - 0.52103 | ||
| - 0.42299 | ||
| - 0.32974 | ||
| - 0.24939 | ||
| - 0.17329 | ||
| - 0.10268 | ||
| - 0.046168 | ||
| - 0.011162 | ||
| - 0.0017995 | ||
| - 6.0169e-05 | ||
| - 0.034442 | ||
| - 0.078093 | ||
| - 0.090178 | ||
| - 0.087088 | ||
| - 0.082663 | ||
| - 0.07576 | ||
| - 0.065335 | ||
| - 0.054814 | ||
| - 0.046471 | ||
| - 0.035346 | ||
| - 0.020531 | ||
| - 0.0043687 | ||
| - 0.00010193 | ||
| - 0.0023774 | ||
| - 0.0056498 | ||
| - 0.0069927 | ||
| - 0.0068868 | ||
| - 0.0061386 | ||
| - 0.0060243 | ||
| - 0.0052844 | ||
| - 0.0051086 | ||
| - 0.0045253 | ||
| - 0.004045 | ||
| - 0.0021176 | ||
| - 0.00057801 | ||
| - 2.4683e-05 |
120 changes: 120 additions & 0 deletions
120
nnpdf_data/nnpdf_data/commondata/CMS_Z0J_13TEV_PT/filter.py
This file contains hidden or 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,120 @@ | ||
| """ | ||
| This file contains the piece of code needed to implement the CMS ZpT measurement | ||
| at 13 TeV. Systematic uncertainties are implemented starting from the breakdown | ||
| available on HepData. The correlation treatment follows the approach mentioned | ||
| in the paper (see the lines immediately before Sect. 6): "The systematic | ||
| and statistical uncertainties are obtained using the linear combination method | ||
| described in Ref. [77], considering as fully correlated the uncertainties in | ||
| the jet energy scale and resolution, the pileup, the background subtraction, | ||
| b tagging, and the integrated luminosity. Other uncertainties are considered | ||
| as uncorrelated." Note that correlations are kept not only across different | ||
| pT(ll) bins, but also across different m(ll) bins. Covariance matrices, albeit | ||
| only for covariances across pT(ll) bins, are available on HepData. These are | ||
| disregarded, because they do not include any correlations in m(ll). Their | ||
| inspection confirms that indeed the aforementioned uncertainties are fully | ||
| correlated. The other uncertainties are weakly correlated or anti-correlated. | ||
| """ | ||
|
|
||
| import yaml | ||
|
|
||
| def get_tables(): | ||
| """ | ||
| Get the Hepdata tables, given the tables and version specified in metadata | ||
| """ | ||
| prefix = "rawdata/HEPData-ins2079374" | ||
| with open("metadata.yaml", "r") as file: | ||
| metadata = yaml.safe_load(file) | ||
|
|
||
| version = metadata["hepdata"]["version"] | ||
| tables = metadata["implemented_observables"][0]["tables"] | ||
| hepdata_tables = [] | ||
|
|
||
| for table in tables: | ||
| hepdata_tables.append(f"{prefix}-v{version}-pT_ll_mass_{table}.yaml") | ||
|
|
||
| return hepdata_tables | ||
|
|
||
| def get_all(): | ||
| """ | ||
| Returns data, kinematics and uncertainties for dumping in the .yaml files | ||
| """ | ||
| data_central = [] | ||
| kinematics = [] | ||
| uncertainties = [] | ||
|
|
||
| hepdata_tables = get_tables() | ||
| for table in hepdata_tables: | ||
| with open(table, 'r') as f: | ||
| input = yaml.safe_load(f) | ||
| # Central values | ||
| data_values = input["dependent_variables"][0]["values"] | ||
| for data_value in data_values: | ||
| data_central.append(data_value["value"]) | ||
| # Kinematic bins | ||
| kin_values = input["independent_variables"][0]["values"] | ||
| for kin_value in kin_values: | ||
| kin = { | ||
| 'pT': {'min': kin_value['low'], | ||
| 'mid': 0.5 * (kin_value['low'] + kin_value['high']), | ||
| 'max': kin_value['high']}, | ||
| 'm_ll2': {'min': None, 'mid': 8317.44, 'max': None}, | ||
| 'sqrts': {'min': None, 'mid': 13000.0, 'max': None},} | ||
| kinematics.append(kin) | ||
| # Uncertainties | ||
| for data_value in data_values: | ||
| errors = data_value["errors"] | ||
| uncertainty = {} | ||
| for error in errors: | ||
| uncertainty[error["label"]] = error["symerror"] | ||
| uncertainty.update(uncertainty) | ||
|
|
||
| uncertainties.append(uncertainty) | ||
|
|
||
| return (data_central, kinematics, uncertainties) | ||
|
|
||
| def filter_CMS_Z0J_13TEV_PT(): | ||
| """ | ||
| Dumps data, kinematics, and uncertainties on .yaml files | ||
| """ | ||
| central_values, kinematics, uncertainties = get_all() | ||
| # Central values | ||
| data_central_yaml = {"data_central": central_values} | ||
| # Kinematics | ||
| kinematics_yaml = {"bins": kinematics} | ||
| # Uncertainties | ||
| treatment = {"Data stat.": "ADD", | ||
| "Unfolding stat.": "ADD", | ||
| "Unfolding model": "ADD", | ||
| "Int. luminosity": "MULT", | ||
| "Lepton energy": "ADD", | ||
| "Efficiency": "ADD", | ||
| "Backgrounds": "MULT", | ||
| "Jet energy": "MULT", | ||
| "Others": "MULT"} | ||
| correlation = {"Data stat.": "UNCORR", | ||
| "Unfolding stat.": "UNCORR", | ||
| "Unfolding model": "UNCORR", | ||
| "Int. luminosity": "CMSLUMI16", | ||
| "Lepton energy": "UNCORR", | ||
| "Efficiency": "UNCORR", | ||
| "Backgrounds": "CORR", | ||
| "Jet energy": "CORR", | ||
| "Others": "CORR"} | ||
| definitions = {} | ||
| for key,value in uncertainties[0].items(): | ||
| definition = {key : | ||
| {"description": key + " unc. from HepData", | ||
| "treatment": treatment[key], | ||
| "type": correlation[key]}} | ||
| definitions.update(definition) | ||
| uncertainties_yaml = {"definitions": definitions,"bins": uncertainties} | ||
|
|
||
| with open("data.yaml", "w") as file: | ||
| yaml.dump(data_central_yaml, file, sort_keys=False) | ||
| with open("kinematics.yaml", "w") as file: | ||
| yaml.dump(kinematics_yaml, file, sort_keys=False) | ||
| with open("uncertainties.yaml", "w") as file: | ||
| yaml.dump(uncertainties_yaml, file, sort_keys=False) | ||
|
|
||
| if __name__ == "__main__": | ||
| filter_CMS_Z0J_13TEV_PT() | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.