The stellar mass fraction and baryon content of galaxy clusters and groups | Synapse