When to use an active filter instead of a passive filter?
In many digital sampling applications it is possible to remove mains noise by sampling the signal at twice mains frequency and averaging the result of each pair of samples.



The image shows hum superimposed on a steady signal. Each black 'x' is a sampling point and it should be reasonably obvious that sampling at any odd multiple of the half-wave time (every half-wave, every 3, every 5, etc.) will result in samples that alternate above or below or exactly on the signal. Averaging each pair of readings will eliminate the hum.

This approach is commonly used in industrial signal applications such as temperature controllers where a very low voltage signal is being measured and the sensor wires run in close proximity to mains cables.

If you were designing a product for the international market you may wish to make the sampling switchable between 50 and 60 Hz. Even better would be to pass a mains zero-cross signal from the PSU to the controller so that it automatically selected the right frequency.