Pulse-shape discrimination with machine learning for CZT detectors at the DA$Φ$NE beam test facility
Cadmium zinc telluride (CZT) detectors offer versatility, operational simplicity, and room-temperature X- and gamma-ray spectroscopy, making them attractive for collider applications, yet their use under high-flux conditions remains limited. Here, we present a preliminary feature-based pulse-shape analysis employing machine learning, on data acquired with a quasi-hemispherical CZT detector at the DA$\Φ$NE beam test facility of the National Laboratory of Frascati of INFN. A 300-MeV electron beam impinging on a lead target produced characteristic Pb X-rays together with a broad background extending up to the electron-positron annihilation region. Physically motivated temporal and morphological features were extracted from the recorded waveforms and used to distinguish nominal photon-like pulses from anomalous events. An XGBoost classifier trained and validated on 10,000 labeled waveforms achieved an accuracy of approximately 97%, with most of its classification performance reached using only a few hundred labeled examples. The trained model was applied to more than 700,000 events, substantially reducing the spectral continuum and coincidence peaks, while preserving the characteristic Pb X-ray lines up to the 511-keV annihilation peak. These preliminary results demonstrate the potential of machine-learning-assisted pulse-shape discrimination for improving CZT spectroscopy in collider environments.