Hello
I’m not sure if this is correct section for posting this, but I don’t know what causes this bug, perhaps physical models are involved.
I was working with “chem5” example and discovered that under some conditions electrons ignored boundary between “World” and “OutOfWorld” regions and kept travelling out of world volume for awhile. This bug appeard to me both in 10.5.p01 and 10.6 versions.
How to reproduce the bug:
- Use chem5 example of 10.6 version of Geant4.
- Go to DetectorConstruction.cc file and make world volume be spheroid with semiaxis of 5 micrometers along XY and 1 micrometer along Z.
- Go to PrimaryGeneratorAction.cc file (or beam.in) and make primary particles be electrons with coordinates (-0.0024, -0.0019, 0.00023), energy of 884 keV and momentum direction of (0.,0.,1.)
- Add “SteppingAction” to chem5 project (to check with it if any particles appear outside of world volume). So you need to put SteppingAction.hh in “include” folder and SteppingAction.cc in “src” folder. You also need to activate this SteppingAction in “ActionInitialization.cc” file by adding line “SetUserAction(new SteppingAction())” at the end.
- Add to SteppingAction.cc file condition that checks if particle is inside world volume using particle’s coordinates and equation for spheroid.
If you execute this changed version of chem5 you will also see a lot of exception messages:
*** G4Exception : OUTSIDE_OF_MOTHER_VOLUME
issued by : G4DNAMolecularDissociation::DecayIt()
The decayed product is outside of the volume : World
Modified versions of files are attached, so you can paste them in chem5 project without making 1-5 actions listed above. (!)Can’t attach “beam.in” file, attaching “beam.txt” instead, you need to rename it to “beam.in”.
beam.txt (285 Bytes) ActionInitialization.cc (3.5 KB) DetectorConstruction.cc (5.2 KB) PrimaryGeneratorAction.cc (3.8 KB) SteppingAction.cc (1.4 KB) SteppingAction.hh (263 Bytes)