コード例 #1
0
def factor_QCD_nonIsoToIso():
    # iso
    fssign, fosign, fssQCD, fosQCD = makePlotInclusive(
        options.hist,
        anaDir,
        selComps,
        weights,
        fwss,
        fwos,
        NBINS,
        XMIN,
        XMAX,
        cat_Inc + ' && mt<40 && ' + cat_VBF_Rel,
        weight=weight,
        embed=options.embed)

    # non iso
    fssignni, fosignni, fssQCDni, fosQCDni = makePlotInclusive(
        options.hist,
        anaDir,
        selComps,
        weights,
        fwss,
        fwos,
        NBINS,
        XMIN,
        XMAX,
        cat_Inc_RlxMuIso + ' && mt<40 && ' + cat_VBF_Rel,
        weight=weight,
        embed=options.embed)

    # import pdb; pdb.set_trace()

    factor = fssQCD.Hist('QCD').Integral() / fssQCDni.Hist('QCD').Integral()
    return factor
コード例 #2
0
def factor_QCD_nonIsoToIso():
    # iso
    fssign, fosign, fssQCD, fosQCD = makePlotInclusive( options.hist, anaDir, selComps, weights, fwss, fwos, NBINS, XMIN, XMAX, cat_Inc + ' && mt<40 && ' + cat_VBF_Rel, weight=weight, embed=options.embed)

    # non iso
    fssignni, fosignni, fssQCDni, fosQCDni = makePlotInclusive( options.hist, anaDir, selComps, weights, fwss, fwos, NBINS, XMIN, XMAX, cat_Inc_RlxMuIso + ' && mt<40 && ' + cat_VBF_Rel, weight=weight, embed=options.embed)

    # import pdb; pdb.set_trace()

    factor = fssQCD.Hist('QCD').Integral() / fssQCDni.Hist('QCD').Integral()
    return factor
    # normalizing WJets (not WJets11 here) 
    # inclusive, iso sideband, SS
    inc_w_cut = cat_Inc
    inc_fwss, inc_fwos, inc_w_ss, inc_w_os = plot_W( anaDir, selComps, weights,
                                                     12, 70, 310, inc_w_cut,
                                                     weight=weight, embed=options.embed)

    # inclusive QCD yield in signal region
    # this yield will be multiplied by the VBF efficiency
    # import pdb; pdb.set_trace()
    insig_qcd_cut = '&&'.join([cat_Inc, options.cut])
    inc_ssign, inc_osign, inc_ssQCD, inc_osQCD = makePlotInclusive(
        options.hist, anaDir,
        selComps, weights,
        inc_fwss, inc_fwos,
        NBINS, XMIN, XMAX, insig_qcd_cut,
        weight=weight, embed=options.embed
        )

    incsig_qcd_yield = inc_osQCD.Hist('QCD').Integral()


    if vbf_eff is None:
        # computing VBF efficiency, in anti-isolated region ==================

        # QCD, Inclusive, SS, anti-isolation, for QCD efficiency
        inc_qcd_cut = '&&'.join([cat_Inc_AntiMuTauIsoJosh, options.cut])
        inc_qcd_ssign, inc_qcd_osign, inc_qcd_ssQCD, inc_qcd_osQCD = makePlotInclusive(
            options.hist, anaDir,
            selComps, weights,
コード例 #4
0
    inc_fwss, inc_fwos, inc_w_mt_ratio_ss, inc_w_mt_ratio_os, inc_w_mt_ratio = handleW(
        anaDir, selComps, weights, cat_Inc, weight, options.embed, cfg.VVgroup)

    # inclusive QCD yield in signal region
    # this yield will be multiplied by the VBF efficiency
    insig_qcd_cut = '&&'.join([cat_Inc, options.cut])
    inc_ssign, inc_osign, inc_ssQCD, inc_osQCD = makePlotInclusive(
        options.hist,
        anaDir,
        selComps,
        weights,
        inc_fwss,
        inc_fwos,
        inc_w_mt_ratio_ss,
        inc_w_mt_ratio_os,
        inc_w_mt_ratio,
        NBINS,
        XMIN,
        XMAX,
        insig_qcd_cut,
        weight=weight,
        embed=options.embed,
        VVgroup=cfg.VVgroup)

    incsig_qcd_yield = inc_osQCD.Hist('QCD').Integral()
    incsig_zl_yield = inc_osQCD.Hist('Ztt_ZL').Integral()
    incsig_zj_yield = inc_osQCD.Hist('Ztt_ZJ').Integral()

    print 'Inclusive QCD yield =', incsig_qcd_yield
    print 'Inclusive ZL  yield =', incsig_zl_yield
コード例 #5
0
                                                    310,
                                                    inc_w_cut,
                                                    weight=weight,
                                                    embed=options.embed)

    # inclusive QCD yield in signal region
    # this yield will be multiplied by the VBF efficiency
    # import pdb; pdb.set_trace()
    insig_qcd_cut = '&&'.join([cat_Inc, options.cut])
    inc_ssign, inc_osign, inc_ssQCD, inc_osQCD = makePlotInclusive(
        options.hist,
        anaDir,
        selComps,
        weights,
        inc_fwss,
        inc_fwos,
        NBINS,
        XMIN,
        XMAX,
        insig_qcd_cut,
        weight=weight,
        embed=options.embed)

    incsig_qcd_yield = inc_osQCD.Hist('QCD').Integral()

    if vbf_eff is None:
        # computing VBF efficiency, in anti-isolated region ==================

        # QCD, Inclusive, SS, anti-isolation, for QCD efficiency
        inc_qcd_cut = '&&'.join([cat_Inc_AntiMuTauIsoJosh, options.cut])
        inc_qcd_ssign, inc_qcd_osign, inc_qcd_ssQCD, inc_qcd_osQCD = makePlotInclusive(
コード例 #6
0
    
    selComps, weights, zComps = prepareComponents(anaDir, cfg.config, None, options.embed, 'TauMu', options.higgs)

    inc_fwss, inc_fwos, inc_w_mt_ratio_ss, inc_w_mt_ratio_os, inc_w_mt_ratio = handleW(
        anaDir, selComps, weights,
        cat_Inc, weight, options.embed, cfg.VVgroup
        )


    # inclusive QCD yield in signal region
    # this yield will be multiplied by the VBF efficiency
    insig_qcd_cut = '&&'.join([cat_Inc, options.cut])
    inc_ssign, inc_osign, inc_ssQCD, inc_osQCD = makePlotInclusive(
        options.hist, anaDir,
        selComps, weights,
        inc_fwss, inc_fwos, inc_w_mt_ratio_ss, inc_w_mt_ratio_os, inc_w_mt_ratio,
        NBINS, XMIN, XMAX, insig_qcd_cut,
        weight=weight, embed=options.embed, VVgroup=cfg.VVgroup
        )

    incsig_qcd_yield = inc_osQCD.Hist('QCD').Integral()
    incsig_zl_yield = inc_osQCD.Hist('Ztt_ZL').Integral()
    incsig_zj_yield = inc_osQCD.Hist('Ztt_ZJ').Integral()

    print 'Inclusive QCD yield =', incsig_qcd_yield
    print 'Inclusive ZL  yield =', incsig_zl_yield
    print 'Inclusive ZJ  yield =', incsig_zj_yield

    dataComps = dict( (comp.name, comp) for comp in selComps.values() if comp.isData )
    
    embComps = dict( (comp.name, comp) for comp in selComps.values() if comp.isEmbed )