Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Fix cut_by_eventid again #80

Merged
merged 1 commit into from
Jan 25, 2024
Merged

Fix cut_by_eventid again #80

merged 1 commit into from
Jan 25, 2024

Conversation

PavelKavrigin
Copy link
Contributor

The fix introduced in PR#75 created some issues for mc_chain because we pass the actual G4 eventid to wfsim in order to add some offset to event times according to the specified rate. However, in epix this cut refers to indices of G4 events, not to G4 eventids. Since cut_by_eventid was set to True in epix configuration, all simulations, except for the one where G4 eventid started at 0, had zero events in the epix output after PR#75 had been propagated to montecarlo-development.

I did more thorough tests and updated cut_by_eventid treatment again, here's the test notebook:
/project2/lgrandi/pkavrigin/2024-01-21_test_epix/2024-01-21_TestEPIX.ipynb
In the notebook "expected" means the number of events from G4 file which we expect to see in the epix output with the given parameters, and "result" is what we actually get.

Output with the current epix master branch:
2024-01-21_master

Output with fix_evtid_again branch:
2024-01-21_fix_evtid_again

@ramirezdiego ramirezdiego merged commit 9f50916 into master Jan 25, 2024
1 check passed
@ramirezdiego ramirezdiego deleted the fix_evtid_again branch January 25, 2024 16:41
PavelKavrigin added a commit that referenced this pull request Feb 4, 2024
* Fix cut_by_eventid again

* Fix cut_by_eventid again (#80)

Co-authored-by: Pavel Kavrigin <pkavrigin@midway3-login4.rcc.local>

---------

Co-authored-by: Pavel Kavrigin <pkavrigin@midway3-login4.rcc.local>
ramirezdiego added a commit that referenced this pull request Feb 7, 2024
* added option to apply total Edep selection, in order to save resources before WFSim

* update the function for tot_e calculation

* move functions to common.py. Add explanations of new options in README

* bug fix

* Add escape for empty instructions after the energy selection

* add some lines so that to return empty instructions in case no events left after the energy selection

* Merge master with cut_by_eventid fix (#81)

* Fix cut_by_eventid again

* Fix cut_by_eventid again (#80)

Co-authored-by: Pavel Kavrigin <pkavrigin@midway3-login4.rcc.local>

---------

Co-authored-by: Pavel Kavrigin <pkavrigin@midway3-login4.rcc.local>

* Polish description in README

---------

Co-authored-by: Masatoshi Kobayashi <kobayashi1@midway3-login4.rcc.local>
Co-authored-by: Masatoshi Kobayashi <mk4212@columbia.edu>
Co-authored-by: Pavel Kavrigin <68543201+PavelKavrigin@users.noreply.github.com>
Co-authored-by: Pavel Kavrigin <pkavrigin@midway3-login4.rcc.local>
Co-authored-by: Diego Ramírez García <diego.ramirez@physik.uni-freiburg.de>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants