Solar Flares are completely different from Coronal Mass Ejections. Different energy spectra.
http://www.differencebetween.info/difference-between-a-solar-flare-and-a-cme#:~:text=Difference%20between%20Solar%20Flare%20and%20a%20CME%3A%20,the%20speed%20of%20light%2C%20and%20hence%20…%20