What's the event triggered after an autocomplete has run and how to retrieve the value selected
No event is triggered at the moment (as of 7.34), but there's a patch on this issue that should let you use something like:

$('#input-id').on('autocompleteSelect', function(event, node) {

});


or if you're using on old version of jQuery

$('#input-id').bind('autocompleteSelect', function(event, node) {

});


Where node is the selected item. You should be able to get the tid from one of the properties on that object.