feat: add -e flag to allow gen_amp_v2 to start at an arbitrary event number - #411
Open
denehoffman wants to merge 1 commit into
Open
feat: add -e flag to allow gen_amp_v2 to start at an arbitrary event number#411denehoffman wants to merge 1 commit into
denehoffman wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Right now, when a program like MCwrapper generates MC via gen_amp_v2 (or any other generator), it has no way to tell the generator what event number to start on. This is a problem because MCwrapper tends to produce multiple files per run number so event numbers are no longer unique to the combos they contain. This makes it additionally difficult to correctly do best-chi-squared rankings, since grouping by event number will incorrectly group unrelated combos. Right now this is hidden behavior which in my own tests contributes to errors of less than 1% if not manually corrected, but it should be simple to fix.
This PR just adds a
-eflag togen_amp_v2that allows the caller to provide the starting event number. After this becomes part of the release, we can then have MCwrapper inject the proper event numbers, but this is necessary to do first. Because-eis optional as an argument and the constructor for theHDDMDataWriterjust adds another optional argument, this should be backwards compatible with existing analysis code, but it also provides other generators with a pathway for doing this in the future.