Example #1
0
    cfg_example.cut = cuts[cut_name]
    cfg_example.vars = variables

    channel = "l#nujj"
    if cfg_example.cut.find("mu_"):
        channel = "#mu#nujj"
    elif cfg_example.cut.find("e_"):
        channel = "e#nujj"
    if cfg_example.cut.find("HP"):
        channel += " HP"
    elif cfg_example.cut.find("LP"):
        channel += " LP"

    plots = createHistograms(cfg_example, verbose=False)
    for variable in variables:
        plot = plots[variable.name]
        plot.Group('Diboson', ['WWTo1L1Nu2Q', 'WZTo1L1Nu2Q'])
        # plot.Group('TT_W', ['TTJets_W'])
        plot.Group('Top', ['TT_pow_ext3_W', 'TT_pow_ext3_nonW', 'TToLeptons_tch_powheg', 'TBarToLeptons_tch_powheg', 'TToLeptons_sch', 'TBar_tWch', 'T_tWch'])
        # plot.Group('W', ['WJetsToLNu_HT100to200', 'WJetsToLNu_HT200to400', 'WJetsToLNu_HT400to600', 'WJetsToLNu_HT600to800', 'WJetsToLNu_HT800to1200', 'WJetsToLNu_HT1200to2500', 'WJetsToLNu_HT2500toInf'])
        plot.Group('VJets', ['WJetsToLNu_HT100to200', 'WJetsToLNu_HT200to400', 'WJetsToLNu_HT400to600', 'WJetsToLNu_HT600to800', 'WJetsToLNu_HT800to1200', 'WJetsToLNu_HT1200to2500', 'WJetsToLNu_HT2500toInf', 'DYJetsToLL_M50_HT100to200', 'DYJetsToLL_M50_HT200to400', 'DYJetsToLL_M50_HT400to600', 'DYJetsToLL_M50_HT600toInf'])
        plot.Group('QCD', ['QCD_HT2000toInf', 'QCD_HT1500to2000', 'QCD_HT1000to1500', 'QCD_HT700to1000', 'QCD_HT500to700'])  # , 'QCD_HT300to500'
        # plot.Group('TT_nonW', ['TTJets_nonW'])
        # plot.Group('Single t', ['TToLeptons_tch_powheg', 'TBarToLeptons_tch_powheg', 'TToLeptons_sch', 'TBar_tWch', 'T_tWch'])
        # plot.Group('ZLL', ['DYJetsToLL_M50_HT100to200', 'DYJetsToLL_M50_HT200to400', 'DYJetsToLL_M50_HT400to600', 'DYJetsToLL_M50_HT600toInf'])
        plot.Group('data_obs', ['data_SingleMuon', 'data_SingleElectron', 'data_MET']) #, 'data_JetHT'
        #['WpWpJJ', 'ZGTo2LG', 'ZGJets', 'WGToLNuG', 'WGJets', 'WW', 'WWDouble', 'WWTo1L1Nu2Q', 'WWToLNuQQ_ext', 'WWToLNuQQ', 'WWTo2L2Nu', 'WZ', 'WZTo3LNu_amcatnlo', 'WZTo3LNu', 'WZTo2L2Q', 'WZTo1L1Nu2Q', 'WZTo1L3Nu', 'ZZ', 'VVTo2L2Nu', 'ZZTo4L', 'ZZTo2Q2Nu', 'ZZTo2L2Q', 'ZZTo2L2Nu'])
        HistDrawer.draw(plot, plot_dir='plots_lnujj/'+cut_name, channel=channel)

        # plot.WriteDataCard(filename='datacard_mm.root', dir='mm_' + cut_name)
