A method, including selecting an initial set ofelectrocardiograph (ECG) signals taken over a singleheartbeat of a human subject, the set having respectivemorphologies to be used as a template for an arrhythmiaof the subject, and receiving a subsequent set of ECGsignals taken over a subsequent heartbeat of the humansubject. The method also includes performing across-correlation between the initial set and the subsequentset, so as to generate a correlation coefficient that isa measure of a goodness of fit between geometries of theinitial set and the subsequent set, and, when thecorrelation coefficient exceeds a threshold coefficient,accepting the subsequent heartbeat as having been causedby the arrhythmia.