Hi Oznur, Yes, you can change the kinetic energy of your particle via the SteppingAction, but you have to get the current track through the step. For example:
G4Step()->G4Track()->SetKineticEnergy (const G4double aValue). This is, however, a bit of a roundabout way to do a physical process. Something must be creating this gain in energy. I'm assuming a uniform electric field is creating your linear gain of kinetic energy. Why not just apply an electric field in Geant4?
Many thanks for your answers. In the end we have implemented an electric field to create the linear acceleration. I will try BDSIM and SteppingAction in the future as well!