Repository navigation
Remove Cherenkov threshold for LS detectors - #71
JostMigenda wants to merge 3 commits into
Conversation
Since gen_evts() is executed in separate processes for parallelisation, this needed to be done in that function, which required changes to the surrounding code.
* update hash of sample output file * remove old sample output file from tests directory * remove diff from CI (was left over from initial debugging) and set explicit exit code instead
|
Hmm … the integration test is failing under Ubuntu; the only difference I can see from the logs is in the
Not sure what's going on there; I'll look into it (but am on annual leave this afternoon, so this will need to wait until next week). |
Default method depends on OS and Python version and `fork` doesn’t work with the cherenkov_threshold hack in this PR.
|
Fixed the issue—turns out, @mcolomerm Please go ahead and try this branch now; I’ll merge it sometime after the Easter holidays if you don’t discover any further issues. |
Thanks @JostMigenda for having a look at this. I will try to test it on the coming days. |
|
Hi, However, it would not address the issue when using sntools as a Python library to calculate differential cross sections, which is another valid use case of the code that is mentioned in the documentation and used, for example, in this SNOwGLoBES pull request, since the cherenkov_threshold variable would not be changed in this case, as channel.py is not called. In the code that I am developing, I also intend to use sntools in this way. Fixing the issue in a way that accounts for this use case and allows for including or excluding the Cherenkov threshold would definitely be possible, but non-trivial. Instead, what I did in my sntools fork (building on what this PR already adds) was to remove the Cherenkov threshold entirely (except in oxygen channels, since those are exclusive to Cherenkov detectors), replacing it by a minimal threshold given by the electron mass plus a small numerical offset. The reasoning is that sntools is not intended to be a full detector simulator, and real Cherenkov detectors have effective thresholds that are higher than the Cherenkov threshold, so any realistic simulation needs to account for the corresponding detector's effective threshold and cut events below that energy. In that sense, whether sntools cuts the events below the Cherenkov threshold does not matter, as those events would be cut anyway when applying the detector's effective threshold, and sntools cutting them does not eliminate the need to apply that additional detector-level cut. What do you think? If you're interested, I'd be happy to send a pull request with my changes. Conversely, if you have any objections or concerns, I'd be happy to discuss them. Best regards, |
Fixes #52. As a side effect (because the allowed eNu range for certain channels is now slightly larger), the event rate in
esandc12e/c12ebchannels increases by a few per cent for LS detectors.(Not 100% happy with how I implemented this, but I think that’s about as good as it gets without a larger restructuring of the code base. At least I got to clean up the
main()implementation slightly.)