added emd functionality for quad-pix sensor add-on and corrected some defines