-
Notifications
You must be signed in to change notification settings - Fork 45
Use correct energy when generating Cherenkov and scintillation photons #2152
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
base: develop
Are you sure you want to change the base?
Use correct energy when generating Cherenkov and scintillation photons #2152
Conversation
- Move Cherenkov offload from user-post to pre-post
- Template OffloadGatherAction on StepActionOrder to support reusing the
action for pre-post-step gathering
- Add a pre-post gather action to collect speed and energy deposition for
scintillation
- Fix sampling of scintillation photon position if energy was deposited both
along the step and at the collision site
Test summary 5 730 files 9 216 suites 18m 30s ⏱️ For more details on these failures, see this check. Results for commit f0430fe. ♻️ This comment has been updated with latest results. |
…cision:
/home/alund/celeritas_project/celeritas/src/celeritas/alongstep/detail/PropagationApplier.hh:128: error: Propagation of step length 3.945664e-07f due to post-step action 2 leading to distance 3.945664e-07f failed to change position
/home/alund/celeritas_project/celeritas/src/celeritas/phys/detail/TrackingCutExecutor.hh:69: error: Killing track {"geo":{"dir":[-0.311763733625412,0.8268820643424988,-0.4680486023426056],"is_on_boundary":false,"is_outside":false,"pos":[[11.132973670959473,46.96626281738281,-14.058794975280762],"cm"],"volume_id":"sphere"},"mat":"lAr","particle":{"energy":[0.0002947896718978882,"MeV"],"particle_id":"e-"},"sim":{"event_id":0,"num_steps":0,"parent_id":48,"post_step_action":"tracking-cut","status":"errored","step_length":[3.945664275306626e-07,"cm"],"time":[1.9288048935806046e-09,"s"],"track_id":51},"thread_id":2,"track_slot_id":2}: lost 0.00029479 MeV
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2152 +/- ##
===========================================
- Coverage 84.91% 76.13% -8.78%
===========================================
Files 1273 1198 -75
Lines 44667 36536 -8131
Branches 16611 14522 -2089
===========================================
- Hits 37927 27816 -10111
+ Misses 4756 4302 -454
- Partials 1984 4418 +2434
🚀 New features to boost your workflow:
|
This addresses the incorrect sampling of Cherenkov and scintillation photons when the track undergoes a collision at the end of the step. Because the distribution data was offloaded at the user-post step point, energy lost in the discrete interaction was incorrectly included in the energy loss used to sample the number of optical photons and photon times.
For Cherenkov the only change needed to fix this was to move the offload action from
user_posttopre_post. Scintillation was a bit more complicated because we need the pre-step quantities, the speed following the slowing down but before the discrete interaction, and the energy deposition following the discrete interaction. I've kept the offload action for scintillation as user-post so we can get the post-interaction energy deposition and added a second step gather action to collect the pre-post data (by templating theOffloadGatherActiononStepActionOrder).I updated the scintillation photon position sampling to use the fraction of energy deposited locally at the collision site to determine whether to generate photons at the endpoint rather than basing it off whether the particle is charged, but reverted it for now since I wasn't sure it was an improvement (6cfab20).