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 photoionization plugins #52

Merged
merged 98 commits into from
Apr 11, 2024
Merged

Add photoionization plugins #52

merged 98 commits into from
Apr 11, 2024

Conversation

HenningSE
Copy link
Collaborator

@HenningSE HenningSE commented Jul 3, 2023

This PR will add plugins simulating delayed electrons to fuse. The source of these electrons can be photo ionization.

@HenningSE
Copy link
Collaborator Author

The last commit changes the calculation of the number of drift surviving electrons from a simple multiplication with the survival probability to the usage of a binomial distribution. This change should better model the number of surviving electrons and should allow the simulation of single electrons!

@HenningSE
Copy link
Collaborator Author

From the technical perspective the code in this PR is working:

----------------------------------------------------------------------
Ran 34 tests in 423.273s

OK

@HenningSE
Copy link
Collaborator Author

We have to evaluate if the fuse implementation gives results compatible with WFSim since some parts were altered to fit into the fuse framework. When using the context with enabled delayed electrons one has to keep in mind that the simulation will run slower as a lot of single electrons are created!

@HenningSE HenningSE marked this pull request as ready for review August 16, 2023 11:28
@HenningSE HenningSE marked this pull request as draft November 15, 2023 13:58
@HenningSE HenningSE changed the title Add Photo Ionization and Photo Electric Afterpulses from WFSim to fuse Add photo ionization to fuse Jan 17, 2024
@HenningSE
Copy link
Collaborator Author

The branch of this PR was quite out of sync with the main branch. Most updates were added without conflicts but some changes need to be done by hand in the next few commits.

@HenningSE
Copy link
Collaborator Author

With the last commit, fuse will get the PI settings from the simulation config file. The corresponding PR can be found here: https://github.com/XENONnT/private_nt_aux_files/pull/306.

@HenningSE
Copy link
Collaborator Author

A comparison between XENONnT data and the PI simulation can be found in the wiki.

@ramirezdiego ramirezdiego changed the title Add photo ionization to fuse Add photoionization plugins Apr 10, 2024
Copy link
Collaborator

@ramirezdiego ramirezdiego left a comment

Choose a reason for hiding this comment

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

Wonderful work, which sets the skeleton many potential upgrades :)

I ran this branch succesfully with and without photoionization and went through the code, finding no issues. We will eventually revisit ramdom_xy_position, as raised by @shenyangshi, but the functionality is already there.

@HenningSE HenningSE merged commit 8d4154d into main Apr 11, 2024
4 checks passed
@HenningSE HenningSE deleted the more_afterpulses branch April 11, 2024 16:13
)

# Special case for the photoionization_modifier
Copy link
Contributor

Choose a reason for hiding this comment

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

Why photoionization_modifier is special?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hi @dachengx, this part is a little trick to properly set the photoionization_modifier config argument. The problem is that it is not written to the context config by st.apply_xedocs_configs(version=corrections_version) (here). As as result the plugin.run_id would not be overwritten by the corrections_run_id here.

I solved this problem by explicitly writing this config argument to the context config in the set_simulation_config_file function as we loop over all plugins and plugin configs anyways so we will also encounter the photoionization_modifier there. As it is now in the context config, plugin.run_id can now be changed to corrections_run_id.

Copy link
Contributor

Choose a reason for hiding this comment

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

Will this be solved if the photoionization_modifier is added to the global config: https://github.com/XENONnT/corrections/blob/92aa12f5fbae460c990e04bc571af0df3f67e68d/XENONnT/global_versions/global_v14.json?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think so yes. Then st.apply_xedocs_configs(version=corrections_version) should already take care of this.

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.

After-Pulses
4 participants