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 getTaus(c, collVars=tauVars): return [ getObjDict(c, 'Tau_', collVars, i) for i in range(int(getVarValue(c, 'nTau'))) ]
def getMuons(c, collVars=muonVars): return [ getObjDict(c, 'Muon_', collVars, i) for i in range(int(getVarValue(c, 'nMuon'))) ]
def getElectrons(c, collVars=electronVars): return [ getObjDict(c, 'Electron_', collVars, i) for i in range(int(getVarValue(c, 'nElectron'))) ]
def getLeptons(c, collVars=leptonVars): return [ getObjDict(c, 'LepGood_', collVars, i) for i in range(int(getVarValue(c, 'nLepGood'))) ]
def getJets(c, jetVars=jetVars, jetColl="Jet"): return [ getObjDict(c, jetColl + '_', jetVars, i) for i in range(int(getVarValue(c, 'n' + jetColl))) ]
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'))) ]