G4Exception when simulating deuterium target in Hadr03

Dear all,

I encountered a problem with the example extended/hadronic/Hadr03.

In the example particles are shot into a target of a specified material, but events are aborted after the first interaction by calling G4RunManager::GetRunManager()->AbortEvent(); in src/SteppingAction.cc. Since I was interested in cascades and follow-up reactions, I removed this line and ran the simulations again, but did not make any other changes to the code.

In most cases the simulation was fine. However, I encountered problems when I defined deuterium as a target material. The following G4Exceptions are thrown countless times:

G4WT9 > G4VParticleChange::CheckSecondary : the Momentum direction is not unit vector !! Difference: 1
G4WT9 > deuteron E=2.27374e-13 pos=-4.10581, 0.798233, -1.56382
G4WT9 >
-------- EEEE ------- G4Exception-START -------- EEEE -------
*** G4Exception : TRACK001
issued by : G4VParticleChange::CheckSecondary
Secondary with illegal energy/momentum
*** Event Must Be Aborted ***
G4WT9 > G4Track (0x7f189c3f4ed0) - track ID = 17721, parent ID = 17711
G4WT9 > Particle type : deuteron - creator process : hadElastic, creator model : Undefined
G4WT9 > Kinetic energy : 1.13687e-06 eV - Momentum direction : (0.984906,0.117251,0.127329)
G4WT9 > Step length : 10.7009 cm - total energy deposit : 0 eV
G4WT9 > Pre-step point : (-4211.21,785.686,-1577.44) - Physical volume : H2 (H2)
G4WT9 > - defined by : hadElastic - step status : 4
G4WT9 > Post-step point : (-4105.81,798.233,-1563.82) - Physical volume : H2 (H2)
G4WT9 > - defined by : hadElastic - step status : 4
G4WT9 > *** Note: Step information might not be properly updated.
G4WT9 >
-------- EEEE -------- G4Exception-END --------- EEEE -------

G4WT9 > -----------------------------------------------
G4WT9 > G4ParticleChange Information
G4WT9 > -----------------------------------------------
G4WT9 > # of 2ndaries : 0
G4WT9 > -----------------------------------------------
G4WT9 > Energy Deposit (MeV): 0
G4WT9 > Non-ionizing Energy Deposit (MeV): 0
G4WT9 > Track Status : Alive
G4WT9 > True Path Length (mm) : 107
G4WT9 > Stepping Control : 0
G4WT9 > Mass (GeV) : 1.88
G4WT9 > Charge (eplus) : 1
G4WT9 > MagneticMoment : 2.7e-11
G4WT9 > : = 1.71*[e hbar]/[2 m]
G4WT9 > Position - x (mm) : -4.11e+03
G4WT9 > Position - y (mm) : 798
G4WT9 > Position - z (mm) : -1.56e+03
G4WT9 > Time (ns) : 2.39e+07
G4WT9 > Proper Time (ns) : 2.39e+07
G4WT9 > Momentum Direct - x : 0.985
G4WT9 > Momentum Direct - y : 0.117
G4WT9 > Momentum Direct - z : 0.127
G4WT9 > Kinetic Energy (MeV): 1.14e-12
G4WT9 > Velocity (/c): 3.48e-08
G4WT9 > Polarization - x : 0
G4WT9 > Polarization - y : 0
G4WT9 > Polarization - z : 0

The application then quits with a segfault before showing the reaction summary it normally displays. I do not quite understand how to interpret these messages or where they come from. I assume that recoil deuterons interact with deuterium nuclei in the target material and this interaction causes problems.

Do you know how to resolve these errors? Thank you in advance,

Stefan

Hi Stefan,

I encountered kind of same problems with yours. Did you solve this?

ZZ

Hi ZZ,

unfortunately I never managed to solve the issue.
From other threads I got the impression that G4 has some general difficulties with deuterium cross-sections, but this is as far as I got.

Stefan

Hello,

The problem seems to be connected with small primary energy of deuteron, which provoke numerical problem in sampling of final state. It seems that similar problem was some time ago and was fixed. What version of Geant4 you are using?

VI

Hello,

the problem occurred with Geant4 version 10.06

Stefan

I’m encountering a similar issue, however, my application doesn’t stop with a segmentation fault it rather continues without reporting the event, as it is shown in the following text.
My application is an edit of the advanced/radioprotection example and I’m using the version 10.6 as well.
Any further explanation of this issue will be very helpful. Thank you

G4WT0 >  G4VParticleChange::CheckSecondary  :   the Momentum direction is not unit vector !!   Difference:  1
G4WT0 > Al27 E=3.63798e-12 pos=-0.592576, -0.411077, 0.327185
G4WT0 >
-------- EEEE ------- G4Exception-START -------- EEEE -------
*** G4Exception : TRACK001
      issued by : G4VParticleChange::CheckSecondary
Secondary with illegal energy/momentum
*** Event Must Be Aborted ***
G4WT0 > G4Track (0x7fd8513c5d80) - track ID = 938, parent ID = 1
G4WT0 >  Particle type : Li7 - creator process : ionInelastic, creator model : Undefined
G4WT0 >  Kinetic energy : 20.5728 GeV - Momentum direction : (-0.883039,0.0352804,0.467972)
G4WT0 >  Step length : 7.91618 mm  - total energy deposit : 27.6198 MeV
G4WT0 >  Pre-step point : (-585.585,-411.36,323.482) - Physical volume : Cylinder_phys (G4_Al)
G4WT0 >  - defined by : ionIoni - step status : 4
G4WT0 >  Post-step point : (-592.576,-411.077,327.185) - Physical volume : Cylinder_phys (G4_Al)
G4WT0 >  - defined by : ionElastic - step status : 4
G4WT0 >  *** Note: Step information might not be properly updated.
G4WT0 >
-------- EEEE -------- G4Exception-END --------- EEEE -------

G4WT0 >       -----------------------------------------------
G4WT0 >         G4ParticleChange Information
G4WT0 >       -----------------------------------------------
G4WT0 >         # of 2ndaries       :                    0
G4WT0 >       -----------------------------------------------
G4WT0 >         Energy Deposit (MeV):                    0
G4WT0 >         Non-ionizing Energy Deposit (MeV):                    0
G4WT0 >         Track Status        :                Alive
G4WT0 >         True Path Length (mm) :                 7.92
G4WT0 >         Stepping Control      :                    0
G4WT0 >         Mass (GeV)   :                 6.53
G4WT0 >         Charge (eplus)   :                    3
G4WT0 >         MagneticMoment   :             1.03e-10
G4WT0 >                 :  =                 22.7*[e hbar]/[2 m]
G4WT0 >         Position - x (mm)   :                 -593
G4WT0 >         Position - y (mm)   :                 -411
G4WT0 >         Position - z (mm)   :                  327
G4WT0 >         Time (ns)           :                 4.43
G4WT0 >         Proper Time (ns)    :                 1.06
G4WT0 >         Momentum Direct - x :               -0.883
G4WT0 >         Momentum Direct - y :               0.0353
G4WT0 >         Momentum Direct - z :                0.468
G4WT0 >         Kinetic Energy (MeV):             2.06e+04
G4WT0 >         Velocity  (/c):                0.971
G4WT0 >         Polarization - x    :                    0
G4WT0 >         Polarization - y    :                    0
G4WT0 >         Polarization - z    :                    0