The role of the charge generated during heavy ion irradiation in the gate damage of medium power MOSFET