should it not be if (fabs(CurrentParticle.pz())<0.00001) continue; ?