This equation is written in the centre of mass frame of reference and is therefore not a function of the mass of either the projectile or the target nucleus.
The outgoing electron which collided with the target nucleus as well as the produced particles go flying out into the detector, where they are measured.
Even if the target nucleus is part of a neutral atom, the other particle must penetrate well beyond the electron cloud and closely approach the nucleus, which is positively charged.