Pulse Pile-up Correction by Particle Swarm Optimization with Double-layer Parameter Identification Model in X-ray Spectroscopy