Exemplo n.º 1
0
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
Exemplo n.º 2
0
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)
Exemplo n.º 3
0
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:]
    ])
Exemplo n.º 4
0
def getElectrons(c, collVars=electronVars):
    return [
        getObjDict(c, 'Electron_', collVars, i)
        for i in range(int(getVarValue(c, 'nElectron')))
    ]
Exemplo n.º 5
0
def getMuons(c, collVars=muonVars):
    return [
        getObjDict(c, 'Muon_', collVars, i)
        for i in range(int(getVarValue(c, 'nMuon')))
    ]
Exemplo n.º 6
0
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)))
    ]
Exemplo n.º 7
0
def lstm_jets(event, sample):
    jets = [ getObjDict( event, 'Jet_', lstm_jetVarNames, event.JetGood_index[i] ) for i in range(int(event.nJetGood)) ]
    return jets
Exemplo n.º 8
0
def make_jets(event, sample):
    event.jets = [
        getObjDict(event, 'JetGood_', jetVarNames, i)
        for i in range(int(event.nJetGood))
    ]