Motion Tracking noob help

Is there a material that I can use in setting up a scene in motion tracking where I have say, a video that has a pole in the foreground but I want my blender objects to be behind that pole? If I reconstruct the pole is there a material that can hide everything behind it yet also the pole object itself not show up in the render?

This is very easy. Just enable these settings under your material.