More information is available in my slides at https://plexoos.github.io/pub-docs/star-run14-jetcorr-issue
To investigate the reason for the drop in the number of global tracks in Run 14 data we create the following branches:
baseline
= ds-fix-cmake-build
: This is our baseline for a "recent" code
ds-jc-fix
: Revert changes causing the drop as found by Dmitri. This is essentiall the same
patch as on ds-jc-fix-SL16f
ds-jc-fix-3
: Same patch as ds-jc-fix
rebased on a later commit following some approx()
bug related changes introduced by Victor
ds-jc-fix-cutele
: In addition to ds-jc-fix
revert the change in mCutEle
value
ds-jc-fix-victor-2
: Changes proposed by Victor. These changes were pointed to me by email
and I applied them as found in a Victor's directory
ds-jc-fix-victor-3
: This is similar to ds-jc-fix-victor-2
except it is based on
a later commit and committed to CVS. Most importantly, this patch set has the same scale
factor applied to the track error matrix as in SL16f
ds-jc-fix-victor-4
: This branch is based on ds-jc-fix-victor-3
. It includes a change to
the argument of the approx()
function in order to exactly match the result of ds-jc-fix
and ds-jc-fix-3
ds-jc-fix-SL16f-last-good
and ds-jc-fix-SL16f-first-bad
: The bug causing the drop in
the number of global track has been narrowed down to be between these two references
ds-jc-fix-SL16f
: Contains a (minimal) patch fixing the problem by reverting changes between
ds-jc-fix-SL16f-last-good
and ds-jc-fix-SL16f-first-bad
Each of the proposed changes we test with real data from Run 14 and Run 18, and simulation from Run 14
For quick navigation use the links to various test results at the top of this page.
import plotly.io as pio
pio.templates.default = "none"
import uproot
import numpy as np
import plotly.offline as ofl
import mypytk.plotlytools as ptls
ofl.init_notebook_mode(connected=True)
config = dict(displayModeBar=False, staticPlot=False, showLink=False)
#config = dict(displayModeBar=True, staticPlot=True, showLink=False)
layout = {
'xaxis': {'showgrid': True, 'gridcolor': '#ccc', 'gridwidth': 1, 'automargin': True},
'yaxis1': {'showgrid': True, 'gridcolor': '#ccc', 'gridwidth': 1, 'title': 'Events', 'automargin': True},
'yaxis2': {'showgrid': True, 'gridcolor': '#ccc', 'gridwidth': 1, 'title': 'Ratio', 'automargin': True},
'barmode': 'overlay',
'legend': {'orientation': 'h', 'y': 1.06},
#'showlegend': False,
'margin': {'l': 50, 'r': 15, 'b': 40, 't': 5, 'pad': 5},
'width': 800,
'height': 900,
#'font': dict(size=20)
}
observables = {
'nhits': {'branch': 'GlobalTracks.mNHitsFit', 'bins': np.linspace(0, 48, 49), 'yaxis_range': [0.7, 1.3], 'xaxis_title': 'Number of Hits'},
'pt': {'branch': 'GlobalTracks.mPt', 'bins': np.linspace(0, 2, 51), 'yaxis_range': [0.7, 1.2], 'xaxis_title': 'Transverse Momentum'},
'eta': {'branch': 'GlobalTracks.mEta', 'bins': np.linspace(-1.5, 1.5, 51), 'yaxis_range': [0.7, 1.3], 'xaxis_title': 'Pseudorapidity'},
'chi2': {'branch': 'GlobalTracks.mChiSqXY', 'bins': np.linspace(0, 6, 61) , 'yaxis_range': [0.6, 1.4], 'xaxis_title': 'Chi-squared'}
}
#selection = 'pt < 2 and pt > 0.5'
#selection = 'nhits > 12 and pt < 2'
selection = 'nhits >= 15'
ptls.output_figure_dir='./graphics/'
ptls.include_plotlyjs='/pub-docs/assets/plotly.min.js'
all_hists = {}
trace_names = ['With bug', 'Patched', 'Ratio']
mudst0 = uproot.open('data/ds-fix-cmake-build/st_physics_15086051_raw_2500017.MuDst.root')['MuDst']
mudst1 = uproot.open('data/ds-jc-fix/st_physics_15086051_raw_2500017.MuDst.root')['MuDst']
ah = ptls.make_plots(mudst0, mudst1, observables, selection, layout, config, 'run_14_data_baseline_vs_ds-jc-fix', trace_names)
all_hists.update(ah)
Plot Number of Hits Entries total: 317791, 316974, frac t1/t0: 0.997 Entries selected: 205630, 223651, frac s1/s0: 1.09 Fraction selected: 0.647, 0.706
Plot Transverse Momentum Entries total: 317791, 316974, frac t1/t0: 0.997 Entries selected: 205630, 223651, frac s1/s0: 1.09 Fraction selected: 0.647, 0.706
Plot Pseudorapidity Entries total: 317791, 316974, frac t1/t0: 0.997 Entries selected: 205630, 223651, frac s1/s0: 1.09 Fraction selected: 0.647, 0.706
Plot Chi-squared Entries total: 317791, 316974, frac t1/t0: 0.997 Entries selected: 205630, 223651, frac s1/s0: 1.09 Fraction selected: 0.647, 0.706
mudst0 = uproot.open('data/ds-fix-cmake-build/st_physics_15086051_raw_2500017.MuDst.root')['MuDst']
mudst1 = uproot.open('data/ds-jc-fix-victor-2/st_physics_15086051_raw_2500017.MuDst.root')['MuDst']
ah = ptls.make_plots(mudst0, mudst1, observables, selection, layout, config, 'run_14_data_baseline_vs_ds-jc-fix-victor-2', trace_names)
all_hists.update(ah)
Plot Number of Hits Entries total: 317791, 303110, frac t1/t0: 0.954 Entries selected: 205630, 229428, frac s1/s0: 1.12 Fraction selected: 0.647, 0.757
Plot Transverse Momentum Entries total: 317791, 303110, frac t1/t0: 0.954 Entries selected: 205630, 229428, frac s1/s0: 1.12 Fraction selected: 0.647, 0.757
Plot Pseudorapidity Entries total: 317791, 303110, frac t1/t0: 0.954 Entries selected: 205630, 229428, frac s1/s0: 1.12 Fraction selected: 0.647, 0.757
Plot Chi-squared Entries total: 317791, 303110, frac t1/t0: 0.954 Entries selected: 205630, 229428, frac s1/s0: 1.12 Fraction selected: 0.647, 0.757
mudst0 = uproot.open('data/ds-fix-cmake-build/st_physics_15086051_raw_2500017.MuDst.root')['MuDst']
mudst1 = uproot.open('data/ds-jc-fix-victor-3/st_physics_15086051_raw_2500017.MuDst.root')['MuDst']
ah = ptls.make_plots(mudst0, mudst1, observables, selection, layout, config, 'run_14_data_baseline_vs_ds-jc-fix-victor-3', trace_names)
all_hists.update(ah)
Plot Number of Hits Entries total: 317791, 316741, frac t1/t0: 0.997 Entries selected: 205630, 224149, frac s1/s0: 1.09 Fraction selected: 0.647, 0.708
Plot Transverse Momentum Entries total: 317791, 316741, frac t1/t0: 0.997 Entries selected: 205630, 224149, frac s1/s0: 1.09 Fraction selected: 0.647, 0.708
Plot Pseudorapidity Entries total: 317791, 316741, frac t1/t0: 0.997 Entries selected: 205630, 224149, frac s1/s0: 1.09 Fraction selected: 0.647, 0.708
Plot Chi-squared Entries total: 317791, 316741, frac t1/t0: 0.997 Entries selected: 205630, 224149, frac s1/s0: 1.09 Fraction selected: 0.647, 0.708
mudst0 = uproot.open('data/ds-jc-fix/st_physics_15086051_raw_2500017.MuDst.root')['MuDst']
mudst1 = uproot.open('data/ds-jc-fix-victor-2/st_physics_15086051_raw_2500017.MuDst.root')['MuDst']
ah = ptls.make_plots(mudst0, mudst1, observables, selection, layout, config)
Plot Number of Hits Entries total: 316974, 303110, frac t1/t0: 0.956 Entries selected: 223651, 229428, frac s1/s0: 1.03 Fraction selected: 0.706, 0.757
Plot Transverse Momentum Entries total: 316974, 303110, frac t1/t0: 0.956 Entries selected: 223651, 229428, frac s1/s0: 1.03 Fraction selected: 0.706, 0.757
Plot Pseudorapidity Entries total: 316974, 303110, frac t1/t0: 0.956 Entries selected: 223651, 229428, frac s1/s0: 1.03 Fraction selected: 0.706, 0.757
Plot Chi-squared Entries total: 316974, 303110, frac t1/t0: 0.956 Entries selected: 223651, 229428, frac s1/s0: 1.03 Fraction selected: 0.706, 0.757
mudst0 = uproot.open('data/ds-jc-fix/st_physics_15086051_raw_2500017.MuDst.root')['MuDst']
mudst1 = uproot.open('data/ds-jc-fix-victor-3/st_physics_15086051_raw_2500017.MuDst.root')['MuDst']
ah = ptls.make_plots(mudst0, mudst1, observables, selection, layout, config)
Plot Number of Hits Entries total: 316974, 316741, frac t1/t0: 0.999 Entries selected: 223651, 224149, frac s1/s0: 1.0 Fraction selected: 0.706, 0.708
Plot Transverse Momentum Entries total: 316974, 316741, frac t1/t0: 0.999 Entries selected: 223651, 224149, frac s1/s0: 1.0 Fraction selected: 0.706, 0.708
Plot Pseudorapidity Entries total: 316974, 316741, frac t1/t0: 0.999 Entries selected: 223651, 224149, frac s1/s0: 1.0 Fraction selected: 0.706, 0.708
Plot Chi-squared Entries total: 316974, 316741, frac t1/t0: 0.999 Entries selected: 223651, 224149, frac s1/s0: 1.0 Fraction selected: 0.706, 0.708
mudst0 = uproot.open('data/ds-jc-fix/st_physics_15086051_raw_2500017.MuDst.root')['MuDst']
mudst1 = uproot.open('data/ds-jc-fix-3/st_physics_15086051_raw_2500017.MuDst.root')['MuDst']
ah = ptls.make_plots(mudst0, mudst1, observables, selection, layout, config)
Plot Number of Hits Entries total: 316974, 316974, frac t1/t0: 1.0 Entries selected: 223651, 223651, frac s1/s0: 1.0 Fraction selected: 0.706, 0.706
Plot Transverse Momentum Entries total: 316974, 316974, frac t1/t0: 1.0 Entries selected: 223651, 223651, frac s1/s0: 1.0 Fraction selected: 0.706, 0.706
Plot Pseudorapidity Entries total: 316974, 316974, frac t1/t0: 1.0 Entries selected: 223651, 223651, frac s1/s0: 1.0 Fraction selected: 0.706, 0.706
Plot Chi-squared Entries total: 316974, 316974, frac t1/t0: 1.0 Entries selected: 223651, 223651, frac s1/s0: 1.0 Fraction selected: 0.706, 0.706
mudst0 = uproot.open('data/ds-jc-fix-3/st_physics_15086051_raw_2500017.MuDst.root')['MuDst']
mudst1 = uproot.open('data/ds-jc-fix-victor-4/st_physics_15086051_raw_2500017.MuDst.root')['MuDst']
ah = ptls.make_plots(mudst0, mudst1, observables, selection, layout, config)
Plot Number of Hits Entries total: 316974, 316974, frac t1/t0: 1.0 Entries selected: 223651, 223651, frac s1/s0: 1.0 Fraction selected: 0.706, 0.706
Plot Transverse Momentum Entries total: 316974, 316974, frac t1/t0: 1.0 Entries selected: 223651, 223651, frac s1/s0: 1.0 Fraction selected: 0.706, 0.706
Plot Pseudorapidity Entries total: 316974, 316974, frac t1/t0: 1.0 Entries selected: 223651, 223651, frac s1/s0: 1.0 Fraction selected: 0.706, 0.706
Plot Chi-squared Entries total: 316974, 316974, frac t1/t0: 1.0 Entries selected: 223651, 223651, frac s1/s0: 1.0 Fraction selected: 0.706, 0.706
mudst0 = uproot.open('data/ds-jc-fix-SL16f/st_physics_15086051_raw_2500017.MuDst.root')['MuDst']
mudst1 = uproot.open('data/ds-jc-fix-SL16f-last-good/st_physics_15086051_raw_2500017.MuDst.root')['MuDst']
ah = ptls.make_plots(mudst0, mudst1, observables, selection, layout, config)
Plot Number of Hits Entries total: 315936, 315936, frac t1/t0: 1.0 Entries selected: 223194, 223194, frac s1/s0: 1.0 Fraction selected: 0.706, 0.706
Plot Transverse Momentum Entries total: 315936, 315936, frac t1/t0: 1.0 Entries selected: 223194, 223194, frac s1/s0: 1.0 Fraction selected: 0.706, 0.706
Plot Pseudorapidity Entries total: 315936, 315936, frac t1/t0: 1.0 Entries selected: 223194, 223194, frac s1/s0: 1.0 Fraction selected: 0.706, 0.706
Plot Chi-squared Entries total: 315936, 315936, frac t1/t0: 1.0 Entries selected: 223194, 223194, frac s1/s0: 1.0 Fraction selected: 0.706, 0.706
mudst0 = uproot.open('data/ds-fix-cmake-build/st_physics_19114030_raw_4500023.MuDst.root')['MuDst']
mudst1 = uproot.open('data/ds-jc-fix/st_physics_19114030_raw_4500023.MuDst.root')['MuDst']
ah = ptls.make_plots(mudst0, mudst1, observables, selection, layout, config, 'run_18_data_baseline_vs_ds-jc-fix', trace_names)
Plot Number of Hits Entries total: 112654, 104072, frac t1/t0: 0.924 Entries selected: 90668, 90793, frac s1/s0: 1.0 Fraction selected: 0.805, 0.872
Plot Transverse Momentum Entries total: 112654, 104072, frac t1/t0: 0.924 Entries selected: 90668, 90793, frac s1/s0: 1.0 Fraction selected: 0.805, 0.872
Plot Pseudorapidity Entries total: 112654, 104072, frac t1/t0: 0.924 Entries selected: 90668, 90793, frac s1/s0: 1.0 Fraction selected: 0.805, 0.872
Plot Chi-squared Entries total: 112654, 104072, frac t1/t0: 0.924 Entries selected: 90668, 90793, frac s1/s0: 1.0 Fraction selected: 0.805, 0.872
mudst0 = uproot.open('data/ds-fix-cmake-build/st_physics_19114030_raw_4500023.MuDst.root')['MuDst']
mudst1 = uproot.open('data/ds-jc-fix-victor-2/st_physics_19114030_raw_4500023.MuDst.root')['MuDst']
ah = ptls.make_plots(mudst0, mudst1, observables, selection, layout, config)
Plot Number of Hits Entries total: 112654, 107610, frac t1/t0: 0.955 Entries selected: 90668, 90754, frac s1/s0: 1.0 Fraction selected: 0.805, 0.843
Plot Transverse Momentum Entries total: 112654, 107610, frac t1/t0: 0.955 Entries selected: 90668, 90754, frac s1/s0: 1.0 Fraction selected: 0.805, 0.843
Plot Pseudorapidity Entries total: 112654, 107610, frac t1/t0: 0.955 Entries selected: 90668, 90754, frac s1/s0: 1.0 Fraction selected: 0.805, 0.843
Plot Chi-squared Entries total: 112654, 107610, frac t1/t0: 0.955 Entries selected: 90668, 90754, frac s1/s0: 1.0 Fraction selected: 0.805, 0.843
mudst0 = uproot.open('data/ds-fix-cmake-build/st_physics_19114030_raw_4500023.MuDst.root')['MuDst']
mudst1 = uproot.open('data/ds-jc-fix-victor-3/st_physics_19114030_raw_4500023.MuDst.root')['MuDst']
ah = ptls.make_plots(mudst0, mudst1, observables, selection, layout, config)
Plot Number of Hits Entries total: 112654, 116941, frac t1/t0: 1.04 Entries selected: 90668, 94343, frac s1/s0: 1.04 Fraction selected: 0.805, 0.807
Plot Transverse Momentum Entries total: 112654, 116941, frac t1/t0: 1.04 Entries selected: 90668, 94343, frac s1/s0: 1.04 Fraction selected: 0.805, 0.807
Plot Pseudorapidity Entries total: 112654, 116941, frac t1/t0: 1.04 Entries selected: 90668, 94343, frac s1/s0: 1.04 Fraction selected: 0.805, 0.807
Plot Chi-squared Entries total: 112654, 116941, frac t1/t0: 1.04 Entries selected: 90668, 94343, frac s1/s0: 1.04 Fraction selected: 0.805, 0.807
mudst0 = uproot.open('data/ds-jc-fix/st_physics_19114030_raw_4500023.MuDst.root')['MuDst']
mudst1 = uproot.open('data/ds-jc-fix-victor-3/st_physics_19114030_raw_4500023.MuDst.root')['MuDst']
ah = ptls.make_plots(mudst0, mudst1, observables, selection, layout, config)
Plot Number of Hits Entries total: 104072, 116941, frac t1/t0: 1.12 Entries selected: 90793, 94343, frac s1/s0: 1.04 Fraction selected: 0.872, 0.807
Plot Transverse Momentum Entries total: 104072, 116941, frac t1/t0: 1.12 Entries selected: 90793, 94343, frac s1/s0: 1.04 Fraction selected: 0.872, 0.807
Plot Pseudorapidity Entries total: 104072, 116941, frac t1/t0: 1.12 Entries selected: 90793, 94343, frac s1/s0: 1.04 Fraction selected: 0.872, 0.807
Plot Chi-squared Entries total: 104072, 116941, frac t1/t0: 1.12 Entries selected: 90793, 94343, frac s1/s0: 1.04 Fraction selected: 0.872, 0.807
mudst0 = uproot.open('data/ds-fix-cmake-build/rcf15000_1_100evts.MuDst.root')['MuDst']
mudst1 = uproot.open('data/ds-jc-fix/rcf15000_1_100evts.MuDst.root')['MuDst']
ah = ptls.make_plots(mudst0, mudst1, observables, selection, layout, config, 'run_14_simu_baseline_vs_ds-jc-fix', trace_names)
all_hists.update(ah)
Plot Number of Hits Entries total: 64583, 63966, frac t1/t0: 0.99 Entries selected: 44736, 46678, frac s1/s0: 1.04 Fraction selected: 0.693, 0.73
Plot Transverse Momentum Entries total: 64583, 63966, frac t1/t0: 0.99 Entries selected: 44736, 46678, frac s1/s0: 1.04 Fraction selected: 0.693, 0.73
Plot Pseudorapidity Entries total: 64583, 63966, frac t1/t0: 0.99 Entries selected: 44736, 46678, frac s1/s0: 1.04 Fraction selected: 0.693, 0.73
Plot Chi-squared Entries total: 64583, 63966, frac t1/t0: 0.99 Entries selected: 44736, 46678, frac s1/s0: 1.04 Fraction selected: 0.693, 0.73
mudst0 = uproot.open('data/ds-fix-cmake-build/rcf15000_1_100evts.MuDst.root')['MuDst']
mudst1 = uproot.open('data/ds-jc-fix-cutele/rcf15000_1_100evts.MuDst.root')['MuDst']
ah = ptls.make_plots(mudst0, mudst1, observables, selection, layout, config)
Plot Number of Hits Entries total: 64583, 63519, frac t1/t0: 0.984 Entries selected: 44736, 45860, frac s1/s0: 1.03 Fraction selected: 0.693, 0.722
Plot Transverse Momentum Entries total: 64583, 63519, frac t1/t0: 0.984 Entries selected: 44736, 45860, frac s1/s0: 1.03 Fraction selected: 0.693, 0.722
Plot Pseudorapidity Entries total: 64583, 63519, frac t1/t0: 0.984 Entries selected: 44736, 45860, frac s1/s0: 1.03 Fraction selected: 0.693, 0.722
Plot Chi-squared Entries total: 64583, 63519, frac t1/t0: 0.984 Entries selected: 44736, 45860, frac s1/s0: 1.03 Fraction selected: 0.693, 0.722
mudst0 = uproot.open('data/ds-fix-cmake-build/rcf15000_1_100evts.MuDst.root')['MuDst']
mudst1 = uproot.open('data/ds-jc-fix-victor-2/rcf15000_1_100evts.MuDst.root')['MuDst']
ah = ptls.make_plots(mudst0, mudst1, observables, selection, layout, config, 'run_14_simu_baseline_vs_ds-jc-fix-victor-2', trace_names)
all_hists.update(ah)
Plot Number of Hits Entries total: 64583, 62204, frac t1/t0: 0.963 Entries selected: 44736, 47302, frac s1/s0: 1.06 Fraction selected: 0.693, 0.76
Plot Transverse Momentum Entries total: 64583, 62204, frac t1/t0: 0.963 Entries selected: 44736, 47302, frac s1/s0: 1.06 Fraction selected: 0.693, 0.76
Plot Pseudorapidity Entries total: 64583, 62204, frac t1/t0: 0.963 Entries selected: 44736, 47302, frac s1/s0: 1.06 Fraction selected: 0.693, 0.76
Plot Chi-squared Entries total: 64583, 62204, frac t1/t0: 0.963 Entries selected: 44736, 47302, frac s1/s0: 1.06 Fraction selected: 0.693, 0.76
mudst0 = uproot.open('data/ds-fix-cmake-build/rcf15000_1_100evts.MuDst.root')['MuDst']
mudst1 = uproot.open('data/ds-jc-fix-victor-3/rcf15000_1_100evts.MuDst.root')['MuDst']
ah = ptls.make_plots(mudst0, mudst1, observables, selection, layout, config, 'run_14_simu_baseline_vs_ds-jc-fix-victor-3', trace_names)
all_hists.update(ah)
Plot Number of Hits Entries total: 64583, 65042, frac t1/t0: 1.01 Entries selected: 44736, 47293, frac s1/s0: 1.06 Fraction selected: 0.693, 0.727
Plot Transverse Momentum Entries total: 64583, 65042, frac t1/t0: 1.01 Entries selected: 44736, 47293, frac s1/s0: 1.06 Fraction selected: 0.693, 0.727
Plot Pseudorapidity Entries total: 64583, 65042, frac t1/t0: 1.01 Entries selected: 44736, 47293, frac s1/s0: 1.06 Fraction selected: 0.693, 0.727
Plot Chi-squared Entries total: 64583, 65042, frac t1/t0: 1.01 Entries selected: 44736, 47293, frac s1/s0: 1.06 Fraction selected: 0.693, 0.727
mudst0 = uproot.open('data/ds-jc-fix/rcf15000_1_100evts.MuDst.root')['MuDst']
mudst1 = uproot.open('data/ds-jc-fix-victor-2/rcf15000_1_100evts.MuDst.root')['MuDst']
ah = ptls.make_plots(mudst0, mudst1, observables, selection, layout, config)
Plot Number of Hits Entries total: 63966, 62204, frac t1/t0: 0.972 Entries selected: 46678, 47302, frac s1/s0: 1.01 Fraction selected: 0.73, 0.76
Plot Transverse Momentum Entries total: 63966, 62204, frac t1/t0: 0.972 Entries selected: 46678, 47302, frac s1/s0: 1.01 Fraction selected: 0.73, 0.76
Plot Pseudorapidity Entries total: 63966, 62204, frac t1/t0: 0.972 Entries selected: 46678, 47302, frac s1/s0: 1.01 Fraction selected: 0.73, 0.76
Plot Chi-squared Entries total: 63966, 62204, frac t1/t0: 0.972 Entries selected: 46678, 47302, frac s1/s0: 1.01 Fraction selected: 0.73, 0.76
mudst0 = uproot.open('data/ds-jc-fix/rcf15000_1_100evts.MuDst.root')['MuDst']
mudst1 = uproot.open('data/ds-jc-fix-victor-3/rcf15000_1_100evts.MuDst.root')['MuDst']
ah = ptls.make_plots(mudst0, mudst1, observables, selection, layout, config)
Plot Number of Hits Entries total: 63966, 65042, frac t1/t0: 1.02 Entries selected: 46678, 47293, frac s1/s0: 1.01 Fraction selected: 0.73, 0.727
Plot Transverse Momentum Entries total: 63966, 65042, frac t1/t0: 1.02 Entries selected: 46678, 47293, frac s1/s0: 1.01 Fraction selected: 0.73, 0.727
Plot Pseudorapidity Entries total: 63966, 65042, frac t1/t0: 1.02 Entries selected: 46678, 47293, frac s1/s0: 1.01 Fraction selected: 0.73, 0.727
Plot Chi-squared Entries total: 63966, 65042, frac t1/t0: 1.02 Entries selected: 46678, 47293, frac s1/s0: 1.01 Fraction selected: 0.73, 0.727
mudst0 = uproot.open('data/ds-jc-fix/rcf15000_1_100evts.MuDst.root')['MuDst']
mudst1 = uproot.open('data/ds-jc-fix-3/rcf15000_1_100evts.MuDst.root')['MuDst']
ah = ptls.make_plots(mudst0, mudst1, observables, selection, layout, config)
Plot Number of Hits Entries total: 63966, 65032, frac t1/t0: 1.02 Entries selected: 46678, 47254, frac s1/s0: 1.01 Fraction selected: 0.73, 0.727
Plot Transverse Momentum Entries total: 63966, 65032, frac t1/t0: 1.02 Entries selected: 46678, 47254, frac s1/s0: 1.01 Fraction selected: 0.73, 0.727
Plot Pseudorapidity Entries total: 63966, 65032, frac t1/t0: 1.02 Entries selected: 46678, 47254, frac s1/s0: 1.01 Fraction selected: 0.73, 0.727
Plot Chi-squared Entries total: 63966, 65032, frac t1/t0: 1.02 Entries selected: 46678, 47254, frac s1/s0: 1.01 Fraction selected: 0.73, 0.727
mudst0 = uproot.open('data/ds-jc-fix-3/rcf15000_1_100evts.MuDst.root')['MuDst']
mudst1 = uproot.open('data/ds-jc-fix-victor-3/rcf15000_1_100evts.MuDst.root')['MuDst']
ah = ptls.make_plots(mudst0, mudst1, observables, selection, layout, config)
Plot Number of Hits Entries total: 65032, 65042, frac t1/t0: 1.0 Entries selected: 47254, 47293, frac s1/s0: 1.0 Fraction selected: 0.727, 0.727
Plot Transverse Momentum Entries total: 65032, 65042, frac t1/t0: 1.0 Entries selected: 47254, 47293, frac s1/s0: 1.0 Fraction selected: 0.727, 0.727
Plot Pseudorapidity Entries total: 65032, 65042, frac t1/t0: 1.0 Entries selected: 47254, 47293, frac s1/s0: 1.0 Fraction selected: 0.727, 0.727
Plot Chi-squared Entries total: 65032, 65042, frac t1/t0: 1.0 Entries selected: 47254, 47293, frac s1/s0: 1.0 Fraction selected: 0.727, 0.727
for var_name, var_props in observables.items():
t0 = all_hists[f'run_14_data_baseline_vs_ds-jc-fix_{var_name}_hR']
t1 = all_hists[f'run_14_simu_baseline_vs_ds-jc-fix_{var_name}_hR']
layout = dict(
yaxis=dict(range=[0.7, 1.3]),
xaxis=dict(title=var_props['xaxis_title']),
width=1000, height=400
)
fig = dict(data=[t0, t1], layout=layout)
ofl.iplot(fig, config=config)
for var_name, var_props in observables.items():
t0 = all_hists[f'run_14_data_baseline_vs_ds-jc-fix-victor-2_{var_name}_hR']
t1 = all_hists[f'run_14_simu_baseline_vs_ds-jc-fix-victor-2_{var_name}_hR']
layout = dict(
yaxis=dict(range=[0.7, 1.3]),
xaxis=dict(title=var_props['xaxis_title']),
width=1000, height=400
)
fig = dict(data=[t0, t1], layout=layout)
ofl.iplot(fig, config=config)
for var_name, var_props in observables.items():
t0 = all_hists[f'run_14_data_baseline_vs_ds-jc-fix-victor-3_{var_name}_hR']
t1 = all_hists[f'run_14_simu_baseline_vs_ds-jc-fix-victor-3_{var_name}_hR']
layout = dict(
yaxis=dict(range=[0.7, 1.3]),
xaxis=dict(title=var_props['xaxis_title']),
width=1000, height=400
)
fig = dict(data=[t0, t1], layout=layout)
ofl.iplot(fig, config=config)
for var_name, var_props in observables.items():
t0 = all_hists[f'run_14_data_baseline_vs_ds-jc-fix_{var_name}_h0']
t0.name = 'Data'
t1 = all_hists[f'run_14_simu_baseline_vs_ds-jc-fix_{var_name}_h0']
t1.name = 'Simu'
t0.y = t0.y / t0.y.sum()
t1.y = t1.y / t1.y.sum()
#layout = dict(
# xaxis=dict(title=var_props['xaxis_title'])
#)
layout = {
'xaxis': {'showgrid': True, 'gridcolor': '#ccc', 'gridwidth': 1, 'automargin': True, 'title': f'{var_props["xaxis_title"]}'},
'yaxis1': {'showgrid': True, 'gridcolor': '#ccc', 'gridwidth': 1, 'title': 'Events Normalized', 'automargin': True},
'barmode': 'overlay',
'legend': {'orientation': 'h', 'y': 1.06},
'margin': {'l': 50, 'r': 15, 'b': 40, 't': 5, 'pad': 5},
'width': 900,
'height': 500,
}
fig = dict(data=[t0, t1], layout=layout)
ofl.iplot(fig, config=config)
ptls.write_html(fig, 'graphics/run_14_data_vs_simu_baseline/', var_name, config=config, include_plotlyjs=ptls.include_plotlyjs)