A search for excited electrons with the Compact Muon Solenoid detector