How to get a object mask as part of the alpha channel?
If you are using cycles, all you have to do is use holdout sahder node.
 Give the object that you want to have the 0 alpha a new material like this.

Then in the render tab of the properties window, under the Film section enable Transparent. You will have to save your render to a image format with a alpha channel, such as a .png.