the results are consistent between Fluka and Geant4 when only the PreStepPoint of Step in the volume and using the energy of PreStepPoint in Geant4.
the result from Fluka:
but mean track length in a volume should constraint the PreStepPoint and PostStepPoint all in the volume, and the energy should be the mean value of the PreStepPoint and PostStepPoint,
according this, the result from Geant4 is:
On the contrary, scoring has in principle no vocation to arbitrarily affect particle tracking, and particle steps in FLUKA are anyway constrained within a geometry region, up to its boundary.
Moreover, neutral particles do not lose energy along the step.
USRTRACK attributes the particle step length to the particle energy along the step, yielding a track length spectrum in cm/GeV, which becomes a fluence spectrum [1/(GeV cm^2)] when divided by the region volume.
What is strange there?
there is still big difference with constraining only the PreStepPoint in the region in Geant4.
but the results are consistent between Geant4(when constraining only the PreStepPoint in the region) and Fluka.
so when tally mean track lenght using Fluka, the PreStepPoint and PostStepPoint are all constrained in a region, or only the PreStepPoint is constrained in the region?
As pointed out above, in FLUKA a particle step is always constrained inside a geometry region (including its boundary), independently of the requested scoring. This means that its initial and final points are either inside the same region or on its boundary.
@ceruttif , yes, that is my opinion, but the result from Fluka is consistent with Geant4(constrain only the PreStepPoint in the region). when constraining the PreStepPoint and PostStepPoint in the region, big difference occurs.
Could you please expand on constraining the PreStepPoint and PostStepPoint in the region? What are the changes you do in the G4 code to achieve so?
In my understanding, the PreStepPoint and PostStepPoint (in G4) are always in the same logical volume (and hence region) already, possibly with one of the 2 points (or both) at a volume boundary.
when only the PreStepPoint in the scoring volume(include the boundary),
the result is consistent with Fluka and Mcnp6, see the results above.
this include the PreStepPoint in the boundary, and the PostStepPoint is in other volumes(around the scoring volume),so the step should be regarded as in other volumes.
when the PreStepPoint and PostStepPoint are all in the scoring volume(include the boundary),
the big difference occured, see the result above.
@ghugo , yes the USRTRACK result from Fluka is consistent with Mcnp one.
and consistent with G4 when only the PreStepPoint in the scoring volume(include the boundary),
bu as you said, it is not too meaningful.