The way you get admitted to good grad schools is by impressing specific profs. It's much more personal than undergrad admissions. And profs I know say the thing that impresses them most is good recommendations from other professors they know and trust. So talk to current profs who like you and ask them who they know at grad schools you want to go to who would make good advisors for the kind of work you want to do.
Our CS program here is more like "programming trade school." I doubt recommendations from those profs would be worth much -- what about from the math department?
Get the best recommendation you can, from the best researcher who knows you personally, and who can vouch for your research skills. Classroom performance doesn't count.
If you have to choose, it's better to have a great recommendation from someone unknown, than it is to have a mediocre recommendation from a superstar.