-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optical photons no longer reflect as expected #158
Comments
|
The issue lives somewhere in here: sbujlab@b4d61da (plus the following commit fixes 2 errors I introduced in merge) |
|
The bug lives specifically in between commits b8fec16 and 8bc00f7 The 14 commits in between those two do not successfully compile for me, so I cannot say which commit introduces the exact issue. I have made two new branches, one that still works, and the other that does not, and I include in those branches everything required for exemplifying this problem (in visualizer). To replicate this intended behavior/the bug in https://github.com/JeffersonLab/remoll/tree/bugfix-opticalReflections or https://github.com/JeffersonLab/remoll/tree/bugfix-opticalReflections-broken respectively please compile remoll as normal; ./build/remoll; and then from within the gui |
|
This is the entire cause of the bug: Line 124 in 2440574
Including the parallel world physics list kills optical photons ability to interact properly (and may affect other physics processes as well, possibly related to Rakitha's issue?) Commenting out that one line fixes the optical physics problem. Would it be possible to move the parallel world physics registering line to the remollPhysicsList.cc program (and give it some turn on/off macro commands, like the other physics lists?) |
|
I moved the parallel world physics list to remollPhysicsList.cc, but I don't know how to check that I didn't break it in the process. |
|
@wdconinc - Unfortunately my approach to fixing this issue by making parallel world physics optional does not fix the problem that optical physics breaks when parallel physics is enabled. This means that the pion_optical_response.mac macro is broken and cannot work (though it was already broken before I tried fixing things anyway). What should we do? Allow parallel physics to break optical, or see if there is some more detailed solution and try to make them work simultaneously? Also, Rakitha found his bug with the neutrons, and it was due to some other gdml issue (though I still don't quite understand why only he was seeing the problem). |
|
That test case geometry in vis.mac and 5open has some 17m overlaps... |
- removed target - moved everything closer to to 0,0,0 - moved xml stuff inside gdml
|
With develop 027b69d. Geometry: red is overlapping volumes (to varying degress). It seems that there is 1) volume overlap in the test case, 2) reflection of at least some photons. If the issue of no optical photon reflection is still there, I think it would be help to:
|
|
Moving beam to shoot at quartz, hash 2552c97 |
|
So, @cameronc137, at least the default behavior in develop seems to work. Now I can try to get parallel worlds to work again too, right? I'll keep doing that this issue. |
|
Yes, this looks to be working fine with just the optical physics list set, and I've run a few simulations recently using this that give physically reasonable results. |
|
Ok, I can confirmed now that this does not work with parallel world enabled (/remoll/physlist/parallel/enable either before or after enabling optical). Good, now we can try to fix this :-D |
|
Weirdnesses (diffs below where left is parallel disabled, right is parallel enabled):
|
(verbose) ``` build/remoll -t 1 macros/issues/issue158_parallel_disable.mac 2>&1 > issue158_parallel_disable.log build/remoll -t 1 macros/issues/issue158_parallel_enable.mac 2>&1 > issue158_parallel_enable.log diff -y issue158_parallel_disable.log issue158_parallel_enable.log | less ```
|
Relevant upstream report: https://bugzilla-geant4.kek.jp/show_bug.cgi?id=1953 |
|
The upstream bug report is dismissed as not reproducible, but it describes exactly where the problem occurs in our code (G4OpBoundaryProcess.cc:L183 in geant4.10.04.p02). Makoto writes "Most-likely, this was caused by the user's code that has a mismatch between having the parallel world geometry but no associated G4ParallelWorldProcess process (or vice versa)" but that doesn't make it clearer to me :-/ |
|
Reproduced in a standard geant4.10.05 example and reported upstream as https://bugzilla-geant4.kek.jp/show_bug.cgi?id=2113. Workaround for now: no parallel worlds for geant4 versions <= 4.10.05 if you want optical photons to be simulated correctly :-( |
Note: macros/issues/issue158.sh will generate about 400 MB of logs.
Mismatch between name of parallel world and parallel physics process will cause problem beyond what we are seeing in #158.
|
Confirmed fixed in upstream development. Should be fixed in release 4.10.05.p02 whenever it appears. |
|
Fix released in upstream release 4.10.06. |




Environment: (where does this bug occur, have you tried other environments)
Steps to reproduce: (give a step by step account of how to trigger the bug)
clone a clean copy of the remoll (either version JeffersonLab or sbujlab), go to develop branch, cmake and make
execute ./build/remoll macros/blackening_external.mac
open the output file in root and check the number of optical photons hitting the PMT cathode with T->Draw("hit.det","hit.det==50701 && hit.pid==0") and the number of electrons hitting the quartz tile with T->Draw("hit.z","hit.pid==11 & hit.det==50001")
Alternatively execute ./build/remoll and within remoll run /control/execute macros/vis.mac
Shoot several particles at the quartz and see that in fact no photons internally reflect
(In the sbujlab version of the repo the beam generator movement macro commands are different, so this may take some finessing, or just shift the detector_5open.gdml sub-file to the +x direction by 975 mm and shoot the standard beam generator at it)
Expected Result: (what do you expect when you execute the steps above)
When I do the same thing in the sbujlab version of the repository (a stale old branch that has been manually fastforwarded some) I see ~ 24 PEs on the photocathode per electron hitting in the quartz.
Actual Result: (what do you get when you execute the steps above)
The photons do not internally reflect in the quartz.
I see 0.1 PEs per electron on quartz, and those are probably coming from other sources.
The text was updated successfully, but these errors were encountered: