Python code to search for new particles