Example #1
0
def getPhotons(c, collVars=None, idLevel='loose', year=2016):
    if collVars is None:
        collVars = ['eta', 'pt', 'phi', 'mass', 'cutBased'
                    ] if (not (year == 2017 or year == 2018)) else [
                        'eta', 'pt', 'phi', 'mass', 'cutBasedBitmap'
                    ]
    return [
        getObjDict(c, 'Photon_', collVars, i)
        for i in range(int(getVarValue(c, 'nPhoton')))
    ]
Example #2
0
def getTaus(c, collVars=tauVars):
    return [
        getObjDict(c, 'Tau_', collVars, i)
        for i in range(int(getVarValue(c, 'nTau')))
    ]
Example #3
0
def getMuons(c, collVars=muonVars):
    return [
        getObjDict(c, 'Muon_', collVars, i)
        for i in range(int(getVarValue(c, 'nMuon')))
    ]
Example #4
0
def getElectrons(c, collVars=electronVars):
    return [
        getObjDict(c, 'Electron_', collVars, i)
        for i in range(int(getVarValue(c, 'nElectron')))
    ]
Example #5
0
def getLeptons(c, collVars=leptonVars):
    return [
        getObjDict(c, 'LepGood_', collVars, i)
        for i in range(int(getVarValue(c, 'nLepGood')))
    ]
Example #6
0
def getJets(c, jetVars=jetVars, jetColl="Jet"):
    return [
        getObjDict(c, jetColl + '_', jetVars, i)
        for i in range(int(getVarValue(c, 'n' + jetColl)))
    ]
Example #7
0
def getGenPartsAll(c, genVars=genVars):
    return [
        getObjDict(c, 'GenPart_', genVars, i)
        for i in range(int(getVarValue(c, 'nGenPart')))
    ]
Example #8
0
def getGenParts(c):
    return [
        getObjDict(c, 'GenPart_', [
            'eta', 'pt', 'phi', 'charge', 'pdgId', 'motherId', 'grandmotherId'
        ], i) for i in range(int(getVarValue(c, 'nGenPart')))
    ]
Example #9
0
def getGenLeps(c):
    return [
        getObjDict(c, 'genLep_',
                   ['eta', 'pt', 'phi', 'charge', 'pdgId', 'sourceId'], i)
        for i in range(int(getVarValue(c, 'ngenLep')))
    ]