Ejemplo n.º 1
0
import os
os.system('mkdir -p ' + outdir)
outdir += '/'

dir = '/eos/cms/store/cmst3/group/dehep/DeepJet/Predictions/Jan/DF_FT_fullRec_reg_BN/qcd_170_300/'
selectiontree = dir + 'selectiontree.txt'
predictiontree = dir + 'tree_association.txt'

makeROCs_async(
    intextfile=[predictiontree, selectiontree],
    name_list=['DeepFlavour', 'Q/G LH'],
    probabilities_list=['0.prob_isUDS/(0.prob_isG+0.prob_isUDS)', 'jet_qgl'],
    truths_list='isUD+isS',
    vetos_list='isG',
    colors_list='auto',
    outpdffile=outdir + "qcd_170_300.pdf",
    cuts=2 * ['jet_pt>150'] + 2 * ['jet_pt>150 && keep && jet_no<3'],
    cmsstyle=True,
    firstcomment='QCD events, #hat{p}_{T} = 170-300 GeV',
    extralegend=['solid?all', 'dashed?selected'],
    secondcomment='jet p_{T} > 150 GeV',
    logY=False)

dir = '/eos/cms/store/cmst3/group/dehep/DeepJet/Predictions/Jan/DF_FT_fullRec_reg_BN/qcd_80_120/'
selectiontree = dir + 'selectiontree.txt'
predictiontree = dir + 'tree_association.txt'

