Skip to content

Commit

Permalink
Correct bug in data generation
Browse files Browse the repository at this point in the history
  • Loading branch information
achiefa committed Dec 10, 2024
1 parent 21226f3 commit 870a642
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 77 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
data_central:
- 5.68699350e+05
- 4.66912350e+05
- 4.79309450e+05
- 3.95159750e+05
- 282824.0
- 5.82064450e+05
- 4.64341995e+05
- 4.78111725e+05
- 371450.4
- 2.81840095e+05
Original file line number Diff line number Diff line change
Expand Up @@ -249,17 +249,17 @@ def generate_data(self, variant='default', save_to_yaml=False, path='./'):
shift = 0
sys_unc_bin = symmetrized_sys_uncs[data_idx]

# Statistical uncertainty
unc_dict = {STAT_LABEL: stat_unc[data_idx]}

# Add shift from symmetrization
tmp = {}
for key, value in sys_unc_bin.items():
shift += value['shift']
tmp[key] = value['sym_error']
tmp[key] = value['sym_error'] * central_data[data_idx] * 0.01

# Shift central data
central_data[data_idx] = central_data[data_idx] + shift

# Statistical uncertainty
unc_dict = {STAT_LABEL: stat_unc[data_idx]}
# Shift central
central_data[data_idx] = central_data[data_idx] * (1.0 + shift * 0.01)

