Code used for dipole and liv runs for o2 runs