Example #2
0
    plots = createHistograms(cfg_example, verbose=False)
    for variable in variables:
        plot = plots[variable.name]
        plot.Group('Diboson', ['WWTo1L1Nu2Q', 'WWTo1L1Nu2Q', 'WZTo1L1Nu2Q'])
        plot.Group('Top', [
            'TT_pow_W', 'TT_pow_nonW', 'TToLeptons_tch_powheg',
            'TBarToLeptons_tch_powheg', 'TToLeptons_sch', 'TBar_tWch', 'T_tWch'
        ])
        plot.Group('VJets', [
            'WJetsToLNu_HT100to200', 'WJetsToLNu_HT200to400',
            'WJetsToLNu_HT400to600', 'WJetsToLNu_HT600to800',
            'WJetsToLNu_HT800to1200', 'WJetsToLNu_HT1200to2500',
            'WJetsToLNu_HT2500toInf', 'DYJetsToLL_M50_HT100to200',
            'DYJetsToLL_M50_HT200to400', 'DYJetsToLL_M50_HT400to600',
            'DYJetsToLL_M50_HT600to800', 'DYJetsToLL_M50_HT800to1200',
            'DYJetsToLL_M50_HT1200to2500', 'DYJetsToLL_M50_HT2500toInf'
        ])
        plot.Group('QCD', [
            'QCD_HT2000toInf', 'QCD_HT1500to2000', 'QCD_HT1000to1500',
            'QCD_HT700to1000', 'QCD_HT500to700'
        ])  # , 'QCD_HT300to500'
        plot.Group('data_obs',
                   ['data_SingleMuon', 'data_SingleElectron', 'data_MET'
                    ])  #, 'data_JetHT'
        #['WpWpJJ', 'ZGTo2LG', 'ZGJets', 'WGToLNuG', 'WGJets', 'WW', 'WWDouble', 'WWTo1L1Nu2Q', 'WWToLNuQQ_ext', 'WWToLNuQQ', 'WWTo2L2Nu', 'WZ', 'WZTo3LNu_amcatnlo', 'WZTo3LNu', 'WZTo2L2Q', 'WZTo1L1Nu2Q', 'WZTo1L3Nu', 'ZZ', 'VVTo2L2Nu', 'ZZTo4L', 'ZZTo2Q2Nu', 'ZZTo2L2Q', 'ZZTo2L2Nu'])
        HistDrawer.draw(plot,
                        plot_dir='plots_lnujj_VJetsReweight/' + cut_name,
                        channel=channel)

        # plot.WriteDataCard(filename='datacard_mm.root', dir='mm_' + cut_name)
                               weight=total_weight)

    cfg_example.cut = cuts[cut_name]
    print cfg_example.cut
    cfg_example.vars = variables

    channel = ""
    # channel = "jj"
    # if cut_name.find("HP") >= 0:
    #     channel += " HP"
    # elif cut_name.find("LP") >= 0:
    #     channel += " LP"

    plots = createHistograms(cfg_example, verbose=False)
    for variable in variables:
        plot = plots[variable.name]
        # plot.Group('Diboson', ['WWTo1L1Nu2Q', 'WWTo1L1Nu2Q', 'WZTo1L1Nu2Q'])
        plot.Group('Top', ['TTHad_pow'])
        plot.Group('WJets', ['WJetsToQQ_HT800toInf'])
        plot.Group('ZJets', ['ZJetsToQQ_HT800toInf'])
        plot.Group('QCD', [
            'QCD_HT100to200', 'QCD_HT200to300', 'QCD_HT300to500',
            'QCD_HT500to700', 'QCD_HT700to1000', 'QCD_HT1000to1500',
            'QCD_HT1500to2000', 'QCD_HT2000toInf'
        ])
        plot.Group('data_obs', ['data_JetHT_Run2017F'])
        HistDrawer.draw(plot,
                        plot_dir='plots_jj_Run2017F/' + cut_name,
                        channel=channel)
        # plot.WriteDataCard(filename='datacard_mm.root', dir='mm_' + cut_name)
Example #4
0
#     VariableCfg(name='mvis', binning={'nbinsx':35, 'xmin':0, 'xmax':350}, unit='GeV', xtitle='m_{vis}')
# ]

