When you work in a group depending on who you are with you can have many different reactions. If you are working in a group that you like with some of your friends, your endorphins in your brain will be more abundant. Now for the neurons to fire that requires some physics. First off the neurotransmitters need to have a force to push them through the synaptic gap. This allows them to reach the dendrites of the next neuron to put a force in the opposite direction to stop the transmitters. Then the chemical signals change to electrical. This then uses more force to travel down the axon and and reach the terminal branches which starts the process all over again, therefor releasing more endorphins making you happy.