The cosmic ray background in charge coupled devices