<jupyter_start><jupyter_text>Loss shape<jupyter_code>plt.hist(bb_bkgloss,bins=np.arange(0,10,0.01));
plt.hist(bb_sigloss,bins=np.arange(0,10,0.01));<jupyter_output><empty_output><jupyter_text>Determine the cuts and plot the mass<jupyter_code>bins = np.arange(2800,8000,200)
bbidx = np.where( (bb_bkgloss > 5.8) & (bb_sigloss<8))[0]
obs_hist = plt.hist(bb_mass[bbidx], bins = bins);

bkgidx = np.where( (qcd_bkgloss > 5.8) & (qcd_sigloss<8))[0]
bkg_hist = plt.hist(qcd_mass[bkgidx], bins = bins,color='orange');

plt.axvline(x=3823,color='r')<jupyter_output><empty_output><jupyter_text>Export to ROOT<jupyter_code>import ROOT as r
from array import array

lFile = r.TFile("signal.root","RECREATE") 
lTree = r.TTree("output","output")
mass  =  array('f', [ 1.5 ])
lTree.Branch('mass', mass, 'mass/F')

for i0 in range(len(bb_mass)):
    mass=bb_mass[i0]
    lTree.Fill()

lTree.Write()
lFile.close()

import ROOT as r<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17883597883597885, 'fraction_numerical': 0.04126984126984127, 'mean_word_length': 7.155172413793103, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '40172', 'license': 'MIT', 'n_tokens_mistral': 452, 'n_tokens_neox': 421, 'n_words': 60, 'path': 'statistics/new/blackbox1_analysis.ipynb', 'repo_name': 'violatingcp/QUASAR', 'size': '945'}