code has been cleaned up and tested for all 6 version of the MEG experiment