Masking help needed - trying to use an object as mask

Hi Folks - I have run up against a wall in my knowledge of Blender, and am not quite able to find the information that I need to get the effect that I am going for. Basically, I am trying to replicate the look of the transporter effect from The Wrath of Khan. I have the blue and purple effects to the state that I like them, but… I am trying to use the wording “FIRST Appalachian Robotics” as the object that beams in. In order to do this, I think that I need to create a mask, then have both the words and the beam “sparkles” appear behind that mask, so that it appears that the letters are beaming into the scene. It is this last part that I am currently unable to create and I currently have the sparkles in front of the lettering.

How do I use the lettering as a mask and then have the sparkles and lettering itself appear behind/through the mask? I would think this would be fairly straight forward, but I may not be using the correct terminology in my searches. I have attached the blend file, so you can see what I am working with.



Working Transporter Blue and Purple Flares Spheres and Mirrors.blend (1.09 MB)

Looking into how to generate an Object ID pass or Material ID pass. I know how to do it, but not well enough to explain step by step. The gist though is you set a pass index for the object or material, enable ID pass in the render layer, then add the ID pass node to the composite, set the number and pipe in the pass from the render layer. I then output this to a separate EXR layer so I can composite in Nuke.
I hope that helps point you in the right direction.