Пример #1
0
    category = 'monovtight_' + str(year)
    filler = {"year": year, "category": category}
    fitdiag_file = 'diagnostics/fitDiagnostics_nominal_{category}.root'.format(
        **filler)
    diffnuis_file = 'diagnostics/diffnuisances_nominal_{category}.root'.format(
        **filler)

    outdir = './plots/{year}/'.format(**filler)
    for region in regions:
        plotPreFitPostFit(region, category, ws_file, fitdiag_file, outdir,
                          lumi[year], year)
    for proc in procs:
        plot_ratio(proc, category, model_file, outdir, lumi[year], year)

    # Flavor integrated
    dataValidation("combined", "gjets", category, ws_file, fitdiag_file,
                   outdir, lumi[year], year)
    dataValidation("combinedW", "gjets", category, ws_file, fitdiag_file,
                   outdir, lumi[year], year)
    dataValidation("combined", "combinedW", category, ws_file, fitdiag_file,
                   outdir, lumi[year], year)
    # Split by flavor
    dataValidation("dimuon", "singlemuon", category, ws_file, fitdiag_file,
                   outdir, lumi[year], year)
    dataValidation("dielectron", "singleelectron", category, ws_file,
                   fitdiag_file, outdir, lumi[year], year)
    dataValidation("singleelectron", "gjets", category, ws_file, fitdiag_file,
                   outdir, lumi[year], year)
    dataValidation("singlemuon", "gjets", category, ws_file, fitdiag_file,
                   outdir, lumi[year], year)
    dataValidation("dielectron", "gjets", category, ws_file, fitdiag_file,
                   outdir, lumi[year], year)
Пример #2
0
def monov_plot_channels_separately():
    ### Years fit separately
    for year in [2017, 2018]:
        for wp in 'loose', 'tight':
            model_file = "root/combined_model_monov_nominal_{WP}.root".format(
                WP=wp)
            ws_file = "root/ws_monov_nominal_{WP}.root".format(WP=wp)
            category = 'monov{WP}_{YEAR}'.format(WP=wp, YEAR=year)
            filler = {"WP": wp, "year": year, "category": category}
            fitdiag_file = 'diagnostics/fitDiagnostics_nominal_{category}.root'.format(
                **filler)
            diffnuis_file = 'diagnostics/diffnuisances_nominal_{category}.root'.format(
                **filler)

            outdir = './plots/{WP}_{year}/'.format(**filler)
            for region in regions:
                plotPreFitPostFit(region, category, ws_file, fitdiag_file,
                                  outdir, lumi[year], year)
            for proc in procs:
                plot_ratio(proc, category, model_file, outdir, lumi[year],
                           year)

            # Flavor integrated
            dataValidation("combined", "gjets", category, ws_file,
                           fitdiag_file, outdir, lumi[year], year)
            dataValidation("combinedW", "gjets", category, ws_file,
                           fitdiag_file, outdir, lumi[year], year)
            dataValidation("combined", "combinedW", category, ws_file,
                           fitdiag_file, outdir, lumi[year], year)
            # Split by flavor
            dataValidation("dimuon", "singlemuon", category, ws_file,
                           fitdiag_file, outdir, lumi[year], year)
            dataValidation("dielectron", "singleelectron", category, ws_file,
                           fitdiag_file, outdir, lumi[year], year)
            dataValidation("singleelectron", "gjets", category, ws_file,
                           fitdiag_file, outdir, lumi[year], year)
            dataValidation("singlemuon", "gjets", category, ws_file,
                           fitdiag_file, outdir, lumi[year], year)
            dataValidation("dielectron", "gjets", category, ws_file,
                           fitdiag_file, outdir, lumi[year], year)
            dataValidation("dimuon", "gjets", category, ws_file, fitdiag_file,
                           outdir, lumi[year], year)