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'))) ]
def getGenPartsAll(c, genVars=genVars): return [ getObjDict(c, 'GenPart_', genVars, i) for i in range(int(getVarValue(c, 'nGenPart'))) ]
def getGenParts(c): return [ getObjDict(c, 'GenPart_', [ 'eta', 'pt', 'phi', 'charge', 'pdgId', 'motherId', 'grandmotherId' ], i) for i in range(int(getVarValue(c, 'nGenPart'))) ]
def getGenLeps(c): return [ getObjDict(c, 'genLep_', ['eta', 'pt', 'phi', 'charge', 'pdgId', 'sourceId'], i) for i in range(int(getVarValue(c, 'ngenLep'))) ]
def getTaus(c, collVars=tauVars): return [ getObjDict(c, 'TauGood_', collVars, i) for i in range(int(getVarValue(c, 'nTauGood'))) ]
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 getJets(c, jetVars=jetVars, jetColl="Jet"): return [ getObjDict(c, jetColl + '_', jetVars, i) for i in range(int(getVarValue(c, 'n' + jetColl))) ]