Figure 2: Pan Tompkins Algorithm.