Problem 633

Summary: Transportation process returns 0 length step in replicated volume so that program remains stuck
Product: Geant4 Reporter: sandor.voros
Component: geometry/volumesAssignee: Gabriele Cosmo <Gabriele.Cosmo>
Status: RESOLVED FIXED    
Severity: normal CC: sandor.voros
Priority: P2    
Version: 6.0   
Hardware: PC   
OS: Linux   
URL: ftp://guest:time@ftp.metas.ch/voros/totabs.tgz

Description sandor.voros 2004-06-11 02:56:51 CEST
When using a geometry constructed with the G4PVReplica method,
the Transportation process sometimes returns a 0 step length and
the particle remains stuck at the same place forever.

I wrote a small example to reproduce the problem in
ftp://guest:time@ftp.metas.ch/voros/totabs.tgz

It is a water cylinder surrounded by air, and the cylinder is
divided into Z-Phi-R replica. For each event an e- of 5.332 MeV located
at -3.2 cm is shot along the Z axis towards the cylinder surface
located at 0 cm.

I tried to avoid "usual" errors with replica (i.e., not filling
the entire mother volume, etc.), so this must be something else,
and DAVID/DAWN did not detect any overlapping volume.
I'm using Geant4.6.0.p01 on a Linux RedHat 9.0 PC.

This small example works similarly as the Geant4 examples : define
the usual Geant4 environment variables, then 'cd' to the 'totabs'
directory, 'gmake' and execute it. The vis.mac file will be
executed first (it uses the OGLIX viewer), and then you can give
the command '/run/beamOn 8'. I get the "desired" problem in the
last event:

Step#      X         Y         Z        KineE    dEStep   StepLeng  TrakLeng
Volume     Process
    0      0 fm      0 fm   -3.2 cm   5.33 MeV     0 eV      0 fm      0 fm
World    initStep
    1      0 fm      0 fm      0 fm   5.33 MeV  6.91 keV   3.2 cm    3.2 cm
World  Transportation
    2      0 fm      0 fm      0 fm   5.33 MeV     0 eV      0 fm    3.2 cm
AbsorberRPhiZDiv  Transportation
    3      0 fm      0 fm      0 fm   5.33 MeV     0 eV      0 fm    3.2 cm
World  Transportation
    4      0 fm      0 fm      0 fm   5.33 MeV     0 eV      0 fm    3.2 cm
AbsorberRPhiZDiv  Transportation
    5      0 fm      0 fm      0 fm   5.33 MeV     0 eV      0 fm    3.2 cm
World  Transportation
........

So the particle seems to oscillate between the World and
AbsorberRPhiZDiv (the replicated) volumes in this case, but I
also saw it remain stuck at an other boundary between two replica
when using a slightly different setup.

I also tested a couple of changes in the geometry, like R-Z-Phi replica instead
of Z-Phi-R, using G4PVDivision instead of G4PVReplica, changing the granularity
in the totabs/src/totabsDetectorConstruction.cc file, but the problem remains
the same.

Thanks a lot for any help.
SĂĄndor
Comment 1 John Apostolakis 2004-06-28 06:07:59 CEST
Dear Sandor,
We have been able to reproduce the problem, and have created a protection to
enable the Navigator to recognise problems of this type and recover/continue
navigation after a number of zero steps. You will find this in Geant4 6.2,
which was released last Friday.
We plan to continue to investigate this, in order to discover the source of the
problem, in order to correct it.
Thank you for your report, and especially for the very useful test case.
Best regards, John Apostolakis.
Comment 2 Gabriele Cosmo 2004-06-29 08:04:59 CEST
The problem is under investigation.
It has been observed that the loop (zero-step length with particle bouncing
between two volumes) is reproduced only in the case when the combination
replica-in-Phi + replica-in-Rho is used (i.e. tubs sliced in Phi, and each
phi-slice is sliced in Rho).
Comment 3 Gabriele Cosmo 2004-06-29 11:20:59 CEST
The problem has been fixed in the development tag "geomnav-V06-02-00".
The fix will be included in the next patch or release.
Thanks for having reported the problem.