Code for the WP2 experiment