I'm having problems with a strong 50 Hz mains hum on signals created by photodetectors. I assume that they are due to ground loops and I realize that the best option would be to remove those. What are the best strategies for removing the hum from the signal? If the noise cannot be eliminated, can you recommend good filters against 50 Hz mains hum or where to look for them? [I reformulated the question after realizing that the best answer answered a more general question than the one I was asking].
Some more information on the setup: The signal is used for locking the frequency of a laser to a high finesse cavity. The lock has to be stable enough for intensity and phase fluctuations resulting from e.g. acoustic vibrations of the cavity to be strongly suppressed. The error signal is created via the tilt locking scheme, i.e. it is the difference of intensities on two halves of a split photo diode. The photo diode (and a lot of other lab equipment) is powered by a battery which also provides the ground. The hum appears already at this stage. The error signal is then fed into an adder circuit (for fine tuning of the set point). Then it enters a fast PID controller which generates a regulation signal. The regulation signal is fed back via a high voltage amplifier to a piezo to stabilize the cavity length. The main requirement for any additional components such as a notch filter etc. in the locking circuits is a low delay: the locking circuit is currently limited by the bandwidth of the HV amplifier of around 100 kHz and should preferably not be limited by any other filters.
What I'm really interested in in the end are amplitude and phase fluctuations of the light leaving the cavity at frequencies above 100 kHz and below 2 MHz. Hence, the main reason for removing the low-frequency noise is that I don't want to feed it into the control loops.