def METHOD_NAME(tree1, tree2, branch_names, scan_var='floats_dumpTauVariables_pt_DUMP.obj', index_var='ull_dumpTauVariables_EventNumber_DUMP.obj'):
    tree2.BuildIndex(index_var)
    diff_events = []
    for entry_1 in tree1:
        ind = int(getattr(tree1, index_var))
        tree2.GetEntryWithIndex(ind)
        var1 = getattr(tree1, scan_var)
        var2 = getattr(tree2, scan_var)
        if tree1.evt != tree2.evt:
            continue
        if round(var1, 6) != round(var2, 6): 
            diff_events.append(ind)
            print('Event', ind)
            for branch in branch_names:
                v1 = getattr(tree1, branch)
                v2 = getattr(tree2, branch)
                if round(v1, 6) != round(v2, 6) and v1 > -99.:
                    print('{b:>43}: {v1:>8.4f}, {v2:>8.4f}'.format(b=branch, v1=v1, v2=v2))
            print()
    print('Found', len(diff_events), 'events with differences in', scan_var)
    print(diff_events)