for cut_name in cuts:

    cfg_example = HistogramCfg(name='example',
                               var=None,
                               cfgs=samples,
                               cut=inc_cut,
                               lumi=int_lumi,
                               weight=total_weight)

    cfg_example.cut = cuts[cut_name]

    cfg_example.vars = variables

    plots = createHistograms(cfg_example, verbose=True)
    for variable in variables:
        plot = plots[variable.name]
        plot.Group('QCD', [
            'QCD_HT2000toInf', 'QCD_HT1500to2000', 'QCD_HT1000to1500',
            'QCD_HT700to1000', 'QCD_HT500to700', 'QCD_HT300to500',
            'QCD_HT200to300'
        ])
        plot.Group('TT', ['TTJets'])
        # plot.Group('ZLL', ['ZL', 'ZJ'], style=plot.Hist('ZL').style)
        # plot.Group('Electroweak', ['W', 'VV'])
        HistDrawer.draw(plot, plot_dir='plots/' + cut_name, channel='VV')

        # plot.WriteDataCard(filename='datacard_mm.root', dir='mm_' + cut_name)
Example #5
0
    plots = createHistograms(cfg_example, verbose=False)
    for variable in variables:
        plot = plots[variable.name]
        plot.Group('Diboson', ['WWTo1L1Nu2Q', 'WWTo1L1Nu2Q', 'WZTo1L1Nu2Q'])
        plot.Group('Top', [
            'TT_pow_W', 'TT_pow_nonW', 'TToLeptons_tch_powheg',
            'TBarToLeptons_tch_powheg', 'TToLeptons_sch', 'TBar_tWch', 'T_tWch'
        ])
        plot.Group('VJets', [
            'WJetsToLNu_HT100to200', 'WJetsToLNu_HT200to400',
            'WJetsToLNu_HT400to600', 'WJetsToLNu_HT600to800',
            'WJetsToLNu_HT800to1200', 'WJetsToLNu_HT1200to2500',
            'WJetsToLNu_HT2500toInf', 'DYJetsToLL_M50_HT100to200',
            'DYJetsToLL_M50_HT200to400', 'DYJetsToLL_M50_HT400to600',
            'DYJetsToLL_M50_HT600to800', 'DYJetsToLL_M50_HT800to1200',
            'DYJetsToLL_M50_HT1200to2500', 'DYJetsToLL_M50_HT2500toInf'
        ])
        plot.Group('QCD', [
            'QCD_HT2000toInf', 'QCD_HT1500to2000', 'QCD_HT1000to1500',
            'QCD_HT700to1000', 'QCD_HT500to700'
        ])  # , 'QCD_HT300to500'
        plot.Group('data_obs',
                   ['data_SingleMuon', 'data_SingleElectron', 'data_MET'
                    ])  #, 'data_JetHT'
        #['WpWpJJ', 'ZGTo2LG', 'ZGJets', 'WGToLNuG', 'WGJets', 'WW', 'WWDouble', 'WWTo1L1Nu2Q', 'WWToLNuQQ_ext', 'WWToLNuQQ', 'WWTo2L2Nu', 'WZ', 'WZTo3LNu_amcatnlo', 'WZTo3LNu', 'WZTo2L2Q', 'WZTo1L1Nu2Q', 'WZTo1L3Nu', 'ZZ', 'VVTo2L2Nu', 'ZZTo4L', 'ZZTo2Q2Nu', 'ZZTo2L2Q', 'ZZTo2L2Nu'])
        HistDrawer.draw(plot,
                        plot_dir='plots_lnujj_vbf_withSignal/' + cut_name,
                        channel=channel)

        # plot.WriteDataCard(filename='datacard_mm.root', dir='mm_' + cut_name)
