Пример #1
0
for index, mode in enumerate(allModes):
    logger.info("Computing plots for mode %s", mode)

    yields[mode] = {}

    # always initialize with [], elso you get in trouble with pythons references!
    plots = []
    plots += plotList
    plots += [getYieldPlot(index)]

    # Define 2l selections
    leptonSelection = cutInterpreter.cutString(mode)

    if not args.noData:
        data_sample.setSelectionString(
            [getFilterCut(2016, isData=True), leptonSelection])
    for sample in mc + signals:
        sample.setSelectionString([
            getFilterCut(2016, isData=False), leptonSelection,
            tr.getSelection("MC")
        ])

    # Overlap removal
    if any(x.name == "TTG" for x in mc) and any(x.name == "TT_pow"
                                                for x in mc):
        eval('TTG_' + str(args.year)[-2:]).addSelectionString("isTTGamma==1")
        eval('TT_pow_' +
             str(args.year)[-2:]).addSelectionString("isTTGamma==0")

    if any(x.name == "ZG" for x in mc) and any(x.name == "DY_LO" for x in mc):
        eval('ZG_' + str(args.year)[-2:]).addSelectionString("isZWGamma==1")
Пример #2
0
# Loop over channels
#allModes = [ 'mumu', 'mue', 'ee', 'SF', 'all' ]
allModes = ['mue', 'SF']

print args.selection
yields = {}
for index, mode in enumerate(allModes):

    yields[mode] = {}
    # Define 2l selections
    leptonSelection = cutInterpreter.cutString(mode)

    if not args.noData:
        data_sample.setSelectionString(
            [getFilterCut(args.year, isData=True), leptonSelection])
    for sample in mc + signals:
        sample.setSelectionString([
            getFilterCut(args.year, isData=False), leptonSelection,
            tr.getSelection("MC")
        ])

    # Overlap removal
    TTGLep_16.addSelectionString("isTTGamma==1")
    #    TTG_16.addSelectionString(    "isTTGamma==1" )
    TT_pow_16.addSelectionString("isTTGamma==0")
    #    TTbar_16.addSelectionString(     "isTTGamma==0" )
    ZGTo2LG_16.addSelectionString("isZGamma==1")
    #    ZGToLLG_16.addSelectionString(   "isZGamma==1"  )
    DY_LO_16.addSelectionString("isZGamma==0")