# Lumi uncertainty
unc_dict['corr_lumi_unc'] = central_data[data_idx] * CMSLUMI13 * 0.01
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ definitions:
treatment: ADD
type: UNCORR
corr_lumi_unc:
description: Luminosity uncertainty 2.6%
description: Luminosity uncertainty 2.5%
treatment: MULT
type: CMSLUMI13
track_sys_unc:
Expand Down Expand Up @@ -57,72 +57,72 @@ definitions:
type: CORR
bins:
- stat_uncorr_unc: 37170.0
corr_lumi_unc: 1.42174837e+04
track_sys_unc: 2.3
brch_sys_unc: 2.4
muons_sys_unc: 1.2
nsel_sys_unc: 1.5
dstar_sys_unc: 0.5
bkgnorm_sys_unc: 0.5
ptmiss_sys_unc: 8.12403840e-01
pileup_sys_unc: 1.95128163e+00
secvrx_sys_unc: 1.55563492e+00
pdf_sys_unc: 1.2
frag_sys_unc: 3.58434094e+00
mc_sys_unc: 3.45651559e+00
corr_lumi_unc: 1.45516113e+04
track_sys_unc: 13080.1
brch_sys_unc: 1.36488000e+04
muons_sys_unc: 6.82440000e+03
nsel_sys_unc: 8530.5
dstar_sys_unc: 2843.5
bkgnorm_sys_unc: 4.85064763e+03
ptmiss_sys_unc: 5.57209927e+03
pileup_sys_unc: 2.59055179e+03
secvrx_sys_unc: 1.04554223e+04
pdf_sys_unc: 7393.1
frag_sys_unc: 1.61254281e+04
mc_sys_unc: 4.66429352e+04
- stat_uncorr_unc: 28410.0
corr_lumi_unc: 1.16728088e+04
track_sys_unc: 2.3
brch_sys_unc: 2.4
muons_sys_unc: 1.2
nsel_sys_unc: 1.5
dstar_sys_unc: 0.5
bkgnorm_sys_unc: 8.52936105e-01
ptmiss_sys_unc: 9.79795897e-01
pileup_sys_unc: 4.55521679e-01
secvrx_sys_unc: 1.83847763e+00
pdf_sys_unc: 1.3
frag_sys_unc: 2.83548938e+00
mc_sys_unc: 8.20167666e+00
corr_lumi_unc: 1.16085499e+04
track_sys_unc: 10738.93
brch_sys_unc: 11205.84
muons_sys_unc: 5602.92
nsel_sys_unc: 7.00365000e+03
dstar_sys_unc: 2334.55
bkgnorm_sys_unc: 7.27466158e+03
ptmiss_sys_unc: 4.98523461e+03
pileup_sys_unc: 1.37778013e+04
secvrx_sys_unc: 7.92372545e+03
pdf_sys_unc: 4.20219000e+03
frag_sys_unc: 3.02988257e+04
mc_sys_unc: 4.97226268e+04
- stat_uncorr_unc: 30210.0
corr_lumi_unc: 1.19827362e+04
track_sys_unc: 2.3
brch_sys_unc: 2.4
muons_sys_unc: 1.2
nsel_sys_unc: 1.5
dstar_sys_unc: 0.5
bkgnorm_sys_unc: 1.55804365e+00
ptmiss_sys_unc: 1.06770783e+00
pileup_sys_unc: 2.95084734e+00
secvrx_sys_unc: 1.69705627e+00
pdf_sys_unc: 0.9
frag_sys_unc: 6.48922183e+00
mc_sys_unc: 1.06492958e+01
corr_lumi_unc: 1.19527931e+04
track_sys_unc: 1.10241300e+04
brch_sys_unc: 11503.44
muons_sys_unc: 5751.72
nsel_sys_unc: 7.18965000e+03
dstar_sys_unc: 2396.55
bkgnorm_sys_unc: 5.48071651e+03
ptmiss_sys_unc: 5.04415423e+03
pileup_sys_unc: 9.35268798e+03
secvrx_sys_unc: 1.01677005e+04
pdf_sys_unc: 6710.34
frag_sys_unc: 1.51324627e+04
mc_sys_unc: 3.54260028e+04
- stat_uncorr_unc: 27450.0
corr_lumi_unc: 9.87899375e+03
track_sys_unc: 2.3
brch_sys_unc: 2.4
muons_sys_unc: 1.2
nsel_sys_unc: 1.5
dstar_sys_unc: 0.5
bkgnorm_sys_unc: 1.14345966e+00
ptmiss_sys_unc: 1.05237826e+00
pileup_sys_unc: 1.95128163e+00
secvrx_sys_unc: 2.12132034e+00
pdf_sys_unc: 1.4
frag_sys_unc: 3.15713478e+00
mc_sys_unc: 7.39104188e+00
corr_lumi_unc: 9286.26
track_sys_unc: 9.08868000e+03
brch_sys_unc: 9483.84
muons_sys_unc: 4741.92
nsel_sys_unc: 5.92740000e+03
dstar_sys_unc: 1975.8
bkgnorm_sys_unc: 3.60007893e+03
ptmiss_sys_unc: 8.89768356e+03
pileup_sys_unc: 1.92161152e+04
secvrx_sys_unc: 1.50886970e+04
pdf_sys_unc: 5.92740000e+03
frag_sys_unc: 7.27566721e+03
mc_sys_unc: 4.87262084e+04
- stat_uncorr_unc: 24680.0
corr_lumi_unc: 7070.6
track_sys_unc: 2.3
brch_sys_unc: 2.4
muons_sys_unc: 1.2
nsel_sys_unc: 1.5
dstar_sys_unc: 0.5
bkgnorm_sys_unc: 9.11043358e-01
ptmiss_sys_unc: 2.25166605e+00
pileup_sys_unc: 4.86286952e+00
secvrx_sys_unc: 3.81837662e+00
pdf_sys_unc: 1.5
frag_sys_unc: 1.84119526e+00
mc_sys_unc: 1.23307542e+01
corr_lumi_unc: 7.04600238e+03
track_sys_unc: 6505.09
brch_sys_unc: 6787.92
muons_sys_unc: 3393.96
nsel_sys_unc: 4242.45
dstar_sys_unc: 1414.15
bkgnorm_sys_unc: 1.46962779e+03
ptmiss_sys_unc: 3.67406947e+03
pileup_sys_unc: 7.49766273e+03
secvrx_sys_unc: 9.99955055e+03
pdf_sys_unc: 4808.11
frag_sys_unc: 1.88347580e+04
mc_sys_unc: 2.64971109e+04

0 comments on commit 870a642

Please sign in to comment.