A system for treating water comprising: a primary actinic radiation reactor , which includes an ultraviolet lamp ; a source of a persulfate precursor compound disposed to introduce at least one persulfate precursor compound into the primary actinic radiation reactor; a total organic carbon (TOC) concentration sensor located upstream of the primary actinic radiation reactor ; a persulfate concentration sensor located downstream of the primary actinic radiation reactor ; and a controller operatively coupled to receive at least one input signal from at least one of the TOC concentration sensor and the persulfate concentration sensor, and generate a control signal characterized in that the control signal regulates a continuously variable intensity of the actinic radiation in the ultraviolet lamp based at least in part on the at least one input signal; characterized in that the ultraviolet lamp is continuously dimmable by an electronic ballast circuit that includes a control IC and half-bridge converter for DC to AC conversion, a resonant tank circuit to ignite and run the lamp, and a closed loop feedback circuit for controlling the lamp current, wherein a DC bus voltage is converted by the half-bridge inverter into a high frequency AC square-wave voltage, which then drives the resonant tank circuit and becomes filtered to produce a sinusoidal current and low control voltage at the lamp, wherein to dim the ultraviolet lamp , the frequency of the half-bridge is increased, causing gain of the resonant tank circuit to decrease and therefore the lamp current to decrease, and wherein the closed-loop feedback circuit is used to measure the lamp current and regulate the current to the dimming reference level by continuously adjusting the half-bridge operating frequency, the low control voltage at the lamp being based at least in part on the at least one input signal. a primary actinic radiation reactor , which includes an ultraviolet lamp ; a source of a persulfate precursor compound disposed to introduce at least one persulfate precursor compound into the primary actinic radiation reactor; a total organic carbon (TOC) concentration sensor located upstream of the primary actinic radiation reactor ; a persulfate concentration sensor located downstream of the primary actinic radiation reactor ; and a controller operatively coupled to receive at least one input signal from at least one of the TOC concentration sensor and the persulfate concentration sensor, and generate a control signal characterized in that the control signal regulates a continuously variable intensity of the actinic radiation in the ultraviolet lamp based at least in part on the at least one input signal; characterized in that the ultraviolet lamp is continuously dimmable by an electronic ballast circuit that includes a control IC and half-bridge converter for DC to AC conversion, a resonant tank circuit to ignite and run the lamp, and a closed loop feedback circuit for controlling the lamp current, wherein a DC bus voltage is converted by the half-bridge inverter into a high frequency AC square-wave voltage, which then drives the resonant tank circuit and becomes filtered to produce a sinusoidal current and low control voltage at the lamp, wherein to dim the ultraviolet lamp , the frequency of the half-bridge is increased, causing gain of the resonant tank circuit to decrease and therefore the lamp current to decrease, and wherein the closed-loop feedback circuit is used to measure the lamp current and regulate the current to the dimming reference level by continuously adjusting the half-bridge operating frequency, the low control voltage at the lamp being based at least in part on the at least one input signal. <EOS>