Systematic differences in SteppingAction when command-based scorer also present

Hi,
the results I get from scoring in the SteppingAction change systematically if a command-based scorer is also present.

In my simulation I have a small spherical neutron source which emits the neutron isotropically.
In the SteppingAction all neutrons in a certain distance to the source are counted. Afterwards the number of neutrons in a certain distance can be plotted versus the distance.
I noticed that this plot changes systematically depending whether I use the primitive scorer or not (see the provided plot).


Does anybody know, why the use of the primitive scorer changes the detection of the neutrons in the SteppingAction?
The blue curve (without scorer) is the expected one as the neutrons are only produced at distance = 0 cm and there is no reason why the number of neutrons should increase with incresing distance as the red curves shows.

The detection method in the SteppingAction is given by the follwoing code:

void ZNFSteppingAction::UserSteppingAction(const G4Step* step)
{
	const G4Track* track = step->GetTrack();
	const G4ParticleDefinition* particle = track->GetDefinition();
	const G4StepPoint* postStepPoint = step->GetPostStepPoint();
	const G4StepPoint* preStepPoint = step->GetPreStepPoint();
	G4ThreeVector endposition  = postStepPoint->GetPosition();
	G4ThreeVector preposition  = preStepPoint->GetPosition();
	G4double px = preposition[0];
	G4double py = preposition[1];
	G4double pz = preposition[2];
	G4double ex = endposition[0];
	G4double ey = endposition[1];
	G4double ez = endposition[2];
	G4double pr = std::sqrt(px*px+py*py+pz*pz);
	G4double er = std::sqrt(ex*ex+ey*ey+ez*ez);
	if (particle == G4Neutron::Definition()){
		fRunAction->Count(pr,er);
	}
}

void RunAction::Count(const G4double pr, const G4double er)
{
	for (int k=0; k<groesseWelt; k++){
		if (pr<k*1.*cm && er>=k*1.*cm){
			neutronsInThread[k]++;		
		} 
	}  
}

The scorer is defined in a macro file as
/score/create/boxMesh boxMesh_1
/score/mesh/boxSize 100. 100. 100. cm
/score/mesh/nBin 100 100 100
/score/quantity/nOfTrack numberTracks
/score/filter/particle filterNeutron neutron

Just a thought…

If the scorer introduces an extra step, you will get more counts. (An extra step would not affect the physics.)

You could, instead, try accumulating step length?