How to create your own physics process using G4VProcess?

Hi, I want to create physics process which can add momentum to particle at each step. Could anyone please let me know how to do this. There are only slides here but I am not capable to comprehend this and write code for it:

PS: I have 2 years’ experience in working on Geant4. But I never tried this one.