Exemple #1
0
    elif channel == 'mt':
        bestTauPair = tauFun.getBestMuTauPair(entry,
                                              cat=channel,
                                              printOn=False)
        if len(bestTauPair) < 1:
            if args.unique == 'FSA_only' and entry.event in FSA_only:
                if True:
                    print("\n** FSA only event *** Count={0:d}".format(count))
                    print("bestTauPair={0:s}".format(str(bestTauPair)))
                    bestTauPair = tauFun.getBestMuTauPair(entry, printOn=False)
                    GF.printEvent(entry)
                    GF.printMC(entry)
                    maxPrint -= 1
            continue
    elif channel == 'et':
        bestTauPair = tauFun.getBestETauPair(entry, cat=channel, printOn=False)
        if len(bestTauPair) < 1:
            if args.unique == 'FSA_only' and entry.event in FSA_only:
                if True:
                    print("\n** FSA only event *** Count={0:d}".format(count))
                    print("bestTauPair = {0:s}".format(str(bestTauPair)))
                    best = tauFun.getBestETauPair(entry, printOn=False)
                    GF.printEvent(entry)
                    maxPrint -= 1
            continue

    if len(bestTauPair) < 1: continue
    cutCounter.count("TauPair")
    if bestTauPair[0] < 0: continue
    cutCounter.count("GoodTauPair")
 elif channel == 'mt':
     bestTauPair = tauFun.getBestMuTauPair(entry)
     if len(bestTauPair) < 1:
         if args.unique == 'FSA_only' and entry.event in FSA_only:
             if True:
                 print("\n** FSA only event *** Count={0:d}".format(count))
                 print("bestTauPair={0:s}".format(str(bestTauPair)))
                 bestTauPair = tauFun.getBestMuTauPair(entry, printOn=True)
                 GF.printEvent(entry)
                 GF.printMC(entry)
                 maxPrint -= 1
         continue
     #iMu = bestTauPair[0]
     #bestTauPair[0] = tauFun.getTauPointer(entry,entry.Muon_eta[iMu],entry.Muon_phi[iMu])
 elif channel == 'et':
     bestTauPair = tauFun.getBestETauPair(entry)
     if len(bestTauPair) < 1:
         if args.unique == 'FSA_only' and entry.event in FSA_only:
             if True:
                 print("\n** FSA only event *** Count={0:d}".format(count))
                 print("bestTauPair = {0:s}".format(str(bestTauPair)))
                 best = tauFun.getBestETauPair(entry, printOn=True)
                 GF.printEvent(entry)
                 maxPrint -= 1
         continue
     #iE = bestTauPair[0]
     #bestTauPair[0] = tauFun.getTauPointer(entry,entry.Electron_eta[iE],entry.Electron_phi[iE])
 if len(bestTauPair) < 1: continue
 cutCounter.count("TauPair")
 if bestTauPair[0] < 0: continue
 cutCounter.count("GoodTauPair")
Exemple #3
0
        if lepMode == 'ee':
            for cat in cats[:4]:
                cutCounter[cat].count('FoundZ')
        if lepMode == 'mm':
            for cat in cats[4:]:
                cutCounter[cat].count('FoundZ')

        for tauMode in ['et', 'mt', 'tt', 'em']:
            cat = lepMode + tauMode
            if tauMode == 'tt':
                tauList = tauFun.getTauList(cat, e, pairList=pairList)
                bestTauPair = tauFun.getBestTauPair(cat, e, tauList)

            elif tauMode == 'et':
                bestTauPair = tauFun.getBestETauPair(e,
                                                     cat=cat,
                                                     pairList=pairList)
            elif tauMode == 'mt':
                bestTauPair = tauFun.getBestMuTauPair(e,
                                                      cat=cat,
                                                      pairList=pairList)
            elif tauMode == 'em':
                bestTauPair = tauFun.getBestEMuTauPair(e,
                                                       cat=cat,
                                                       pairList=pairList)

            if len(bestTauPair) < 1:
                if False and maxPrint > 0 and (tauMode == GF.eventID(e)[2:4]):
                    maxPrint -= 1
                    print("Failed tau-pair cut")
                    print("Event ID={0:s} cat={1:s}".format(