Code for analysis of iMCP (test beam)