-
Notifications
You must be signed in to change notification settings - Fork 73
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
Change rounding in PMT simulation #726
Conversation
f4c75e1
to
a1d3b66
Compare
We found some other problems in the electronics simulation that caused loss of charge. Specifically, the daq_decimate function was using an order 30 Chebyshev filter which affected the DC part of the signal, effectively reducing the magnitude. We have changed the function to use the scipy default which, while a bit slower, does not have a noticeable effect on the integrated signal. We plan to study In order to set the ADC central values correctly we ran tests using files with 1, 2, 10, 20. 50 & 100 pe in various forms (1 bin, 2 bin, 5 bin,...) and checked that, without gain dispersion nor charge fluctuation, what value we got for the signal and that the other charge levels were the appropriate multiple of that value. There is one test which I have marked skip, |
comp_PR726.pdf Similar reduction in systematics are seen comparing to the irene selection with more complicated distribution due to electronics noise and the full simulation and deconvolution steps. |
a1d3b66
to
7e48fae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the relevant changes in algorithm were approved by VH I can only review the code.
Can you squash:
- Update single_pe tests for new decimate, Mark test_diomira_reproduces_singlepe veryslow, Test to show loss of single pe signal in pmt simulation;
- Update description of marker, Add functions to run very slow tests with commandline option
- Use new file in test_diomira_exact_result, New comparison file for test_diomira_exact_result
and I am happy to approve
This change is motivated by the current simulation without gain dispersion giving 16.241 for all single photon events.
Better simulates the ADC and solves systematic loss problem.
Takes into account changes to simulation
7e48fae
to
a262b9a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR fixes ~15% signal loss after passing through diomira. The main changes are:
- using round instead of floor for adc converter simulation (a test is added to show that for each PMT the mean ADC is equivalent to the gain)
- change daq_decimate to use scipy default (a test is added to show that the signal is maintained after the down-sampling)
- change ADC central values
All the algorithm changes are discussed and approved by V. Herrero. Good job Andrew in recovering our MC signal!
Changes the way the output of the PMT simulation used in
diomira
is converted to integerto better simulate the ADC.
This change should remove or significantly improve the ~15% loss of signal observed
in passing MC through the
diomira
city.