Example #6
0
    cfg_example = HistogramCfg(name='example',
                               var=None,
                               cfgs=samples,
                               cut='',
                               lumi=int_lumi,
                               weight=total_weight)

    cfg_example.cut = cuts[cut_name]
    cfg_example.vars = variables

    plots = createHistograms(cfg_example, verbose=False)
    for variable in variables:
        plot = plots[variable.name]
        # plot.Group('Diboson', ['WWTo1L1Nu2Q', 'WZTo1L1Nu2Q'])
        # plot.Group('TT_W', ['TTJets_W'])
        # plot.Group('W', ['WJetsToLNu_HT100to200', 'WJetsToLNu_HT200to400', 'WJetsToLNu_HT400to600', 'WJetsToLNu_HT600to800', 'WJetsToLNu_HT800to1200', 'WJetsToLNu_HT1200to2500', 'WJetsToLNu_HT2500toInf'])
        plot.Group('QCD', [
            'QCD_HT2000toInf', 'QCD_HT1500to2000', 'QCD_HT1000to1500',
            'QCD_HT700to1000', 'QCD_HT500to700', 'QCD_HT300to500'
        ])
        # plot.Group('TT_nonW', ['TTJets_nonW'])
        # plot.Group('Single t', ['TToLeptons_tch_powheg', 'TBarToLeptons_tch_powheg', 'TToLeptons_sch', 'TBar_tWch', 'T_tWch'])
        # plot.Group('ZLL', ['DYJetsToLL_M50_HT100to200', 'DYJetsToLL_M50_HT200to400', 'DYJetsToLL_M50_HT400to600', 'DYJetsToLL_M50_HT600toInf'])
        plot.Group('data_obs', ['data_JetHT'])  #, 'data_JetHT'
        #['WpWpJJ', 'ZGTo2LG', 'ZGJets', 'WGToLNuG', 'WGJets', 'WW', 'WWDouble', 'WWTo1L1Nu2Q', 'WWToLNuQQ_ext', 'WWToLNuQQ', 'WWTo2L2Nu', 'WZ', 'WZTo3LNu_amcatnlo', 'WZTo3LNu', 'WZTo2L2Q', 'WZTo1L1Nu2Q', 'WZTo1L3Nu', 'ZZ', 'VVTo2L2Nu', 'ZZTo4L', 'ZZTo2Q2Nu', 'ZZTo2L2Q', 'ZZTo2L2Nu'])
        HistDrawer.draw(plot,
                        plot_dir='plots_VV/' + cut_name,
                        channel='VV #rightarrow jj')

        # plot.WriteDataCard(filename='datacard_mm.root', dir='mm_' + cut_name)
                               lumi=int_lumi,
                               weight=total_weight)

    cfg_example.cut = cuts[cut_name]
    cfg_example.vars = variables

    plots = createHistograms(cfg_example, verbose=False)
    for variable in variables:
        plot = plots[variable.name]
        plot.Group('Diboson', ['WWTo1L1Nu2Q', 'WZTo1L1Nu2Q'])
        plot.Group('TT_W', ['TTJets_W'])
        plot.Group('W', [
            'WJetsToLNu_HT100to200', 'WJetsToLNu_HT200to400',
            'WJetsToLNu_HT400to600', 'WJetsToLNu_HT600to800',
            'WJetsToLNu_HT800to1200', 'WJetsToLNu_HT1200to2500',
            'WJetsToLNu_HT2500toInf'
        ])
        # plot.Group('QCD', ['QCD_HT2000toInf', 'QCD_HT1500to2000', 'QCD_HT1000to1500', 'QCD_HT700to1000', 'QCD_HT500to700'])  # , 'QCD_HT300to500'
        plot.Group('TT_nonW', ['TTJets_nonW'])
        # plot.Group('Single t', ['TToLeptons_tch_powheg', 'TBarToLeptons_tch_powheg', 'TToLeptons_sch', 'TBar_tWch', 'T_tWch'])
        # plot.Group('ZLL', ['DYJetsToLL_M50_HT100to200', 'DYJetsToLL_M50_HT200to400', 'DYJetsToLL_M50_HT400to600', 'DYJetsToLL_M50_HT600toInf'])
        plot.Group('data_obs',
                   ['data_SingleMuon', 'data_SingleElectron', 'data_MET'
                    ])  #, 'data_JetHT'
        #['WpWpJJ', 'ZGTo2LG', 'ZGJets', 'WGToLNuG', 'WGJets', 'WW', 'WWDouble', 'WWTo1L1Nu2Q', 'WWToLNuQQ_ext', 'WWToLNuQQ', 'WWTo2L2Nu', 'WZ', 'WZTo3LNu_amcatnlo', 'WZTo3LNu', 'WZTo2L2Q', 'WZTo1L1Nu2Q', 'WZTo1L3Nu', 'ZZ', 'VVTo2L2Nu', 'ZZTo4L', 'ZZTo2Q2Nu', 'ZZTo2L2Q', 'ZZTo2L2Nu'])
        HistDrawer.draw(plot,
                        plot_dir='plots/' + cut_name,
                        channel='WV #rightarrow l#nujj')

        # plot.WriteDataCard(filename='datacard_mm.root', dir='mm_' + cut_name)