If you want to use Twin Machine Guns, that's a Gunner class weapon. Can also use Assault Rifles on Gunner, but it's more advantageous for TMG. There are no pistols in PSO2, though the closest thing to that would be Gunblade, and that's equipable on all classes.
Rangers use Assault Rifles and Launchers. Rangers are a bit more support based in the sense they can inflict a "weak bullet" point on a point of an enemy/boss that all players can do more damage upon. Gunners get the Chain ability where the Gunner itself can keep hitting a point with normal attacks before finishing with a Photon Art for massive damage; pretty much a boss killer.
As for your Mag, obviously if you're only going to play as ranged class, throw all your points into Ranged Attack. Can balance between feeding your mag ranged-type weapons to increase RNG quickly, and dimates to stop DEX from increasing.