Study of the formation of a carbon layer on a sputtering target during magnetron-enhanced reactive sputtering