This disclosure provides systems, methods, and apparatus related to ion beam therapy. In one aspect, a system includes a position sensitive detector and a collimator. The position sensitive detector configured to detect gamma rays generated by an ion beam interacting with a target. The collimator is positioned between the target and the position sensitive detector. The collimator includes a plurality of knife-edge slits, with a first knife-edge slit intersecting with a second knife-edge slit.