Hi, Paride.
If I don't want to render an object I don't put it in the scene !
One example :
I have a tree in front a house, I want to have its shadow, its reflection in the glass windows,... but I dont't want to see it ( I'll replace later in Photoshop by a real tree )
But if I want to render a Render layer pass ID to create a mask for the house brick wall, I get the tree which ruin my mask.