Getting a particle's index