I'm assuming this behavior isn't intended: It appears the Stepping Manager ignores proposed step sizes from discrete processes that give a G4ForceCondition of ExclusivelyForced, Conditionally, or Forced. This occurs even if the process suggests the smallest step size. If the first discrete process gives a condition ExclusivelyForced, no other process can propose a step size, which defaults to DBL_MAX. The offending portion of code in G4SteppingManager2.cc, method DefinePhysicalStepLength(), is: switch (fCondition) { case ExclusivelyForced: (*fSelectedPostStepDoItVector)[np] = 4; fStepStatus = fExclusivelyForcedProc; fStep->GetPostStepPoint() ->SetProcessDefinedStep(fCurrentProcess); break; case Conditionally: (*fSelectedPostStepDoItVector)[np] = 3; break; case Forced: (*fSelectedPostStepDoItVector)[np] = 2; break; default: (*fSelectedPostStepDoItVector)[np] = 0; if(physIntLength < PhysicalStep ){ PhysicalStep = physIntLength; fStepStatus = fPostStepDoItProc; fPostStepDoItProcTriggered = G4int(np); fStep->GetPostStepPoint() ->SetProcessDefinedStep(fCurrentProcess); } } if (fCondition==ExclusivelyForced) return; // Take note the 'return' at here !!! } I'm guessing the "if(physIntLength < PhysicalStep)" statement should be moved outside the switch statement, but remain before the "if (fCondition==ExclusivelyForced)" statement. As it stands now, PhysicalStep (the variable used for the actual step size) is only updated with the process' proposed step (stored in physIntLength) if the switch reaches the default block. I've looked at the source for the 5.0 release and this behavior exists (the switch statement has the new case StronglyForced that will also ignore step size).
We do not understant what is this user's problem. The code pointed out by the user works as our intention.
Then perhaps you can include this in the documentation. No where did it mention (even in the code) that the value returned by PostStepGetPhysicalInteractionLength() would be ignored for these other values of G4ForceCondition. So if I wish to ensure a discrete process is invoked by setting the flag to Forced, that process can no longer suggest a step size, leaving the step at the mercy of only other processes. Why is this behavior intended?