예제 #1
0
파일: tWZ_3l.py 프로젝트: denschwarz/tWZ
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
예제 #2
0
파일: tWZ_3l.py 프로젝트: denschwarz/tWZ
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)
예제 #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:]
    ])
예제 #4
0
def getElectrons(c, collVars=electronVars):
    return [
        getObjDict(c, 'Electron_', collVars, i)
        for i in range(int(getVarValue(c, 'nElectron')))
    ]
예제 #5
0
def getMuons(c, collVars=muonVars):
    return [
        getObjDict(c, 'Muon_', collVars, i)
        for i in range(int(getVarValue(c, 'nMuon')))
    ]
예제 #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)))
    ]
예제 #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
예제 #8
0
def make_jets(event, sample):
    event.jets = [
        getObjDict(event, 'JetGood_', jetVarNames, i)
        for i in range(int(event.nJetGood))
    ]