def findOSSFQuads(self, leptons, photons): '''Make combinatorics and make permulations of four leptons Cut the permutations by asking Z1 nearest to Z and also that plus is the first Include FSR if in cfg file ''' out = [] for l1, l2, l3, l4 in itertools.permutations(leptons, 4): if (l1.pdgId() + l2.pdgId()) != 0: continue if (l3.pdgId() + l4.pdgId()) != 0: continue if (l1.pdgId() < l2.pdgId()) != 0: continue if (l3.pdgId() < l4.pdgId()) != 0: continue quadObject = DiObjectPair(l1, l2, l3, l4) self.attachFSR(quadObject, photons) if abs(quadObject.leg1.M() - 91.118) > abs(quadObject.leg2.M() - 91.118): continue out.append(quadObject) return out
def findOSSFQuads(self, leptons): '''Make combinatorics and make permulations of four leptons Cut the permutations by asking Z1 nearest to Z and also that plus is the first ''' out = [] for l1, l2, l3, l4 in itertools.permutations(leptons, 4): if (l1.pdgId() + l2.pdgId()) != 0: continue if (l3.pdgId() + l4.pdgId()) != 0: continue if (l1.pdgId() < l2.pdgId()) != 0: continue if (l3.pdgId() < l4.pdgId()) != 0: continue quadObject = DiObjectPair(l1, l2, l3, l4) if not self.zSorting(quadObject.leg1, quadObject.leg2): continue out.append(quadObject) return out