Skip to content

Migdal yield#316

Open
lorenzomag wants to merge 44 commits into
mainfrom
migdal_yield
Open

Migdal yield#316
lorenzomag wants to merge 44 commits into
mainfrom
migdal_yield

Conversation

@lorenzomag

@lorenzomag lorenzomag commented Jun 5, 2025

Copy link
Copy Markdown
Contributor

Before you submit this PR: make sure to put all XENONnT specific information in a wiki-note as the repo is publicly accessible

What does the code in this PR do / what does it improve?

This code implements the Migdal effect when computing the amount of quanta produced by a nuclear recoil (NR).
Currently, no charge yield suppression is considered.

Can you briefly describe how it works?

The code utilises a pickled class containing interpolators for the probability tables provided by [Peter Cox et al.] (https://petercox.github.io/Migdal/) to compute the probability of producing a Migdal ionisation as a result of a NR.

It also requires additional fields to the simulation config file; these include the mass of the Xe atom, the binding energies for its orbitals, a boolean to force a Migdal event for every NR, which orbitals to consider for the simulation.

These additional files are currently available in this working repository.

Using simple MC techniques, the code determines, for each NR event, if there was a Migdal event, which orbital the ionisation electron is coming from, and its ionisation energy.
This energy and the energy of relaxation X-rays and Auger electrons (which sum up to the binding energy of the electron) are then converted to quanta using NEST β-yield model.

The quanta produced by this ER interaction are then simply added to the ones arising from the corresponding NR. This algorithm will have to be improved to account for charge yield suppression.

Can you give a minimal working example (or illustrate with a figure)?

Please include the following if applicable:

  • Update the docstring(s)
  • Bump plugin version(s)
  • Update the documentation
  • Tests to check the (new) code is working as desired.
  • Does it solve one of the GitHub open issues?

@lorenzomag lorenzomag requested a review from cfuselli June 5, 2025 03:38
@coveralls

coveralls commented Jun 5, 2025

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 20132348442

Details

  • 56 of 245 (22.86%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-3.1%) to 69.434%

Changes Missing Coverage Covered Lines Changed/Added Lines %
fuse/plugins/truth_information/event_truth.py 8 22 36.36%
fuse/plugins/micro_physics/yields.py 48 223 21.52%
Totals Coverage Status
Change from base Build 18012081142: -3.1%
Covered Lines: 2710
Relevant Lines: 3903

💛 - Coveralls

@cfuselli cfuselli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hey Lorenzo thanks a lot for this plugin! Looks good to me, I requested a few changes but overall looks all good. Maybe one more thing we should add a test for this plugin?

Comment thread fuse/plugins/micro_physics/yields.py Outdated
Comment thread fuse/plugins/micro_physics/yields.py Outdated
Comment thread fuse/plugins/micro_physics/yields.py Outdated
Comment thread fuse/plugins/micro_physics/yields.py Outdated
Comment thread fuse/plugins/micro_physics/yields.py Outdated
@lorenzomag lorenzomag marked this pull request as ready for review September 30, 2025 07:58
@lorenzomag lorenzomag requested a review from cfuselli September 30, 2025 07:58
@lorenzomag

Copy link
Copy Markdown
Contributor Author

Hey, the plugin is ready for review!

I believe that the pre-commit does not appreciate my plugin providing two data types, though...
Have I set it up wrongly?

@lorenzomag

Copy link
Copy Markdown
Contributor Author

Ok, my fix didn't work. I might have to add typing info to NestYields, unless someone has power over pre-commit 🙃

@cfuselli

cfuselli commented Oct 2, 2025

Copy link
Copy Markdown
Member

Hey @lorenzomag thank youuu! I will have a proper look asap.
Meanwhile I fixed the annoying mypy type inconsistency error, using the typing modules to predefine the types as tuple/dict in the main class. So at least now precommit is passing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants