Problem 2441

Summary: Hadr01: Error in logic for forward/backward/side leaking histograms
Product: Examples/Extended Reporter: Ben Brunt <ben.brunt>
Component: hadronic/Hadr00,01,02Assignee: Vladimir.Ivantchenko
Status: RESOLVED FIXED    
Severity: normal    
Priority: P4    
Version: 10.7   
Hardware: All   
OS: All   

Description Ben Brunt 2021-10-28 12:26:57 CEST
Version: running in v10.7.2. Appears unchanged in github master.

Example Hadr01, running the hadr01.in macro.

The forward-leaked and backward-leaked neutron histograms (h16 and h17) are unfilled, owing to a problem in the definition of forward/backward/side leaking particles. The missing events are wrongly filled into the side-leaking histogram.

The problem is in HistoManager::AddLeakingParticle() (src/HistoManager.cc). 
The test for backward neutrons is z > -fAbsZ0 (the target half-length), where the position is taken from the pre-step point.
For the exit step, we have pre-step z == -fAbsZ0, so the test fails.
The test for side-leaking is abs(z) <= -fAbsZ0, so this test passes and the side-leaking histogram is filled.

Possible solution: take the position from the post-step point (which is on the surface of the check-volume, outside the target), or .5*(prestep + poststep)?

Thanks!
Ben
Comment 1 Vladimir.Ivantchenko 2021-11-17 12:20:29 CET
Hello,

thank you very much for pointing to the problem. The fix will be available in the next public release 11.0 and in the patch-03 for 10.7. The fix is different from your proposal - geometry tolerance is added and the check where is an exit point is done more accurately. Your proposal would also work. 

VI