Skip to content
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

Add an Optical WLS #1507

Merged
merged 15 commits into from
Dec 4, 2024
Merged

Conversation

whokion
Copy link
Contributor

@whokion whokion commented Nov 15, 2024

Add an optical warelength shift (WLS) interactor and an associated test:

  • Add data and params for WLS
  • Implement an interactor and tests for WLS
  • Add secondary photon memory allocation in the optical Interact

This is an initial implementation of an optical wavelength interactor based on the G4OpWLS process with a couple of differences:

  • Uses an inverse cumulative distribution for sampling the re-emitted photon spectrum replacing the rejection technique used in Geant4.
  • Supports only an exponential time structure for remitted photons for now, which will be extended for a general time structure later (depending on whether we support two WLS processes similar to Geant4 and use configurable (run-time) options for the re-emitted time structure".

@whokion whokion added the physics Particles, processes, and stepping algorithms label Nov 15, 2024
Copy link

github-actions bot commented Nov 15, 2024

Test summary

 3 877 files   5 969 suites   4m 9s ⏱️
 1 603 tests  1 575 ✅ 28 💤 0 ❌
19 857 runs  19 782 ✅ 75 💤 0 ❌

Results for commit 390793f.

♻️ This comment has been updated with latest results.

Copy link
Member

@sethrj sethrj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice work! I've got a couple of suggestions; if you want I can write the CDF sampler class.

@whokion
Copy link
Contributor Author

whokion commented Nov 16, 2024

@sethrj Thanks a lot for your review and comments. I addressed most of them, but left a couple of suggested improvements to you (a CDF sampler class and the integrate_trapezoid utility function). Sorry for asking additional help - I will be away for a week, but should catch up any other suggestion later.

Copy link
Contributor

@amandalund amandalund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @whokion!

@whokion
Copy link
Contributor Author

whokion commented Nov 26, 2024

@sethrj can you help how to fix the compilation error from build-spack / orange-float-g4@11.0? Thanks.

@sethrj
Copy link
Member

sethrj commented Dec 3, 2024

@whokion I've fixed the floating point error and added a couple of to-dos. Could you please take a look at the remaining discussion?

Copy link
Contributor

@hhollenb hhollenb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending Seth's and Amanda's suggestions, I think it looks good!

@whokion
Copy link
Contributor Author

whokion commented Dec 3, 2024

@sethrj Thanks a lot for fixing the float issue and adding other notes. Besides the discussion for adding a model or models which can be revisited in the next MR, it would be great that we can merge this as it is. Thanks again!

@sethrj
Copy link
Member

sethrj commented Dec 4, 2024

@amandalund If you're satisfied then please merge!

Copy link
Member

@sethrj sethrj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the new model! I've added the little "todo" tasks to #1263 .

Copy link
Contributor

@amandalund amandalund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent, thanks @whokion!

@amandalund amandalund enabled auto-merge (squash) December 4, 2024 00:19
@amandalund amandalund merged commit e0dc0a8 into celeritas-project:develop Dec 4, 2024
33 checks passed
@sethrj sethrj mentioned this pull request Dec 4, 2024
2 tasks
@sethrj sethrj added the enhancement New feature or request label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request physics Particles, processes, and stepping algorithms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants