Made program independent of Particle and Event class