示例#1
0
    'PATMUON': [-1, False],
    'DSAMUON': [-1, False],
    'RSAMUON': [-1, False],
    'DIMUON': [-1, False],
}

ErrorMessages = []

GenTest = False
LxyTest = []
d0Test = []

# test collections
for i, event in enumerate(t):
    if i == 100: break
    E = Primitives.ETree(t)
    for KEY in KEYS:
        try:
            Collection = E.getPrimitives(KEY)
            if KEY == 'GEN':
                try:
                    mu11, mu12, mu21, mu22, X1, X2, H, P, extramu = E.getPrimitives(
                        'GEN')
                except Exception as e:
                    if e.message not in ErrorMessages:
                        ErrorMessages.append(e.message)
                    KEYS[KEY][0] = i
                    KEYS[KEY][1] = True
                    GenTest = True
            try:
                if len(Collection) > 0:
示例#2
0
    eprint('Failed to get tree; exiting')
    exit()

# containers for storing error information
KEYS = {
    'ACCEPTANCE': False,
    'MUON': False,
    'DIMUON': False,
}

ErrorMessages = []

# test collections
for i, event in enumerate(t):
    if i == 10: break
    E = Primitives.ETree(t, DecList=('GEN', 'DSAMUON', 'DIMUON'))

    Gens = E.getPrimitives('GEN')
    DSAMuons = E.getPrimitives('DSAMUON')
    Dimuons = E.getPrimitives('DIMUON')

    mu11, mu12 = Gens[0], Gens[1]

    try:
        accSel = Selections.AcceptanceSelection(mu11)
        accSel = Selections.AcceptanceSelection((mu11, mu12))
    except Exception as e:
        if e.message not in ErrorMessages:
            ErrorMessages.append(e.message)
        KEYS['ACCEPTANCE'] = True