Can I make an object invisible in Cycles without letting the camera see what is behind it?
To make the object transparent as alpha channel:


use a holdout shader so it renders as transparent


Place the object on a different layer and use that layer as mask:


Use a Pass index for the object and use that on the compositor to substract the object from the final render:


(click on the image to enlarge)
Similarly, you can assign a pass index to the material and use that as alpha on the compositor:


(click on the image to enlarge)