Code made compatible with Delphes