-
Notifications
You must be signed in to change notification settings - Fork 13
CMS_Z0_13TEV #2352
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
Open
evagroenendijk
wants to merge
7
commits into
master
Choose a base branch
from
implement_cms_asy_fb
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
CMS_Z0_13TEV #2352
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f3da678
Add raw data
evagroenendijk a384869
One dataset and removed Delta A_FB
evagroenendijk 08093b5
Made filter.py and adjusted metadata
evagroenendijk 6df8b64
Implemnetation revised: removed separate ee and mumu channels; added …
enocera 9f4e07d
Corrected name of outputfiles according to the name of the observable
enocera 5831ff8
Fixed metadata file
enocera b337208
Corrected names of kinematic variables
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
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,8 @@ | ||
| data_central: | ||
| - 0.628 | ||
| - 0.608 | ||
| - 0.578 | ||
| - 0.592 | ||
| - 0.616 | ||
| - 0.594 | ||
| - 0.638 |
298 changes: 298 additions & 0 deletions
298
nnpdf_data/nnpdf_data/commondata/CMS_Z0_13TEV/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,298 @@ | ||
| """ | ||
| This file contains the piece of code needed to implement the CMS AFB | ||
| measurement at 13 TeV. The treatment of uncertainties is ambiguous, | ||
| therefore two variants are implemented. One in which there are only two | ||
| uncertainties: a statistical and a systematic uncertainty. The other | ||
| in which the full breakdown of uncertainties is taken from Table 1 | ||
| of the paper. Note that the Table is in principle valid only for the | ||
| first invariant mass bin. | ||
| """ | ||
|
|
||
| import yaml | ||
|
|
||
| def get_kinematics(): | ||
| """ | ||
| returns the relevant kinematics values. | ||
|
|
||
| """ | ||
| kin = [] | ||
|
|
||
| hepdata_table = f"rawdata/HEPData-ins2038801-v1-Table_2.yaml" | ||
|
|
||
| with open(hepdata_table, 'r') as file: | ||
| input = yaml.safe_load(file) | ||
|
|
||
| for m in input["independent_variables"][0]['values']: | ||
| kin_value = { | ||
| 'm_ll': {'min': m['low'], 'mid': 0.5 * (m['low'] + m['high']), 'max': m['high']}, | ||
| } | ||
|
|
||
| kin.append(kin_value) | ||
|
|
||
| del kin[-1] | ||
|
|
||
| return kin | ||
|
|
||
| def get_data_values(): | ||
| """ | ||
| returns the central data. | ||
|
|
||
| """ | ||
| data = [] | ||
|
|
||
| hepdata_table = f"rawdata/HEPData-ins2038801-v1-Table_2.yaml" | ||
|
|
||
| with open(hepdata_table, 'r') as file: | ||
| input = yaml.safe_load(file) | ||
|
|
||
| values = input['dependent_variables'][2]['values'] | ||
|
|
||
| for value in values: | ||
| data.append(value['value']) | ||
|
|
||
| del data[-1] | ||
|
|
||
| return data | ||
|
|
||
| def get_uncertainties(variant=None): | ||
| """ | ||
| returns error definitions and error values. | ||
|
|
||
| """ | ||
| tot_err = [] | ||
| hepdata_table = f"rawdata/HEPData-ins2038801-v1-Table_2.yaml" | ||
| error_defs = {} | ||
|
|
||
|
|
||
| with open(hepdata_table, 'r') as file: | ||
| input = yaml.safe_load(file) | ||
|
|
||
| values = input['dependent_variables'][2] | ||
|
|
||
| error_defs['stat'] = { | ||
| "description": "Statistical uncertainties", | ||
| "treatment": "ADD", | ||
| "type": "UNCORR", | ||
| } | ||
|
|
||
| if variant == "": | ||
| error_defs['sys'] = { | ||
| "description": "Systematic uncertainties", | ||
| "treatment": "ADD", | ||
| "type": "UNCORR", | ||
| } | ||
| for err in values['values']: | ||
| tot_err.append({ | ||
| 'stat': err['errors'][0]['symerror'], | ||
| 'sys': err['errors'][1]['symerror'], | ||
| }) | ||
| elif variant == "_breakdown": | ||
| error_defs['sys_pdfs'] = { | ||
| "description": "PDF uncertainty", | ||
| "treatment": "MULT", | ||
| "type": "CORR", | ||
| } | ||
|
|
||
| error_defs['sys_mcbg'] = { | ||
| "description": "Statistical uncertainties in templates", # correlation | ||
| "treatment": "ADD", | ||
| "type": "UNCORR", | ||
| } | ||
|
|
||
| error_defs['sys_aplhas'] = { | ||
| "description": "Variations of strong coupling, mu_R and mu_F", # event reweighting | ||
| "treatment": "MULT", | ||
| "type": "CORR", | ||
| } | ||
|
|
||
| error_defs['sys_dy'] = { | ||
| "description": "DY cross section uncertainty", # overall unc on whole MC event | ||
| "treatment": "MULT", | ||
| "type": "CORR", | ||
| } | ||
|
|
||
| error_defs['sys_pileup'] = { | ||
| "description": "Uncertainty from difference in measured and simulated pileup", # reweighting | ||
| "treatment": "MULT", | ||
| "type": "CORR", | ||
| } | ||
|
|
||
| error_defs['sys_fidcor'] = { | ||
| "description": "Fiducial corrections", # unc depends on mass, scaling factor per mass bin? | ||
| "treatment": "MULT", | ||
| "type": "UNCORR", | ||
| } | ||
|
|
||
| error_defs['sys_ttbar'] = { | ||
| "description": "ttbar cross section uncertainty", # overall unc on whole MC event | ||
| "treatment": "MULT", | ||
| "type": "CORR", | ||
| } | ||
|
|
||
| error_defs['sys_dypt'] = { | ||
| "description": "Uncertainty from mismodelling of the pt spectrum", # reweighting determined per mass bin | ||
| "treatment": "MULT", | ||
| "type": "UNCORR", | ||
| } | ||
|
|
||
| error_defs['sys_emushape'] = { | ||
| "description": "Uncertainty from the electron muon background shape", # per cos\theta bin, correlated accross mass bins | ||
| "treatment": "MULT", | ||
| "type": "CORR", | ||
| } | ||
|
|
||
| error_defs['sys_lumi'] = { | ||
| "description": "Integrated luminosity uncertainty", | ||
| "treatment": "MULT", | ||
| "type": "CMSLUMI16", | ||
| } | ||
|
|
||
| error_defs['sys_eid'] = { | ||
| "description": "Uncertainty from electron identification/isolation", | ||
| "treatment": "MULT", | ||
| "type": "CORR", | ||
| } | ||
|
|
||
| error_defs['sys_enorm'] = { | ||
| "description": "Electron MisID normalisation", # one variation on all bins, acts as scale factor | ||
| "treatment": "MULT", | ||
| "type": "CORR", | ||
| } | ||
|
|
||
| error_defs['sys_eshape'] = { | ||
| "description": "Electron MisID shape", # variations in template shape, does not have to be coherent accross bins | ||
| "treatment": "ADD", | ||
| "type": "UNCORR", | ||
| } | ||
|
|
||
| error_defs['sys_btag'] = { | ||
| "description": "Uncertainty from b tagging", # scalings depend only on jet flav, pt and rapidity not on mass | ||
| "treatment": "MULT", | ||
| "type": "CORR", | ||
| } | ||
|
|
||
| error_defs['sys_ptmiss'] = { | ||
| "description": "Missing pt modelling uncertainty", # estimated by changing jet energy and simulating whole thingagain | ||
| "treatment": "MULT", | ||
| "type": "CORR", | ||
| } | ||
|
|
||
| error_defs['sys_muid'] = { | ||
| "description": "Uncertainty from muon identification/isolation", # same accross mass bins I think? | ||
| "treatment": "MULT", | ||
| "type": "CORR", | ||
| } | ||
|
|
||
| error_defs['sys_mushape'] = { | ||
| "description": "Muon MisID shape", # variations in template shape, does not have to be coherent accross bins | ||
| "treatment": "ADD", | ||
| "type": "UNCORR", | ||
| } | ||
|
|
||
| error_defs['sys_phph'] = { | ||
| "description": "gamma gamma --> ll cross section uncertainty", # overall unc on whole MC event | ||
| "treatment": "MULT", | ||
| "type": "CORR", | ||
| } | ||
|
|
||
| error_defs['sys_munorm'] = { | ||
| "description": "Muon MisID normalisation", # one variation on all bins, acts as scale factor | ||
| "treatment": "MULT", | ||
| "type": "CORR", | ||
| } | ||
|
|
||
| error_defs['sys_etrig'] = { | ||
| "description": "Electron trigger uncertainty", # Not sure if it is indeed mult, but I would suppose so? | ||
| "treatment": "MULT", | ||
| "type": "CORR", | ||
| } | ||
|
|
||
| error_defs['sys_diboson'] = { | ||
| "description": "Diboson cross section uncertainty", # overall unc on whole MC event | ||
| "treatment": "MULT", | ||
| "type": "CORR", | ||
| } | ||
|
|
||
| error_defs['sys_erec'] = { | ||
| "description": "Electron reconstruction efficiency", # efficiency correction to all total events with electrons | ||
| "treatment": "MULT", | ||
| "type": "CORR", | ||
| } | ||
|
|
||
| error_defs['sys_mumom'] = { | ||
| "description": "Muon momentum scale corrections", | ||
| "treatment": "MULT", | ||
| "type": "CORR", | ||
| } | ||
|
|
||
| error_defs['sys_emom'] = { | ||
| "description": "Electron momentum scale corrections", | ||
| "treatment": "MULT", | ||
| "type": "CORR", | ||
| } | ||
|
|
||
| error_defs['sys_mutrig'] = { | ||
| "description": "Muon trigger uncertainty", | ||
| "treatment": "MULT", | ||
| "type": "CORR", | ||
| } | ||
| for err in values['values']: | ||
| tot_err.append({ | ||
| 'stat': err['errors'][0]['symerror'], | ||
| 'sys_pdfs': 0.0081, | ||
| 'sys_mcbg': 0.0041, | ||
| 'sys_aplhas': 0.0033, | ||
| 'sys_dy': 0.003, | ||
| 'sys_pileup': 0.0028, | ||
| 'sys_fidcor': 0.0027, | ||
| 'sys_ttbar': 0.0027, | ||
| 'sys_dypt': 0.0021, | ||
| 'sys_emushape': 0.0018, | ||
| 'sys_lumi': 0.0012, | ||
| 'sys_eid': 0.001, | ||
| 'sys_enorm': 0.0009, | ||
| 'sys_eshape': 0.0008, | ||
| 'sys_btag': 0.0008, | ||
| 'sys_ptmiss': 0.0007, | ||
| 'sys_muid': 0.0006, | ||
| 'sys_mushape': 0.0005, | ||
| 'sys_phph': 0.0004, | ||
| 'sys_munorm': 0.0004, | ||
| 'sys_etrig': 0.0004, | ||
| 'sys_diboson': 0.0002, | ||
| 'sys_erec': 0.0002, | ||
| 'sys_mumom': 0.0001, | ||
| 'sys_emom': 0.0001, | ||
| 'sys_mutrig': 0.0001, | ||
| }) | ||
| else: | ||
| print("Variant not implemented") | ||
| exit() | ||
|
|
||
| del tot_err[-1] | ||
|
|
||
| return {'uncertainties': tot_err, 'error defs': error_defs} | ||
|
|
||
| def dump_to_yaml(variant=None): | ||
|
|
||
| data = get_data_values() | ||
| kinematics = get_kinematics() | ||
|
|
||
| with open(f"data_AFB.yaml", "w") as file: | ||
| yaml.dump({"data_central": data}, file, sort_keys=False) | ||
|
|
||
| with open(f"kinematics_AFB.yaml", "w") as file: | ||
| yaml.dump({"bins": kinematics}, file, sort_keys=False) | ||
|
|
||
| with open(f"uncertainties{variant}_AFB.yaml", "w") as file: | ||
| yaml.dump({"definitions": get_uncertainties(variant)['error defs'], "bins": get_uncertainties(variant)['uncertainties']}, file, sort_keys=False) | ||
|
|
||
| return | ||
|
|
||
| dump_to_yaml(variant="") | ||
| dump_to_yaml(variant="_breakdown") | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
29 changes: 29 additions & 0 deletions
29
nnpdf_data/nnpdf_data/commondata/CMS_Z0_13TEV/kinematics_AFB.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,29 @@ | ||
| bins: | ||
| - m_ll: | ||
| min: 170.0 | ||
| mid: 185.0 | ||
| max: 200.0 | ||
| - m_ll: | ||
| min: 200.0 | ||
| mid: 225.0 | ||
| max: 250.0 | ||
| - m_ll: | ||
| min: 250.0 | ||
| mid: 285.0 | ||
| max: 320.0 | ||
| - m_ll: | ||
| min: 320.0 | ||
| mid: 415.0 | ||
| max: 510.0 | ||
| - m_ll: | ||
| min: 510.0 | ||
| mid: 605.0 | ||
| max: 700.0 | ||
| - m_ll: | ||
| min: 700.0 | ||
| mid: 850.0 | ||
| max: 1000.0 | ||
| - m_ll: | ||
| min: 1000.0 | ||
| mid: 7000.0 | ||
| max: 13000.0 |
52 changes: 52 additions & 0 deletions
52
nnpdf_data/nnpdf_data/commondata/CMS_Z0_13TEV/metadata.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,52 @@ | ||
| setname: CMS_Z0_13TEV | ||
| version: 1 | ||
| version_comment: 'Initial implementation' | ||
| arXiv: | ||
| url: https://arxiv.org/abs/2202.12327 | ||
| journal: JHEP 2022 (2022) 08, 063 | ||
| iNSPIRE: | ||
| url: https://inspirehep.net/literature/1952936 | ||
| hepdata: | ||
| url: https://www.hepdata.net/record/ins2038801 | ||
| version: 1 | ||
|
|
||
| nnpdf_metadata: | ||
| nnpdf31_process: "DY NC" | ||
| experiment: CMS | ||
|
|
||
| implemented_observables: | ||
| - observable_name: AFB | ||
| observable: | ||
| description: "Measurement of the forward backward asymmetry in NC muon and electron pair production at sqrt(s) = 13 TeV" | ||
| label: "A_{FB}" | ||
| units: "" | ||
| process_type: DY_MLL | ||
| tables: [2] | ||
| ndata: 7 | ||
| plotting: | ||
| dataset_label: 'CMS 13 TeV $A_{FB}$ $e$ and $\mu$ channels combined' | ||
| plot_x: m_ll | ||
| y_label: "$A_{FB}$" | ||
| kinematic_coverage: | ||
| - m_ll | ||
| kinematics: | ||
| variables: | ||
| m_ll: | ||
| description: "dilepton mass" | ||
| label: "$m_{ll}$" | ||
| units: "$GeV$" | ||
| file: kinematics_AFB.yaml | ||
| data_central: data_AFB.yaml | ||
| data_uncertainties: | ||
| - uncertainties_AFB.yaml | ||
| variants: | ||
| breakdown: | ||
| data_uncertainties: | ||
| - uncertainties_breakdown_AFB.yaml | ||
| theory: | ||
| FK_tables: | ||
| - - CMS_Z0_13TEV_FWD | ||
| - CMS_Z0_13TEV_BWD | ||
| operation: ASY | ||
| conversion_factor: 1.0 | ||
|
|
||
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.