u-eff-gee / utr

GEANT4 simulation of the Upper Target Room (UTR) at the HIGS facility
GNU General Public License v3.0
6 stars 11 forks source link

momentum, energy, and/or time was illegal #21

Closed MSchilling7 closed 5 years ago

MSchilling7 commented 5 years ago

I have found that some events are "illegal". Udo suggested to issue a bug report with the error message. The part of utr that produced this "illegal" particle/event was the DHIPS_2019 setup with the B11_RSA Target. I did a simulation of an angular distribution, please find attached the macro I used(ang.txt).

Finally the error message:

G4WT14 > G4ParticleChange::CheckIt : the local time goes back !! Difference: 0.00119104[ns] G4WT14 > e+ E=1.41215 pos=0.121716, 0.113218, -0.0497645 global time=1.74214 local time=0.749367 proper time=0.196003 G4WT14 > G4ParticleChange::CheckIt : the proper time goes back !! Difference: 0.000316472[ns] G4WT14 > e+ E=1.41215 pos=0.121716, 0.113218, -0.0497645 global time=1.74214 local time=0.749367 proper time=0.196003 G4WT14 > ----------------------------------------------- G4WT14 > G4ParticleChange Information
G4WT14 > ----------------------------------------------- G4WT14 > # of 2ndaries : 0 G4WT14 > ----------------------------------------------- G4WT14 > Energy Deposit (MeV): 0 G4WT14 > Non-ionizing Energy Deposit (MeV): 0 G4WT14 > Track Status : Alive G4WT14 > True Path Length (mm) : -0.344 G4WT14 > Stepping Control : 0 G4WT14 > Mass (GeV) : 0 G4WT14 > Charge (eplus) : 0 G4WT14 > MagneticMoment : 0 G4WT14 > : = 0*[e hbar]/[2 m] G4WT14 > Position - x (mm) : 121 G4WT14 > Position - y (mm) : 113 G4WT14 > Position - z (mm) : -49.6 G4WT14 > Time (ns) : 0.748 G4WT14 > Proper Time (ns) : 0.196 G4WT14 > Momentum Direct - x : 0.93 G4WT14 > Momentum Direct - y : -0.115 G4WT14 > Momentum Direct - z : -0.349 G4WT14 > Kinetic Energy (MeV): 1.41 G4WT14 > Velocity (/c): 0.964 G4WT14 > Polarization - x : 0 G4WT14 > Polarization - y : 0 G4WT14 > Polarization - z : 0 G4WT14 > Touchable (pointer) : 0x7f345c9dec50 G4WT14 > -------- EEEE ------- G4Exception-START -------- EEEE ------- G4Exception : TRACK003 issued by : G4ParticleChange::CheckIt momentum, energy, and/or time was illegal Event Must Be Aborted G4WT14 > G4Track (0x7f345c9c3210) - track ID = 3, parent ID = 1 G4WT14 > Particle type : e+ - creator process : conv, creator model : conv G4WT14 > Kinetic energy : 1.41215 MeV - Momentum direction : (0.930072,-0.114811,-0.348977) G4WT14 > Step length : -344.225 um - total energy deposit : 0 eV G4WT14 > Pre-step point : (121.716,113.218,-49.7645) - Physical volume : World (G4_AIR) G4WT14 > - defined by : msc - step status : 3 G4WT14 > Post-step point : (121.396,113.257,-49.6444) - Physical volume : World (G4_AIR) G4WT14 > - defined by : msc - step status : 3 G4WT14 > Note: Step information might not be properly updated. G4WT14 > -------- EEEE -------- G4Exception-END ---------

Cheers, Marcel

u-eff-gee commented 5 years ago

Thank you for spotting this issue. It seems to be caused by an error in the geometry. It can be easily reproduced by launching particles from the position

G4WT14 > Position - x (mm) : 121
G4WT14 > Position - y (mm) : 113
G4WT14 > Position - z (mm) : -49.6

and with the momentum vector

G4WT14 > Momentum Direct - x : 0.93
G4WT14 > Momentum Direct - y : -0.115
G4WT14 > Momentum Direct - z : -0.349

given in the error message above. Especially the x- and z-position seem to matter. At this position, there is the collimator entrance of one of the detectors, which is a relatively complicated solid. Seems to be a geometry issue.

MSchilling7 commented 5 years ago

I implemented this lead brick without G4GenericTrap and simulated 10000000 e- with position and direction you mentioned. No "illegal event" occured in this simulation.

u-eff-gee commented 5 years ago

Solved in 4b391f3b56fe854fa377b7e8fd69f9a57c09edfd