Problem 1992

Summary: e+ tracking becomes infinite loop in Cerenkov production
Product: Geant4 Reporter: Scott Nutter <nutters>
Component: processes/electromagneticAssignee: Daren Sawkey <daren.sawkey>
Status: RESOLVED FIXED    
Severity: minor CC: daren.sawkey
Priority: P4    
Version: 10.3   
Hardware: PC   
OS: Linux   

Description Scott Nutter 2017-07-20 16:24:34 CEST
I am having this problem occur reliably now, each time in the same material and at the same energy, but not every time. The material has optical properties defined, and scintillation and cerenkov physics turned on in the physics list for relevant particles. NOTE: The problem occurs at the threshold energy for Cerenkov production, which makes me suspect it is a GEANT4 problem. My guess is it is a precision problem associated with determining the step length.

An e+ loses energy down to KE = 0.149 MeV in a normal manner through eIoni. At 0.149 MeV (threshold for Rindex = 1.58) it loops continuously on the Cerenkov process with very small dE and StepLength. See below:

* G4Track Information:   Particle = e+,   Track ID = 96731,   Parent ID = 96394
*********************************************************************************************************

Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng TrackLeng  NextVolume ProcName
    0       58      123      -76      2.92        0        0         0 BCDscin_phy initStep
    1     57.9      123    -76.2      2.89    0.029    0.232     0.232 BCDscin_phy eIoni

...

   20     57.2      123    -77.7       2.6        0        0      1.91 BCDscin_phy initStep
   21     57.2      123    -77.7       2.6  0.00264   0.0217      1.93 BCDscin_phy eIoni

...

  180     51.8      125      -81     0.151        0        0      24.1 BCDscin_phy initStep
  181     51.8      125      -81     0.149  0.00133  0.00464      24.1 BCDscin_phy eIoni

...


Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng TrackLeng  NextVolume ProcName
  184     51.8      125      -81     0.149        0        0      24.1 BCDscin_phy initStep
  185     51.8      125      -81     0.149        0 8.06e-05      24.1 BCDscin_phy Cerenkov
  186     51.8      125      -81     0.149 1.06e-05 8.06e-05      24.1 BCDscin_phy Cerenkov
  187     51.8      125      -81     0.149 9.33e-06 3.78e-05      24.1 BCDscin_phy Cerenkov
  188     51.8      125      -81     0.149 5.78e-10 2.34e-09      24.1 BCDscin_phy Cerenkov
  189     51.8      125      -81     0.149 2.48e-14    1e-13      24.1 BCDscin_phy Cerenkov
  190     51.8      125      -81     0.149 1.37e-17 5.55e-17      24.1 BCDscin_phy Cerenkov
  191     51.8      125      -81     0.149 1.37e-17 5.55e-17      24.1 BCDscin_phy Cerenkov
  192     51.8      125      -81     0.149 1.37e-17 5.55e-17      24.1 BCDscin_phy Cerenkov
  193     51.8      125      -81     0.149 1.37e-17 5.55e-17      24.1 BCDscin_phy Cerenkov
...
5059156     51.8      125      -81     0.149 1.37e-17 5.55e-17      24.1 BCDscin_phy Cerenkov

The job does not progress amymore, and at this point I must kill the job. I am at a loss as to how to debug this. Material has constant optical Rindex = 1.58 defined from 3.44 eV to 2.38 eV.

Scott
Comment 1 Scott Nutter 2017-07-24 21:09:38 CEST
UPDATE: I had production cuts set to one micron. When increased to five microns, problem was gone. At two microns, problem still occurred.
Comment 2 Vladimir.Ivantchenko 2017-07-26 15:05:27 CEST
Hello Scott,

it seems to be a real problem. Thank you very much for pointing to it. How we can reproduce it in a simple example or you can provide a tar with your application?

Vladimir
Comment 3 Daren Sawkey 2018-02-13 00:44:05 CET
Hi Scott, 

Thanks for reporting this. I haven't been able to reproduce this problem. I do see similar small steps limited by Cerenkov, but only for a few steps at a time (see below). Could you please provide more information. What material does this occur in? What physics list are you using? 

Regards  --  Daren.

G4WT0 >     6    118 um  -11.6 um  -10.3 um    155 keV  1.77 keV  5.87 um    119 um         Tank       eIoni
G4WT0 >     7    143 um  -16.2 um  -11.5 um    150 keV  5.57 keV  25.6 um    145 um         Tank    Cerenkov
G4WT0 >     8    145 um  -16.6 um  -11.7 um    149 keV   324 eV   2.43 um    147 um         Tank    Cerenkov
G4WT0 >     9    146 um  -16.8 um  -11.7 um    149 keV   268 eV    1.1 um    148 um         Tank    Cerenkov
G4WT0 >    10    146 um  -16.8 um  -11.7 um    149 keV 0.191 eV   7.85 Ang   148 um         Tank    Cerenkov
G4WT0 >    11    146 um  -16.8 um  -11.7 um    149 keV7.89e-06 eV   32.4 fm    148 um         Tank    Cerenkov
G4WT0 >    12    146 um  -16.8 um  -11.7 um    149 keV3.11e-10 eV 0.00128 fm    148 um         Tank    Cerenkov
G4WT0 >    13    147 um    -17 um  -11.7 um    149 keV  47.2 eV    714 nm    149 um         Tank       eIoni
Comment 4 Scott Nutter 2018-02-15 21:03:53 CET
Sorry I haven't followed up on this. It's part of a large codeset that I need to cull down and check that the problem still occurs. I was tracking in plastic scintillator. I got around the problem by lengthening the steps.

I hope to spend some time on this next month.

Scott
Comment 5 Daren Sawkey 2018-08-04 00:35:59 CEST
It turns out that this appears only for certain materials, for example, G4_POLYETHYLENE. A fix is available and will be in the next patch release. Scott, thanks for reporting this.