Test code for particle tracking