How ALPHA-g creates and drops antihydrogen atoms