An implantable system for treating a human heart or an animal heart, comprising a processor , a memory unit , a treatment unit including a treatment electrode , and a detection unit for detecting a cardiac event requiring treatment, the memory unit including a computer-readable program which prompts the processor to carry out the following steps when the program is being executed on the processor : a) detecting by way of the detection unit whether a cardiac event to be treated has occurred in a human heart or an animal heart; b) if a cardiac event to be treated has occurred, determining a position of the treatment electrode or determining a variable correlating with this position; c) comparing the position of the treatment electrode or the variable correlating with the position to a reference variable; and i. carrying out a cardiac treatment by way of the treatment unit and the treatment electrode when the position of the treatment electrode or the variable correlating with the position agrees with the reference variable within a predefinable tolerance; or ii. not carrying out a cardiac treatment by way of the treatment unit and the treatment electrode when the position of the treatment electrode or the variable correlating with the position does not agree with the reference variable within a predefinable tolerance, characterized in that the position of the treatment electrode is a relative position of the treatment electrode with respect to a reference point of the system, the reference point is a further treatment electrode or a reference electrode, and the relative position of the treatment electrode is determined by measuring an electrical current and/or by measuring a voltage between the treatment electrode and the reference point. a) detecting by way of the detection unit whether a cardiac event to be treated has occurred in a human heart or an animal heart; b) if a cardiac event to be treated has occurred, determining a position of the treatment electrode or determining a variable correlating with this position; c) comparing the position of the treatment electrode or the variable correlating with the position to a reference variable; and i. carrying out a cardiac treatment by way of the treatment unit and the treatment electrode when the position of the treatment electrode or the variable correlating with the position agrees with the reference variable within a predefinable tolerance; or ii. not carrying out a cardiac treatment by way of the treatment unit and the treatment electrode when the position of the treatment electrode or the variable correlating with the position does not agree with the reference variable within a predefinable tolerance, i. carrying out a cardiac treatment by way of the treatment unit and the treatment electrode when the position of the treatment electrode or the variable correlating with the position agrees with the reference variable within a predefinable tolerance; or ii. not carrying out a cardiac treatment by way of the treatment unit and the treatment electrode when the position of the treatment electrode or the variable correlating with the position does not agree with the reference variable within a predefinable tolerance, the position of the treatment electrode is a relative position of the treatment electrode with respect to a reference point of the system, the reference point is a further treatment electrode or a reference electrode, and the relative position of the treatment electrode is determined by measuring an electrical current and/or by measuring a voltage between the treatment electrode and the reference point. <EOS>