Get the energy provided by the electric field at each step

Dear Geant4 team,

I have a non-uniform electro-magnetic field in my model and I am trying to retrieve the energy of my particle at each step to know how much it has gained/lost.
I noticed that the steps from the SteppingAction and the steps done in the GetFieldValue() method of the G4ElectroMagneticField class are different since I added in my G4ElectroMagneticField class a ChordFinder and a stepper G4ClassicalRK4. I am not sure I am doing things correctly because I read that the ChordFinder are designed for the magnetic field but I think they also affect the electric field since I get different energies values at the end of my geometry when I change the minimum step value (which is 100 mm in the example below) while I put the primary particle to go through the geometry where the magnetic field is 0:

    G4ChordFinder* fChordFinder = new G4ChordFinder((G4MagneticField*)this, 100. * mm, m_stepper);

In my GetFieldValue() method, I try to get the kinetic energy at each step:
G4EventManager::GetEventManager()->GetTrackingManager()->GetTrack()->GetStep()->GetPreStepPoint()->GetKineticEnergy() / MeV
However, the kinetic energy is modified only when I reach a step in my geometry like reaching a geometry border of having a reaction.
I want to get the energy at each “sub-step” of the GetFieldValue() method.

  1. How can I achieve this?
  2. Is my understanding correct regarding the ChordFinder ?
  3. I would also be interested in displaying those “substeps” in my viewer. I am not sure whether it is possible or not but in the following presentation, page 11 we can see those steps represented with pink dots presentation. That is at those pink dots I am trying to get the kinetic energy of my particle (question 1)

Thanks for your help