print("Opening {0:s} as output.".format(outFileName))
outTuple = outTuple.outTuple(outFileName)

channel = args.channel
goodEventCounter = 0
tStart = time.time()
for count, entry in enumerate(inTree):
    cutCounter.count('All')
    if count % 1000 == 0: print("Count={0:d}".format(count))
    if count > nMax: break

    if channel == 'tt':
        tauList = tauFun.getTauList(channel, entry)
        if len(tauList) < 2: continue
        cutCounter.count('TwoTaus')
        bestTauPair = tauFun.getBestTauPair(channel, entry, tauList)
    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':
Exemplo n.º 2
0
        LepP, LepM = pairList[0], pairList[1]
        M = (LepM + LepP).M()
        if M < 60. or M > 120.: continue
        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: