Message: Infinite loop with G4UniformElectricField Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Infinite loop with G4UniformElectricField 

Forum: Fields: Magnetic and Otherwise
Date: 23 Oct, 2013
From: Matthew Dimmock <Matthew Dimmock>

Hi,

I am simulating an ionisation chamber with a uniform electric field.

I have written a ElectricFieldSetup class that copies the code of "geant4.9.6.p01/examples/extended/field/field03/src/F03FieldSetup.cc" so that I can attach the local E-field to a logical volume in my "DetectorConstruction.cc" file.

As I want an electric field (and not a magnetic field that is in the example field03) I have modified the "F03FieldSetup.cc" file (which I call "ElectricFieldSetup.cc") in the appropriate places so that the description of the field emulates that in "geant4.9.6.p01/examples/extended/field/field02/src/F02ElectricFieldSetup.cc" and I have global and local versions of the field.

Also, I am using the following commands in my macro,

/testem/phys/addPhysics option /testem/phys/setGCut 1.0 mm /testem/phys/setECut 1.0 mm /cuts/setLowEdge 250 eV # /run/initialize # /process/em/deexcitation world true true true /process/em/pixe true /process/em/auger true /process/em/fluo true /process/em/pixeXSmodel /process/eLoss/minKinEnergy 100 eV # /field/setStepperType 4 /field/setMinStep 0.5 mm /field/update

Everything compiles and runs. Then I add the lines "ElectricFieldSetup* em_field_setup = new ElectricFieldSetup();" to my "DetectorConstruction()" constructor and "if (em_field_setup) delete em_field_setup;" to my "~DetectorConstruction()" destructor. I have not attached to a logical volume in anyway, all I have done is include these lines in the detector constructor.

Next I run the code at a couple of different incident X-ray energies. Anything below 150 keV works fine and runs. As soon as I go above 160 keV the code gets stuck in an infinite loop every time. I have output the lines from the verbose tracking command below. Any help or guidance on how to debug this would be appreciated.

*********************************************************************************************************
* G4Track Information:   Particle = gamma,   Track ID = 1,   Parent ID = 0
*********************************************************************************************************

Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng TrackLeng  NextVolume ProcName
    0     -0.5    -2.28      -79     0.175        0        0         0    exp_hall initStep
    1     -0.5    -2.28      -69     0.175        0       10        10 ion_cham__sens_phys Transportation
    2     -0.5    -2.28      -69     0.175        0    0.005        10 ion_cham_layer_param_phys Transportation
    3     -0.5    -2.28        6     0.175        0       75        85 ion_cham__sens_phys Transportation
    4     -0.5    -2.28        6     0.175        0    0.005        85 ion_cham_layer_param_phys Transportation
    5     -0.5    -2.28       26     0.175        0       20       105 ion_cham__sens_phys Transportation
    6     -0.5    -2.28       26     0.175        0    0.005       105 ion_cham_layer_param_phys Transportation
    7     -0.5    -2.28       69     0.175        0       43       148 ion_cham__sens_phys Transportation
    8     -0.5    -2.28       69     0.175        0    0.005       148    exp_hall Transportation
    9     -0.5    -2.28    1e+03     0.175        0      931  1.08e+03  OutOfWorld Transportation

*********************************************************************************************************
* G4Track Information:   Particle = gamma,   Track ID = 1,   Parent ID = 0
*********************************************************************************************************

Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng TrackLeng  NextVolume ProcName
    0    -2.23   -0.364      -79     0.175        0        0         0    exp_hall initStep
    1    -2.23   -0.364      -69     0.175        0       10        10 ion_cham__sens_phys Transportation
    2    -2.23   -0.364      -69     0.175        0    0.005        10 ion_cham_layer_param_phys Transportation
    3    -2.23   -0.364        6     0.175        0       75        85 ion_cham__sens_phys Transportation
    4    -2.23   -0.364        6     0.175        0    0.005        85 ion_cham_layer_param_phys Transportation
    5    -2.23   -0.364       26     0.175        0       20       105 ion_cham__sens_phys Transportation
    6    -2.23   -0.364       26     0.175        0    0.005       105 ion_cham_layer_param_phys Transportation
    7    -2.23   -0.364       69     0.175        0       43       148 ion_cham__sens_phys Transportation
    8    -2.23   -0.364       69     0.175        0    0.005       148    exp_hall Transportation
    9    -2.23   -0.364    1e+03     0.175        0      931  1.08e+03  OutOfWorld Transportation