makeROCs_async(
    intextfile=[predictiontree, selectiontree],
    name_list=['DeepFlavour', 'Q/G LH'],
    probabilities_list=['0.prob_isUDS/(0.prob_isG+0.prob_isUDS)', 'jet_qgl'],
Ejemplo n.º 2
0
#               extralegend+None, 
#               logY=True)




for ptcut in ['30','150']:
    
    makeROCs_async(intextfile=filesttbar, 
               name_list=legend, 
               probabilities_list=bprob, 
               truths_list=btruth, 
               vetos_list=len(legend)*['isUD+isS+isG']+len(legend)*['isC'], 
               colors_list='auto', 
               outpdffile=outdir+"btag_pt"+ptcut+".pdf", 
               cuts='jet_pt>'+ptcut, 
               cmsstyle=True, 
               firstcomment='t#bar{t} events', 
               secondcomment='jet p_{T} > '+ptcut+' GeV', 
               extralegend=None, 
               logY=True,
               individual=True
               )

    makeROCs_async(intextfile=filesttbar, 
               name_list=legend, 
               probabilities_list=cprob, 
               truths_list=ctruth, 
               vetos_list=len(legend)*['isUD+isS+isG']+len(legend)*[btruth], 
               colors_list='auto', 
               outpdffile=outdir+"ctag_pt"+ptcut+".pdf", 
btruth='isB+isBB+isLeptonicB+isLeptonicB_C'

# b vs (udsg or c) [ttbar]

makeROCs_async( ['/eos/cms/store/cmst3/group/dehep/DeepJet/Anna_DeepCSV/ttbar_CFR_PRED/tree_association.txt',
                 '/eos/cms/store/cmst3/group/dehep/DeepJet/Predictions/Jan/DF_FT_fullRec_reg_BN/ttbar/tree_association.txt'],
                ['DeepCSV',
                 'DeepFlavour'],
                ['prob_isC/(prob_isC + prob_isUDSG)',
                 'prob_isC/(prob_isC + prob_isUDS + prob_isG)'],
                ['isC',
                 'isC'],
                ['isUD + isS + isG',
                 'isUD + isS + isG'],
                ['blue',
                 'purple'],
                 "ROC_C_ttbar_binary.pdf",
                 'jet_pt>30 && jet_eta>0',
                 True,
                 'ttbar events',
#                 "#splitline{150 < jet p_{T} < 300  [GeV]}{jet |#eta| < 2.4}",
                 "jet p_{T} > 30 GeV",
                 '',
                 [],
                 True,
                 True,
                 "C efficiency"
                 )


makeROCs_async( ['/eos/cms/store/cmst3/group/dehep/DeepJet/Anna_DeepCSV/ttbar_CFR_PRED/tree_association.txt',
                 '/eos/cms/store/cmst3/group/dehep/DeepJet/Predictions/Jan/DF_FT_fullRec_reg_BN/ttbar/tree_association.txt'],
Ejemplo n.º 4
0
bbtruth = 'isBB'
bleptruth = 'isLeptonicB+isLeptonicB_C'

# high PT
makeROCs_async(
    [
        '/eos/cms/store/cmst3/group/dehep/DeepJet/Anna_DeepCSV/qcd_merged_CFR_PRED/tree_association.txt',
        '/eos/cms/store/cmst3/group/dehep/DeepJet/Predictions/Jan/DF_FT_fullRec_reg_BN/qcd_merged_PREDICTED/tree_association.txt'
    ],
    ['DeepCSV', 'DeepFlavour'],
    [
        'prob_isB + prob_isBB', 'prob_isB + prob_isBB + prob_isLeptB',
        'prob_isB + prob_isBB', 'prob_isB + prob_isBB + prob_isLeptB'
    ],
    [btruth, btruth, btruth, btruth],
    ['isUD + isS + isG', 'isUD + isS + isG', 'isC', 'isC'],
    ['blue', 'purple', 'blue,dashed', 'purple,dashed'],
    "ROC_qcd_600_1000.pdf",
    'jet_pt>600 && jet_pt<1000 && jet_eta>0',
    True,
    'QCD events',
    "600 < jet p_{T} < 1000 [GeV], jet |#eta| < 2.4",
    #                 "30 < jet p_{T} < 50 GeV}",
    '',
    ['solid?L', 'dashed?C'],
    True,
    True,
    "B efficiency")

# high PT
makeROCs_async(
    [
Ejemplo n.º 5
0
#               cmsstyle,
#               firstcomment,
#               secondcomment,
#               extralegend+None,
#               logY=True)

for ptcut in ['30', '150']:

    makeROCs_async(intextfile=treeassos,
                   name_list=legend,
                   probabilities_list=bprob,
                   truths_list=btruth,
                   vetos_list=len(legend) * ['isUD+isS+isG'] +
                   len(legend) * ['isC'],
                   colors_list='auto',
                   outpdffile=outdir + "btag_pt" + ptcut + ".pdf",
                   cuts='jet_pt>' + ptcut,
                   cmsstyle=True,
                   firstcomment='realistic t#bar{t} hadronic',
                   secondcomment='jet p_{T} > ' + ptcut + ' GeV',
                   extralegend=None,
                   logY=True,
                   individual=True)

    makeROCs_async(intextfile=treeassos,
                   name_list=legend,
                   probabilities_list=cprob,
                   truths_list=ctruth,
                   vetos_list=len(legend) * ['isUD+isS+isG'] +
                   len(legend) * [btruth],
                   colors_list='auto',
Ejemplo n.º 6
0
    '0.prob_isUDS/(0.prob_isUDS + 0.prob_isG)',
    '1.prob_isUDS/(1.prob_isUDS + 1.prob_isG)',
    '2.prob_isUDS/(2.prob_isUDS + 2.prob_isG)'
]

forward = '((jet_eta>-2.4 && jet_eta<-1.3) || (jet_eta>1.3 && jet_eta<2.4))'
central = '(jet_eta>-1.3 && jet_eta<1.3)'

makeROCs_async(intextfile=files30_50,
               name_list=legend,
               probabilities_list=probs,
               truths_list='isUD + isS',
               vetos_list='isG',
               colors_list=colors,
               outpdffile=outdir + "ROC_QG_DF_rec_conv_30_50_forward.pdf",
               cuts='jet_pt>30 &&' + forward,
               cmsstyle=True,
               firstcomment='QCD events, #hat{p}_{T} = 30-50 GeV',
               secondcomment="jet p_{T} > 30 GeV, 1.3 < jet |#eta| < 2.4",
               invalidlist='',
               extralegend=[],
               logY=False,
               individual=False,
               xaxis="light quark efficiency")

makeROCs_async(intextfile=files30_50,
               name_list=legend,
               probabilities_list=probs,
               truths_list='isUD + isS',
               vetos_list='isG',
               colors_list=colors,
               outpdffile=outdir + "ROC_QG_DF_rec_conv_30_50_central.pdf",