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 getGenPartsAll(c, genVars=genVars):
    return [
        getObjDict(c, 'GenPart_', genVars, i)
        for i in range(int(getVarValue(c, 'nGenPart')))
    ]
Example #3
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 #4
0
def getGenLeps(c):
    return [
        getObjDict(c, 'genLep_',
                   ['eta', 'pt', 'phi', 'charge', 'pdgId', 'sourceId'], i)
        for i in range(int(getVarValue(c, 'ngenLep')))
    ]
Example #5
0
def getElectrons(c, collVars=electronVars):
    return [
        getObjDict(c, 'Electron_', collVars, i)
        for i in range(int(getVarValue(c, 'nElectron')))
    ]
Example #6
0
def getTaus(c, collVars=tauVars):
    return [
        getObjDict(c, 'TauGood_', collVars, i)
        for i in range(int(getVarValue(c, 'nTauGood')))
    ]
Example #7
0
def getMuons(c, collVars=muonVars):
    return [
        getObjDict(c, 'Muon_', collVars, i)
        for i in range(int(getVarValue(c, 'nMuon')))
    ]
Example #8
0
def getJets(c, jetVars=jetVars, jetColl="Jet"):
    return [
        getObjDict(c, jetColl + '_', jetVars, i)
        for i in range(int(getVarValue(c, 'n' + jetColl)))
    ]
Example #9
0
def makeLeptons(event, sample):
    collVars = ["pt", "eta", "phi", "mT", iso_disc]
    lep = getObjDict(event, args.mode + '_{}_'.format(args.isoDiscriminator),
                     collVars, 0)
    for var in collVars:
        setattr(event, "lep_" + var, lep[var])
Example #10
0
def makeLeptons( event, sample ):
    collVars = ["pt","eta","phi","mT","hybridIso"]
    lep  = getObjDict(event, args.mode+'_looseHybridIso_', collVars, 0)
    for var in collVars:
        setattr( event, "lep_"+var, lep[var]  )
Example #11
0
def makeLeptons(event, sample):
    collVars = ["pt", "eta", "phi", "mT"]
    lep = getObjDict(event, args.mode + '_FOmvaTOPT_', collVars, 0)
    for var in collVars:
        setattr(event, "lep_" + var, lep[var])