*********************************************************************************************************
* G4Track Information:   Particle = gamma,   Track ID = 1,   Parent ID = 0
*********************************************************************************************************

Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng TrackLeng  NextVolume ProcName
    0   -0.952   -0.618      -79     0.175        0        0         0    exp_hall initStep
    1   -0.952   -0.618      -69     0.175        0       10        10 ion_cham__sens_phys Transportation
    2   -0.952   -0.618      -69     0.175        0    0.005        10 ion_cham_layer_param_phys Transportation
    3   -0.952   -0.618     3.74         0 2.83e-05     72.7      82.7 ion_cham_layer_param_phys phot

*********************************************************************************************************
* G4Track Information:   Particle = e-,   Track ID = 3,   Parent ID = 1
*********************************************************************************************************

Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng TrackLeng  NextVolume ProcName
    0   -0.952   -0.618     3.74  0.000509        0        0         0 ion_cham_layer_param_phys initStep
    1   -0.951   -0.623     3.75         0 0.000509   0.0188    0.0188 ion_cham_layer_param_phys eIoni

*********************************************************************************************************
* G4Track Information:   Particle = e-,   Track ID = 2,   Parent ID = 1
*********************************************************************************************************

Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng TrackLeng  NextVolume ProcName
    0   -0.952   -0.618     3.74     0.174        0        0         0 ion_cham_layer_param_phys initStep
    1   -0.756    -1.95        6     0.174 0.000382     2.64      2.64 ion_cham__sens_phys Transportation
    2   -0.756    -1.95        6     0.174        0 -1.13e+25 -1.13e+25 ion_cham__sens_phys eIoni
    3   -0.756    -1.95        6     0.174        0 -1.13e+25 -2.26e+25 ion_cham__sens_phys eIoni
    4   -0.756    -1.95        6     0.174        0 -1.13e+25 -3.38e+25 ion_cham__sens_phys eIoni
    5   -0.756    -1.95        6     0.174        0 -1.13e+25 -4.51e+25 ion_cham__sens_phys eIoni
    6   -0.756    -1.95        6     0.174        0 -1.13e+25 -5.64e+25 ion_cham__sens_phys eIoni
    7   -0.756    -1.95        6     0.174        0 -1.13e+25 -6.77e+25 ion_cham__sens_phys eIoni
    8   -0.756    -1.95        6     0.174        0 -1.13e+25 -7.89e+25 ion_cham__sens_phys eIoni
    9   -0.756    -1.95        6     0.174        0 -1.13e+25 -9.02e+25 ion_cham__sens_phys eIoni
   10   -0.756    -1.95        6     0.174        0 -1.13e+25 -1.01e+26 ion_cham__sens_phys eIoni
   11   -0.756    -1.95        6     0.174        0 -1.13e+25 -1.13e+26 ion_cham__sens_phys eIoni
   12   -0.756    -1.95        6     0.174        0 -1.13e+25 -1.24e+26 ion_cham__sens_phys eIoni
   13   -0.756    -1.95        6     0.174        0 -1.13e+25 -1.35e+26 ion_cham__sens_phys eIoni
   14   -0.756    -1.95        6     0.174        0 -1.13e+25 -1.47e+26 ion_cham__sens_phys eIoni
   15   -0.756    -1.95        6     0.174        0 -1.13e+25 -1.58e+26 ion_cham__sens_phys eIoni
   16   -0.756    -1.95        6     0.174        0 -1.13e+25 -1.69e+26 ion_cham__sens_phys eIoni
   17   -0.756    -1.95        6     0.174        0 -1.13e+25  -1.8e+26 ion_cham__sens_phys eIoni
   18   -0.756    -1.95        6     0.174        0 -1.13e+25 -1.92e+26 ion_cham__sens_phys eIoni
   19   -0.756    -1.95        6     0.174        0 -1.13e+25 -2.03e+26 ion_cham__sens_phys eIoni
   20   -0.756    -1.95        6     0.174        0 -1.13e+25 -2.14e+26 ion_cham__sens_phys eIoni
   21   -0.756    -1.95        6     0.174        0 -1.13e+25 -2.26e+26 ion_cham__sens_phys eIoni
   22   -0.756    -1.95        6     0.174        0 -1.13e+25 -2.37e+26 ion_cham__sens_phys eIoni
   23   -0.756    -1.95        6     0.174        0 -1.13e+25 -2.48e+26 ion_cham__sens_phys eIoni
   24   -0.756    -1.95        6     0.174        0 -1.13e+25 -2.59e+26 ion_cham__sens_phys eIoni
   25   -0.756    -1.95        6     0.174        0 -1.13e+25 -2.71e+26 ion_cham__sens_phys eIoni
   26   -0.756    -1.95        6     0.174        0 -1.13e+25 -2.82e+26 ion_cham__sens_phys eIoni
   27   -0.756    -1.95        6     0.174        0 -1.13e+25 -2.93e+26 ion_cham__sens_phys eIoni
   28   -0.756    -1.95        6     0.174        0 -1.13e+25 -3.04e+26 ion_cham__sens_phys eIoni
   29   -0.756    -1.95        6     0.174        0 -1.13e+25 -3.16e+26 ion_cham__sens_phys eIoni
   30   -0.756    -1.95        6     0.174        0 -1.13e+25 -3.27e+26 ion_cham__sens_phys eIoni
   31   -0.756    -1.95        6     0.174        0 -1.13e+25 -3.38e+26 ion_cham__sens_phys eIoni
   32   -0.756    -1.95        6     0.174        0 -1.13e+25  -3.5e+26 ion_cham__sens_phys eIoni
   33   -0.756    -1.95        6     0.174        0 -1.13e+25 -3.61e+26 ion_cham__sens_phys eIoni
   34   -0.756    -1.95        6     0.174        0 -1.13e+25 -3.72e+26 ion_cham__sens_phys eIoni
   35   -0.756    -1.95        6     0.174        0 -1.13e+25 -3.83e+26 ion_cham__sens_phys eIoni
   36   -0.756    -1.95        6     0.174        0 -1.13e+25 -3.95e+26 ion_cham__sens_phys eIoni
   37   -0.756    -1.95        6     0.174        0 -1.13e+25 -4.06e+26 ion_cham__sens_phys eIoni
   38   -0.756    -1.95        6     0.174        0 -1.13e+25 -4.17e+26 ion_cham__sens_phys eIoni
   39   -0.756    -1.95        6     0.174        0 -1.13e+25 -4.29e+26 ion_cham__sens_phys eIoni
   40   -0.756    -1.95        6     0.174        0 -1.13e+25  -4.4e+26 ion_cham__sens_phys eIoni
   41   -0.756    -1.95        6     0.174        0 -1.13e+25 -4.51e+26 ion_cham__sens_phys eIoni
   42   -0.756    -1.95        6     0.174        0 -1.13e+25 -4.62e+26 ion_cham__sens_phys eIoni
   43   -0.756    -1.95        6     0.174        0 -1.13e+25 -4.74e+26 ion_cham__sens_phys eIoni
   44   -0.756    -1.95        6     0.174        0 -1.13e+25 -4.85e+26 ion_cham__sens_phys eIoni
   45   -0.756    -1.95        6     0.174        0 -1.13e+25 -4.96e+26 ion_cham__sens_phys eIoni
   46   -0.756    -1.95        6     0.174        0 -1.13e+25 -5.07e+26 ion_cham__sens_phys eIoni
   47   -0.756    -1.95        6     0.174        0 -1.13e+25 -5.19e+26 ion_cham__sens_phys eIoni
   48   -0.756    -1.95        6     0.174        0 -1.13e+25  -5.3e+26 ion_cham__sens_phys eIoni
   49   -0.756    -1.95        6     0.174        0 -1.13e+25 -5.41e+26 ion_cham__sens_phys eIoni
   50   -0.756    -1.95        6     0.174        0 -1.13e+25 -5.53e+26 ion_cham__sens_phys eIoni
   51   -0.756    -1.95        6     0.174        0 -1.13e+25 -5.64e+26 ion_cham__sens_phys eIoni
   52   -0.756    -1.95        6     0.174        0 -1.13e+25 -5.75e+26 ion_cham__sens_phys eIoni
   53   -0.756    -1.95        6     0.174        0 -1.13e+25 -5.86e+26 ion_cham__sens_phys eIoni
   54   -0.756    -1.95        6     0.174        0 -1.13e+25 -5.98e+26 ion_cham__sens_phys eIoni
   55   -0.756    -1.95        6     0.174        0 -1.13e+25 -6.09e+26 ion_cham__sens_phys eIoni
   56   -0.756    -1.95        6     0.174        0 -1.13e+25  -6.2e+26 ion_cham__sens_phys eIoni
   57   -0.756    -1.95        6     0.174        0 -1.13e+25 -6.32e+26 ion_cham__sens_phys eIoni
   58   -0.756    -1.95        6     0.174        0 -1.13e+25 -6.43e+26 ion_cham__sens_phys eIoni
   59   -0.756    -1.95        6     0.174        0 -1.13e+25 -6.54e+26 ion_cham__sens_phys eIoni
   60   -0.756    -1.95        6     0.174        0 -1.13e+25 -6.65e+26 ion_cham__sens_phys eIoni
   61   -0.756    -1.95        6     0.174        0 -1.13e+25 -6.77e+26 ion_cham__sens_phys eIoni
   62   -0.756    -1.95        6     0.174        0 -1.13e+25 -6.88e+26 ion_cham__sens_phys eIoni
   63   -0.756    -1.95        6     0.174        0 -1.13e+25 -6.99e+26 ion_cham__sens_phys eIoni
   64   -0.756    -1.95        6     0.174        0 -1.13e+25  -7.1e+26 ion_cham__sens_phys eIoni
   65   -0.756    -1.95        6     0.174        0 -1.13e+25 -7.22e+26 ion_cham__sens_phys eIoni
   66   -0.756    -1.95        6     0.174        0 -1.13e+25 -7.33e+26 ion_cham__sens_phys eIoni
   67   -0.756    -1.95        6     0.174        0 -1.13e+25 -7.44e+26 ion_cham__sens_phys eIoni
   68   -0.756    -1.95        6     0.174        0 -1.13e+25 -7.56e+26 ion_cham__sens_phys eIoni
   69   -0.756    -1.95        6     0.174        0 -1.13e+25 -7.67e+26 ion_cham__sens_phys eIoni
   70   -0.756    -1.95        6     0.174        0 -1.13e+25 -7.78e+26 ion_cham__sens_phys eIoni
   71   -0.756    -1.95        6     0.174        0 -1.13e+25 -7.89e+26 ion_cham__sens_phys eIoni
   72   -0.756    -1.95        6     0.174        0 -1.13e+25 -8.01e+26 ion_cham__sens_phys eIoni
   73   -0.756    -1.95        6     0.174        0 -1.13e+25 -8.12e+26 ion_cham__sens_phys eIoni
   74   -0.756    -1.95        6     0.174        0 -1.13e+25 -8.23e+26 ion_cham__sens_phys eIoni
   75   -0.756    -1.95        6     0.174        0 -1.13e+25 -8.35e+26 ion_cham__sens_phys eIoni
   76   -0.756    -1.95        6     0.174        0 -1.13e+25 -8.46e+26 ion_cham__sens_phys eIoni
   77   -0.756    -1.95        6     0.174        0 -1.13e+25 -8.57e+26 ion_cham__sens_phys eIoni
   78   -0.756    -1.95        6     0.174        0 -1.13e+25 -8.68e+26 ion_cham__sens_phys eIoni
   79   -0.756    -1.95        6     0.174        0 -1.13e+25  -8.8e+26 ion_cham__sens_phys eIoni
   80   -0.756    -1.95        6     0.174        0 -1.13e+25 -8.91e+26 ion_cham__sens_phys eIoni
   81   -0.756    -1.95        6     0.174        0 -1.13e+25 -9.02e+26 ion_cham__sens_phys eIoni
   82   -0.756    -1.95        6     0.174        0 -1.13e+25 -9.13e+26 ion_cham__sens_phys eIoni
   83   -0.756    -1.95        6     0.174        0 -1.13e+25 -9.25e+26 ion_cham__sens_phys eIoni
   84   -0.756    -1.95        6     0.174        0 -1.13e+25 -9.36e+26 ion_cham__sens_phys eIoni
   85   -0.756    -1.95        6     0.174        0 -1.13e+25 -9.47e+26 ion_cham__sens_phys eIoni
   86   -0.756    -1.95        6     0.174        0 -1.13e+25 -9.59e+26 ion_cham__sens_phys eIoni
   87   -0.756    -1.95        6     0.174        0 -1.13e+25  -9.7e+26 ion_cham__sens_phys eIoni
   88   -0.756    -1.95        6     0.174        0 -1.13e+25 -9.81e+26 ion_cham__sens_phys eIoni
   89   -0.756    -1.95        6     0.174        0 -1.13e+25 -9.92e+26 ion_cham__sens_phys eIoni
   90   -0.756    -1.95        6     0.174        0 -1.13e+25    -1e+27 ion_cham__sens_phys eIoni
   91   -0.756    -1.95        6     0.174        0 -1.13e+25 -1.01e+27 ion_cham__sens_phys eIoni
   92   -0.756    -1.95        6     0.174        0 -1.13e+25 -1.03e+27 ion_cham__sens_phys eIoni
   93   -0.756    -1.95        6     0.174        0 -1.13e+25 -1.04e+27 ion_cham__sens_phys eIoni
   94   -0.756    -1.95        6     0.174        0 -1.13e+25 -1.05e+27 ion_cham__sens_phys eIoni
   95   -0.756    -1.95        6     0.174        0 -1.13e+25 -1.06e+27 ion_cham__sens_phys eIoni
   96   -0.756    -1.95        6     0.174        0 -1.13e+25 -1.07e+27 ion_cham__sens_phys eIoni
   97   -0.756    -1.95        6     0.174        0 -1.13e+25 -1.08e+27 ion_cham__sens_phys eIoni
   98   -0.756    -1.95        6     0.174        0 -1.13e+25 -1.09e+27 ion_cham__sens_phys eIoni
   99   -0.756    -1.95        6     0.174        0 -1.13e+25 -1.11e+27 ion_cham__sens_phys eIoni
  100   -0.756    -1.95        6     0.174        0 -1.13e+25 -1.12e+27 ion_cham__sens_phys eIoni
  101   -0.756    -1.95        6     0.174        0 -1.13e+25 -1.13e+27 ion_cham__sens_phys eIoni
  102   -0.756    -1.95        6     0.174        0 -1.13e+25 -1.14e+27 ion_cham__sens_phys eIoni
  103   -0.756    -1.95        6     0.174        0 -1.13e+25 -1.15e+27 ion_cham__sens_phys eIoni
  104   -0.756    -1.95        6     0.174        0 -1.13e+25 -1.16e+27 ion_cham__sens_phys eIoni
  105   -0.756    -1.95        6     0.174        0 -1.13e+25 -1.17e+27 ion_cham__sens_phys eIoni
  106   -0.756    -1.95        6     0.174        0 -1.13e+25 -1.18e+27 ion_cham__sens_phys eIoni
  107   -0.756    -1.95        6     0.174        0 -1.13e+25  -1.2e+27 ion_cham__sens_phys eIoni
  108   -0.756    -1.95        6     0.174        0 -1.13e+25 -1.21e+27 ion_cham__sens_phys eIoni
  109   -0.756    -1.95        6     0.174        0 -1.13e+25 -1.22e+27 ion_cham__sens_phys eIoni
  110   -0.756    -1.95        6     0.174        0 -1.13e+25 -1.23e+27 ion_cham__sens_phys eIoni
.
.
.
.
REPEATED MANY MANY TIMES
.
.
.
.
.
.
.
.
.
.
.
.
.
.

. . . . . . .

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Feedback: Re: Infinite loop with G4UniformElectricField   (Gumplinger Peter - 24 Oct, 2013)
 Add Message Add Message
to: "Infinite loop with G4UniformElectricField"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]