How do I add a composite effect to a scene using material index? I am trying to combine a shockwave (edited in the render layers compositor) with the rest of the composition (currently a torus).  I do not know how to add the shockwave to the rest of the scene.  I do not want the particle system to be visible, just the shockwave effect generated from the particle system.  This is the shockwave and my current non-effective node setup:





Here is the current render... The torus and the particle system, but no shockwave.  At one point I had managed to add the shockwave to the particle system, but I do not want to see the particle system.



Thank you for any help!

Here is the .Blend file:



EDIT in response to Cegaton's answer:

I set everything up and for some reason "Views" is not where to put Torus and Particles on my computer.  However, the torus is the only object showing up in the render, and I think it has to do with the missing AO checkbox:



You can see there is no checkbox for Alpha Over and I am guessing this is why it is not working in the render?  I checkmarked "AO" in "Passes" but I think this is not the same thing, since it is not working.

Thank you for advice!

Here is what "Views" is like on my computer:



That's why I was confused for a while! 

EDIT !

Big problem solved!  I needed to click "transparent" under "Film" under "Render" (the little camera icon).  Now the render layers nodes have checkered backgrounds and everything seems to be working properly!
It is unclear to me what you mean by shockwave, but here's what I think.

For better control separate the different elements in different layers.



Then set different render layers, so that the particle layer excludes the torus and the layer for the torus excludes the particles.



Then mix them in the compositor using alpha over, you won't need the material index:


click on the image to enlarge