Conversation
|
to be tested with this runcard |
|
I have an error when the codes tries to combine arrays of different sizes. I think the cuts are applied in the SM predictions but not in the BSM factor parsing. I have added those print statement: print("Computing BSM factor ratios for dataset:", dataset.name)
print("Size of BSM dict:", bsm_dict[dataset.name].shape)
print("Size of err:", pred.loc[:,1:].std(axis=1).shape)
print("Size of cv:", cv.shape)
std = bsm_dict[dataset.name] * pred.loc[:,1:].std(axis=1).to_numpy() / cvand I get this output: Computing BSM factor ratios for dataset: HLLHC_HMDY_CC_EL_FINAL
Size of BSM dict: (16,)
Size of err: (16,)
Size of cv: (16,)
Computing BSM factor ratios for dataset: HLLHC_HMDY_NC_EL_FINAL
Size of BSM dict: (12,)
Size of err: (12,)
Size of cv: (12,)
Computing BSM factor ratios for dataset: ATLASTTBARTOT7TEV
Size of BSM dict: (1,)
Size of err: (1,)
Size of cv: (1,)
Computing BSM factor ratios for dataset: ATLASTTBARTOT8TEV
Size of BSM dict: (1,)
Size of err: (1,)
Size of cv: (1,)
Computing BSM factor ratios for dataset: ATLAS_TTB_DIFF_8TEV_LJ_TTRAPNORM
Size of BSM dict: (5,)
Size of err: (4,)
Size of cv: (4,)
----
Traceback (most recent call last):
File "/Users/eliehammou/miniconda3/envs/simunet_cheat_sheet/bin/validphys", line 33, in <module>
sys.exit(load_entry_point('validphys', 'console_scripts', 'validphys')())
File "/Users/eliehammou/Software/simunet_git/SIMUnet/validphys2/src/validphys/scripts/main.py", line 10, in main
vp.main()
File "/Users/eliehammou/Software/simunet_git/SIMUnet/validphys2/src/validphys/app.py", line 163, in main
a.main()
File "/Users/eliehammou/miniconda3/envs/simunet_cheat_sheet/lib/python3.9/site-packages/reportengine/app.py", line 421, in main
self.run()
File "/Users/eliehammou/Software/simunet_git/SIMUnet/validphys2/src/validphys/app.py", line 158, in run
super().run()
File "/Users/eliehammou/miniconda3/envs/simunet_cheat_sheet/lib/python3.9/site-packages/reportengine/app.py", line 406, in run
rb.execute_sequential()
File "/Users/eliehammou/miniconda3/envs/simunet_cheat_sheet/lib/python3.9/site-packages/reportengine/resourcebuilder.py", line 210, in execute_sequential
result = self.get_result(callspec.function,
File "/Users/eliehammou/miniconda3/envs/simunet_cheat_sheet/lib/python3.9/site-packages/reportengine/resourcebuilder.py", line 380, in get_result
fres = function(**kwdict)
File "/Users/eliehammou/miniconda3/envs/simunet_cheat_sheet/lib/python3.9/site-packages/reportengine/figure.py", line 143, in wrapper
return list(func(*args, **kwargs))
File "/Users/eliehammou/Software/simunet_git/SIMUnet/validphys2/src/validphys/simunet_analysis.py", line 2194, in bsm_sm_ratio
std = bsm_dict[dataset.name] * pred.loc[:,1:].std(axis=1).to_numpy() / cv
ValueError: operands could not be broadcast together with shapes (5,) (4,) |
|
I checked and this error disappears if I manually remove all the cuts. |
|
I have another issue when a include a new FK table. I do not understand it. Here is my dataset input: - {dataset: HLLHC_TTBAR_14TEV_LJ_DIF_MTTBAR, frac: 0.75, cfac: [QCD], contamination: EFT_LO, new_commondata: True}Here is my error: (simunet_cheat_sheet) ~/PBSP/Projects/Interpretation/vp-analysis/data_visualisation/ - (main) > validphys SMEFT_effect_runcard.yaml
[WARNING]: Output folder exists: /Users/eliehammou/PBSP/Projects/Interpretation/vp-analysis/data_visualisation/output Overwriting contents
[INFO]: All requirements processed and checked successfully. Executing actions.
[INFO]: Loading HLLHC_TTBAR_14TEV_LJ_DIF_MTTBAR
----
Traceback (most recent call last):
File "/Users/eliehammou/miniconda3/envs/simunet_cheat_sheet/bin/validphys", line 33, in <module>
sys.exit(load_entry_point('validphys', 'console_scripts', 'validphys')())
File "/Users/eliehammou/Software/simunet_git/SIMUnet/validphys2/src/validphys/scripts/main.py", line 10, in main
vp.main()
File "/Users/eliehammou/Software/simunet_git/SIMUnet/validphys2/src/validphys/app.py", line 163, in main
a.main()
File "/Users/eliehammou/miniconda3/envs/simunet_cheat_sheet/lib/python3.9/site-packages/reportengine/app.py", line 421, in main
self.run()
File "/Users/eliehammou/Software/simunet_git/SIMUnet/validphys2/src/validphys/app.py", line 158, in run
super().run()
File "/Users/eliehammou/miniconda3/envs/simunet_cheat_sheet/lib/python3.9/site-packages/reportengine/app.py", line 406, in run
rb.execute_sequential()
File "/Users/eliehammou/miniconda3/envs/simunet_cheat_sheet/lib/python3.9/site-packages/reportengine/resourcebuilder.py", line 210, in execute_sequential
result = self.get_result(callspec.function,
File "/Users/eliehammou/miniconda3/envs/simunet_cheat_sheet/lib/python3.9/site-packages/reportengine/resourcebuilder.py", line 380, in get_result
fres = function(**kwdict)
File "/Users/eliehammou/miniconda3/envs/simunet_cheat_sheet/lib/python3.9/site-packages/reportengine/figure.py", line 143, in wrapper
return list(func(*args, **kwargs))
File "/Users/eliehammou/Software/simunet_git/SIMUnet/validphys2/src/validphys/simunet_analysis.py", line 2184, in bsm_sm_ratio
table = kitable(data=dataset, info=info)
File "/Users/eliehammou/Software/simunet_git/SIMUnet/validphys2/src/validphys/plotoptions/core.py", line 306, in kitable
data = data.load()
File "/Users/eliehammou/Software/simunet_git/SIMUnet/validphys2/src/validphys/core.py", line 516, in load
fktable = p.load()
File "/Users/eliehammou/Software/simunet_git/SIMUnet/validphys2/src/validphys/core.py", line 617, in load
return FKTable(str(self.fkpath), [str(factor) for factor in self.cfactors])
File "/Users/eliehammou/miniconda3/envs/simunet_cheat_sheet/lib/python3.9/site-packages/NNPDF/nnpdf.py", line 3042, in __init__
_nnpdf.FKTable_swiginit(self, _nnpdf.new_FKTable(*args))
RuntimeError: [utils] error: Could not open (PosixPath('/Users/eliehammou/miniconda3/envs/simunet_cheat_sheet/share/NNPDF/data/theory_270/fastkernel/HLLHC_TTBAR_14TEV_LJ_DIF_MTTBAR.pineappl.lz4'),) |
|
I understand the issue, it is related to bit where I try to load the kinematic information from the fktable, and it fails in the new format |
|
As it stands it gives me the following error when I use Dataset: ATLASTTBARTOT7TEV
Table shape: (1, 3)
Cuts: [0]
Dataset: ATLASTTBARTOT8TEV
Table shape: (1, 3)
Cuts: [0]
Dataset: ATLAS_TTB_DIFF_8TEV_LJ_TTRAPNORM
Table shape: (4, 3)
Cuts: [0 1 2 3]
Dataset: ATLAS_TOPDIFF_DILEPT_8TEV_TTMNORM
Table shape: (5, 3)
Cuts: [0 1 2 3 4]
Dataset: ATLAS_TTBAR_8TEV_LJETS_TOTAL
Table shape: (1, 3)
Cuts: [0]
Dataset: ATLAS_TTBAR_13TEV_TTMNORM
Table shape: (8, 3)
Cuts: [1 2 3 4 5 6 7 8]
----
Traceback (most recent call last):
File "/Users/eliehammou/miniconda3/envs/simunet_cheat_sheet/bin/validphys", line 33, in <module>
sys.exit(load_entry_point('validphys', 'console_scripts', 'validphys')())
File "/Users/eliehammou/Software/simunet_git/SIMUnet/validphys2/src/validphys/scripts/main.py", line 10, in main
vp.main()
File "/Users/eliehammou/Software/simunet_git/SIMUnet/validphys2/src/validphys/app.py", line 163, in main
a.main()
File "/Users/eliehammou/miniconda3/envs/simunet_cheat_sheet/lib/python3.9/site-packages/reportengine/app.py", line 421, in main
self.run()
File "/Users/eliehammou/Software/simunet_git/SIMUnet/validphys2/src/validphys/app.py", line 158, in run
super().run()
File "/Users/eliehammou/miniconda3/envs/simunet_cheat_sheet/lib/python3.9/site-packages/reportengine/app.py", line 406, in run
rb.execute_sequential()
File "/Users/eliehammou/miniconda3/envs/simunet_cheat_sheet/lib/python3.9/site-packages/reportengine/resourcebuilder.py", line 210, in execute_sequential
result = self.get_result(callspec.function,
File "/Users/eliehammou/miniconda3/envs/simunet_cheat_sheet/lib/python3.9/site-packages/reportengine/resourcebuilder.py", line 380, in get_result
fres = function(**kwdict)
File "/Users/eliehammou/miniconda3/envs/simunet_cheat_sheet/lib/python3.9/site-packages/reportengine/figure.py", line 143, in wrapper
return list(func(*args, **kwargs))
File "/Users/eliehammou/Software/simunet_git/SIMUnet/validphys2/src/validphys/simunet_analysis.py", line 2189, in bsm_sm_ratio
x = info.get_xcol(table=table)[cuts]
IndexError: index 8 is out of bounds for axis 0 with size 8where I have implemented the following print statements: for dataset in data.datasets:
# get cuts from dataset
cuts = dataset.cuts.load()
# initialise figure
fig, ax = plt.subplots()
# get info
info = get_info(dataset)
# get kin table & get x
table = kitable(data=dataset, info=info)
print("Dataset:", dataset.name)
print("Table shape:", table.shape)
print("Cuts:", cuts)
x = info.get_xcol(table=table)[cuts] |
|
There is also an issue when you implement the E.g., this input: contamination_parameters:
- name: "W"
value: 0.00008
linear_combination:
Olq3: -15.94
- name: 'Y'
value: 0.00000
# value: 0.00015
linear_combination:
Olq1: 1.51606
Oed: -6.0606
Oeu: 12.1394
Olu: 6.0606
Old: -3.0394
Oqe: 3.0394
- name: 'Z'
value: 0.0004
# value: 0.0004
linear_combination:
O81qq: -164.705
O8ut: -164.705
O8dt: -164.705
O8qt: -164.705
O8qu: -164.705
O8qd: -164.705gives this error: (simunet_cheat_sheet) ~/PBSP/Projects/Interpretation/vp-analysis/data_visualisation/ - (main) > validphys SMEFT_effect_runcard.yaml
[WARNING]: Output folder exists: /Users/eliehammou/PBSP/Projects/Interpretation/vp-analysis/data_visualisation/output Overwriting contents
[INFO]: All requirements processed and checked successfully. Executing actions.
----
Traceback (most recent call last):
File "/Users/eliehammou/miniconda3/envs/simunet_cheat_sheet/bin/validphys", line 33, in <module>
sys.exit(load_entry_point('validphys', 'console_scripts', 'validphys')())
File "/Users/eliehammou/Software/simunet_git/SIMUnet/validphys2/src/validphys/scripts/main.py", line 10, in main
vp.main()
File "/Users/eliehammou/Software/simunet_git/SIMUnet/validphys2/src/validphys/app.py", line 163, in main
a.main()
File "/Users/eliehammou/miniconda3/envs/simunet_cheat_sheet/lib/python3.9/site-packages/reportengine/app.py", line 421, in main
self.run()
File "/Users/eliehammou/Software/simunet_git/SIMUnet/validphys2/src/validphys/app.py", line 158, in run
super().run()
File "/Users/eliehammou/miniconda3/envs/simunet_cheat_sheet/lib/python3.9/site-packages/reportengine/app.py", line 406, in run
rb.execute_sequential()
File "/Users/eliehammou/miniconda3/envs/simunet_cheat_sheet/lib/python3.9/site-packages/reportengine/resourcebuilder.py", line 210, in execute_sequential
result = self.get_result(callspec.function,
File "/Users/eliehammou/miniconda3/envs/simunet_cheat_sheet/lib/python3.9/site-packages/reportengine/resourcebuilder.py", line 380, in get_result
fres = function(**kwdict)
File "/Users/eliehammou/Software/simunet_git/SIMUnet/validphys2/src/validphys/simunet_analysis.py", line 2005, in load_datasets_contamination
cont_name = contamination_parameters["name"]
TypeError: list indices must be integers or slices, not str |
…alysis added uncertainy decomposition to bsm_sm_factor, and updated load_datasets_contamination to work with bsm lists
|
I just tested it and I think the plots look great! I had a look at the code as well and it seems all good to me |
|
Actually I found that an error occurs if you include datasets without a contamination order: (simunet-dev) ~/PBSP/Projects/Interpretation/vp-analysis/data_visualisation/ - (main) > validphys SMEFT_effect_runcard.yaml
[WARNING]: Output folder exists: /Users/eliehammou/PBSP/Projects/Interpretation/vp-analysis/data_visualisation/output Overwriting contents
[INFO]: All requirements processed and checked successfully. Executing actions.
HLLHC_FWDY_14TEV_CCm_DIF_RAP
[WARNING]: HLLHC_FWDY_14TEV_CCm_DIF_RAP is not contaminated. Is it right?
----
Traceback (most recent call last):
File "/Users/eliehammou/miniconda3/envs/simunet-dev/bin/validphys", line 33, in <module>
sys.exit(load_entry_point('validphys', 'console_scripts', 'validphys')())
File "/Users/eliehammou/Software/simunet_git/SIMUnet/validphys2/src/validphys/scripts/main.py", line 10, in main
vp.main()
File "/Users/eliehammou/Software/simunet_git/SIMUnet/validphys2/src/validphys/app.py", line 163, in main
a.main()
File "/Users/eliehammou/miniconda3/envs/simunet-dev/lib/python3.9/site-packages/reportengine/app.py", line 421, in main
self.run()
File "/Users/eliehammou/Software/simunet_git/SIMUnet/validphys2/src/validphys/app.py", line 158, in run
super().run()
File "/Users/eliehammou/miniconda3/envs/simunet-dev/lib/python3.9/site-packages/reportengine/app.py", line 406, in run
rb.execute_sequential()
File "/Users/eliehammou/miniconda3/envs/simunet-dev/lib/python3.9/site-packages/reportengine/resourcebuilder.py", line 210, in execute_sequential
result = self.get_result(callspec.function,
File "/Users/eliehammou/miniconda3/envs/simunet-dev/lib/python3.9/site-packages/reportengine/resourcebuilder.py", line 380, in get_result
fres = function(**kwdict)
File "/Users/eliehammou/Software/simunet_git/SIMUnet/validphys2/src/validphys/simunet_analysis.py", line 2295, in load_datasets_contamination
bsm_dict[dataset.name] = np.ones(dataset.commondata.ndata)
AttributeError: 'DataSetInput' object has no attribute 'commondata'Here is the runcard I have used: meta:
title: SMEFT / SM plot (SMEFT K-factor)
keywords: [example]
author: Francesco Merlotti
pdf:
id: NNPDF40_nnlo_aS_01180
label: NNPDF40_nnlo_aS_01180
theoryid: 270
use_cuts: internal
dataset_inputs:
# Drell-Yan datasets
- {dataset: HLLHC_FWDY_14TEV_CCm_DIF_RAP, frac: 0.75, cfac: ['QCD'], new_commondata: True}
- {dataset: HLLHC_FWDY_14TEV_CCp_DIF_RAP, frac: 0.75, cfac: ['QCD'], new_commondata: True}
- {dataset: HLLHC_FWDY_14TEV_NC_DIF_RAP, frac: 0.75, cfac: ['QCD'], new_commondata: True}
contamination_parameters:
- name: 'Z'
value: 0.0004
# value: 0.0004
linear_combination:
O81qq: -164.705
O8ut: -164.705
O8dt: -164.705
O8qt: -164.705
O8qu: -164.705
O8qd: -164.705
template_text: |
{@bsm_sm_ratio@}
actions_:
- report(main=true) |
|
I also found a bug in the jet sector, I believe the cuts are not correctly applied on some datasets: (simunet-dev) ~/PBSP/Projects/Interpretation/vp-analysis/data_visualisation/ - (main) > validphys SMEFT_effect_runcard_jet.yaml
[INFO]: All requirements processed and checked successfully. Executing actions.
[INFO]: Loading ATLAS_1JET_8TEV_R06_DEC.
[INFO]: Loading ATLAS_2JET_7TEV_R06.
[INFO]: Loading CMS_2JET_7TEV.
[INFO]: Loading CMS_1JET_8TEV.
[INFO]: Loading ATLAS_1JET_13TEV_DIF_PT-Y.
[INFO]: Loading CMS_1JET_13TEV_DIF_PT-Y-R07.
----
Traceback (most recent call last):
File "/Users/eliehammou/miniconda3/envs/simunet-dev/bin/validphys", line 33, in <module>
sys.exit(load_entry_point('validphys', 'console_scripts', 'validphys')())
File "/Users/eliehammou/Software/simunet_git/SIMUnet/validphys2/src/validphys/scripts/main.py", line 10, in main
vp.main()
File "/Users/eliehammou/Software/simunet_git/SIMUnet/validphys2/src/validphys/app.py", line 163, in main
a.main()
File "/Users/eliehammou/miniconda3/envs/simunet-dev/lib/python3.9/site-packages/reportengine/app.py", line 421, in main
self.run()
File "/Users/eliehammou/Software/simunet_git/SIMUnet/validphys2/src/validphys/app.py", line 158, in run
super().run()
File "/Users/eliehammou/miniconda3/envs/simunet-dev/lib/python3.9/site-packages/reportengine/app.py", line 406, in run
rb.execute_sequential()
File "/Users/eliehammou/miniconda3/envs/simunet-dev/lib/python3.9/site-packages/reportengine/resourcebuilder.py", line 210, in execute_sequential
result = self.get_result(callspec.function,
File "/Users/eliehammou/miniconda3/envs/simunet-dev/lib/python3.9/site-packages/reportengine/resourcebuilder.py", line 380, in get_result
fres = function(**kwdict)
File "/Users/eliehammou/miniconda3/envs/simunet-dev/lib/python3.9/site-packages/reportengine/figure.py", line 143, in wrapper
return list(func(*args, **kwargs))
File "/Users/eliehammou/Software/simunet_git/SIMUnet/validphys2/src/validphys/simunet_analysis.py", line 2453, in bsm_sm_ratio
x = info.get_xcol(table=table)[cuts]
IndexError: index 187 is out of bounds for axis 0 with size 185 |
|
Can |
Plot of the cumulative SMEFT K-factor.