# if len(allGoodLeptons) >=2 and ((mode=="highMET" and allGoodLeptons[0]["pt"]>20.) or (mode=="lowMET" and allGoodLeptons[1]["pt"]>20.))\ if len(leptonPair) >=2 and ((mode=="highMET" and leptonPair[0]["pt"]>20. and leptonPair[1]["pt"]>10.) or (mode=="lowMET" and leptonPair[1]["pt"]>20.)): l1 = leptonPair[0]; l2 = leptonPair[1]; s.nLep = len(allGoodLeptons["leptons"]) s.deltaRLL = deltaR(l1, l2) px1 = l1["pt"]*cos(l1["phi"]); px2 = l2["pt"]*cos(l2["phi"]) py1 = l1["pt"]*sin(l1["phi"]); py2 = l2["pt"]*sin(l2["phi"]) pz1 = l1["pt"]*sinh(l1["eta"]); pz2 = l2["pt"]*sinh(l2["eta"]) px = px1+px2 py = py1+py2 pz = pz1+pz2 s.ptZ = sqrt(px*px + py* py) p1 = sqrt(px1*px1+py1*py1+pz1*pz1) p2 = sqrt(px2*px2+py2*py2+pz2*pz2) p = sqrt(px*px+py*py+pz*pz) s.mLL = sqrt((p1 + p2)*(p1 + p2) - p*p) s.jzb = getVarValue(c, "mht") - s.ptZ s.pdg1 = l1["pdg"] s.pdg2 = l2["pdg"] s.phi1 = l1["phi"] s.phi2 = l2["phi"] s.eta1 = l1["eta"] s.eta2 = l2["eta"] s.pt1 = l1["pt"] s.pt2 = l2["pt"] s.relIso1 = l1["relIso"] s.relIso2 = l2["relIso"] metPhi = getVarValue(c, "rawMetphi") s.deltaPhiLL = deltaPhi(l1["phi"], l2["phi"]) s.deltaEtaLL = l1["eta"] - l2["eta"]