Dear colleagues,
I am wondering if it is safe, that it to say if it produces the expected behavior if I change the LargestAcceptableStep (of the global PropagatorInField) during the Stepping Action (i.e. the LargestAcceptableStep is changed from time to time during the simulation time depending on some characteristics of the steps). Knowing that the particle is propagating in a magnetic field. By “expected behaviour” I mean that it really applies to the maximum step to the track without producing problems. I also expect this to work only for charged particles (i.e. affected by the field)
Just to get a better idea on my question, here is how it is implemented in the code:
In SteppingAction.cc:
#include “G4TransportationManager.hh”
#include “G4PropagatorInField.hh”
void SteppingAction::UserSteppingAction(const G4Step *aStep) {
…
…calculate variable_value depending on the characteristics of the step…
…
G4TransportationManager::GetTransportationManager()->GetPropagatorInField()->SetLargestAcceptableStep(variable_value);
…
}
Thanks in advance for the help.
Best regards,
-David