| Summary: | G4NeutronHPThermalScattering: strange angular behaviour - confirm issue 1856 | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | andreimorozov |
| Component: | processes/hadronic/models/neutron_hp | Assignee: | dennis.herbert.wright |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | andreimorozov, michel.maire, sergio.losilla, Vladimir.Ivantchenko |
| Priority: | P4 | ||
| Version: | 10.6 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Attachments: | Fix patch | ||
|
Description
andreimorozov
2020-11-12 11:52:03 CET
see also user forum : https://geant4-forum.web.cern.ch/t/neutronhpthermalscattering-strange-angular-behaviour/3796/2 Hello, The bug in final state rotation is fixed and the fix will be available in the new release and in the 1st patch to 10.7. It would be good to check if this fix resolve the problem. Because the fix is limited, I can send fixed class privately. VI Hello Vladimir, Please send me the fixed class, I will check. An important issue: how about the issue 1856? Was it the same bug? My test was that: a high-energy neutron slows down in paraffin and as soon as its energy is in the range of the TS model, the Z component of the momentum is 0 after the first scattering event. Since the original direction of the neutron is random, it looks like a separate bug (not just the missing randomization around the axis – in that test the axis should have non-zero Z component itself). I think if it is not the same bug, it will not be possible for me to check that issue mentioned above after your fix: due to randomization of the phi angle, the Z component will not be zero anymore. Regards, Andrey It appears that this is the same bug as in 1856. That report however, was for Geant4 9.1 which is quite old. It looks like I bumped into the same issue: https://bugzilla-geant4.kek.jp/show_bug.cgi?id=2307 Vladimir, I patched the code myself and verified that it fixes the issue. I suspect that my patch and the current fix are the same, but you might want to double check. I am not sure this is the same error that was reported in #1856, since this worked fine in 10.5. I guess we'll never know... Hello Sergio, would you show how you fix the problem? For example, in attachment or copy lines of code, which you introduced? Vladimir Sure, I attached the patch to the other thread, that is what I meant. I will upload it here as well. Created attachment 659 [details]
Fix patch
Hello Sergio, thank you for the patch. It is type of solution we had in past and what we do not want to have anymore - forced rotation of final state at the level of the elastic process. The update introduced two years ago was introduced in order to remove final state rotation from the process class and left rotation in each model class. The reasons: - any model level test requires correct kinematics, so phi should be randomly sampled inside each model in order to be tested; - external models integrated to Geant4 should already have final state rotation implemented; - model may depend on spin direction, which cannot work in past, because forced rotation kills such model. Problem was that when I made this migration thermal scattering model was overlooked - all other models were fine. Now the bug in the thermal model is fixed. Vladimir Aaah, I see! Thank you for the thorough explanation. So my "fix" addressed thermal elastic scattering but broke everything else (or best case uselessly re-randomized around Z), nice ;-) Indeed your explanation makes sense, since the only issues we observed were with the thermal neutron fluences. Looking forward to 10.7.1 then! There is nothing wrong in your fix - small overhead will have invisible effect on CPU. But for the long term we want another solution. Cheers, Vladimir Hello, the bug was fixed and the fix is already inside 10.7p01. Vladimir Problem has been fixed and is now part of Geant4 10.7 patch01. |