def lstm_jets(event, sample): jets = [ getObjDict(event, 'Jet_', lstm_jetVarNames, event.JetGood_index[i]) for i in range(int(event.nJetGood)) ] #jets = filter( jet_vector_var['selector'], jets ) return jets
def make_jets(event, sample): event.jets = [ getObjDict(event, 'JetGood_', jetVarNames, i) for i in range(int(event.nJetGood)) ] event.bJets = filter( lambda j: isBJet(j, year=event.year) and abs(j['eta']) <= 2.4, event.jets)
def getDeltaR(event, sample): event.jets = [ getObjDict(event, 'JetGood_', jetVarNames, i) for i in range(int(event.nJetGood)) ] bjets = filter( lambda j: isBJet(j, year=event.year) and abs(j['eta']) <= 2.4, event.jets) event.minDRbjets = min([ deltaR(b1, b2) for i, b1 in enumerate(bjets[:-1]) for b2 in bjets[i + 1:] ])
def getElectrons(c, collVars=electronVars): return [ getObjDict(c, 'Electron_', collVars, i) for i in range(int(getVarValue(c, 'nElectron'))) ]
def getMuons(c, collVars=muonVars): return [ getObjDict(c, 'Muon_', collVars, i) for i in range(int(getVarValue(c, 'nMuon'))) ]
def getParticles(c, collVars, coll): from Analysis.Tools.helpers import getVarValue, getObjDict return [ getObjDict(c, coll + '_', collVars, i) for i in range(int(getVarValue(c, 'n' + coll))) ]
def lstm_jets(event, sample): jets = [ getObjDict( event, 'Jet_', lstm_jetVarNames, event.JetGood_index[i] ) for i in range(int(event.nJetGood)) ] return jets
def make_jets(event, sample): event.jets = [ getObjDict(event, 'JetGood_', jetVarNames, i) for i in range(int(event.nJetGood)) ]